Submission #29666939
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); ++i)
std::vector<std::string> split(const std::string& text, const char delim);
using ll = long long int;
using llu = unsigned long long int;
int main(){
string buffer;
getline(cin, buffer);
auto a = split(buffer, ' ');
string ans = a[0];
for (int i = 0; i < 2; ++i) {
ans = a[stoi(ans)];
}
cout << ans << endl;
return 0;
}
std::vector<std::string> split(const std::string& text, char delim) {
std::vector<std::string> elems;
std::stringstream ss(text);
std::string item;
while (std::getline(ss, item, delim)) {
if (!item.empty()) {
elems.emplace_back(item);
}
}
return elems;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Digit Machine |
| User | low10603 |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 795 Byte |
| Status | AC |
| Exec Time | 6 ms |
| Memory | 3596 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt, example2.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, example0.txt, example1.txt, example2.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 6 ms | 3532 KiB |
| 001.txt | AC | 2 ms | 3576 KiB |
| 002.txt | AC | 2 ms | 3572 KiB |
| 003.txt | AC | 2 ms | 3596 KiB |
| 004.txt | AC | 2 ms | 3564 KiB |
| 005.txt | AC | 3 ms | 3532 KiB |
| 006.txt | AC | 2 ms | 3564 KiB |
| example0.txt | AC | 2 ms | 3568 KiB |
| example1.txt | AC | 2 ms | 3584 KiB |
| example2.txt | AC | 4 ms | 3536 KiB |