Submission #100524

#TimeUsernameProblemLanguageResultExecution timeMemory
100524FeederElder (COCI19_elder)C++11
50 / 50
3 ms384 KiB
#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 timeMemoryGrader output
Fetching results...