# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
157568 | ToniB | Elder (COCI19_elder) | C++14 | 2 ms | 376 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
using namespace std;
int main(){
int N, v[90];
int broj = 1;
char sol, X, Y;
cin >> sol;
cin >> N;
for(int i = 0; i < N; ++i){
cin >> X >> Y;
if(sol == Y){
sol = X;
v[(int)X] = 1;
}
}
for(int i = 1; i < 91; ++i){
broj += v[i];
}
cout << sol << endl;
cout << broj;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |