# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
397514 | Iwanttobreakfree | Elder (COCI19_elder) | C++98 | 1 ms | 296 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>
#include <set>
using namespace std;
int main(){
int n;
char a,b,w;
set<char> wizard;
cin>>w>>n;
wizard.insert(w);
while(n--){
cin>>a>>b;
if(b==w){
w=a;
wizard.insert(w);
}
}
cout<<w<<'\n';
cout<<wizard.size();
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |