# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
100524 | Feeder | Elder (COCI19_elder) | C++11 | 3 ms | 384 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;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
char a, b, c;
set<char> st;
int n;
cin >> c >> n;
st.insert(c);
for(int i=0; i<n; i++){
cin >> a >> b;
if(b == c){
c = a;
st.insert(c);
}
}
cout << c << '\n' << st.size();
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |