Submission #397514

#TimeUsernameProblemLanguageResultExecution timeMemory
397514IwanttobreakfreeElder (COCI19_elder)C++98
50 / 50
1 ms296 KiB
#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 timeMemoryGrader output
Fetching results...