# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
129241 | 44442 | Elder (COCI19_elder) | C++11 | 2 ms | 504 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 <bits/stdc++.h>
using namespace std;
char a[101],b[101],j;
bool v[204];
short n,d,e,ok=1,k;
int main (){
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
cin>>j>>n;
for(int i=0;i<n;i++){
cin>>a[i]>>b[i];
}
for(d;d<n;d++){
if(b[d]==j){
v[j]=1;
j=a[d];
ok=ok+!v[j];
}
}
cout<<j<<endl<<ok;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |