# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
129230 |
2019-07-11T21:27:25 Z |
44442 |
Elder (COCI19_elder) |
C++11 |
|
2 ms |
376 KB |
#include <bits/stdc++.h>
using namespace std;
char a[101],b[101],j;
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){
ok++;
j=a[d];
}
}
cout<<j<<endl<<ok;
return 0;
}
Compilation message
elder.cpp: In function 'int main()':
elder.cpp:12:10: warning: statement has no effect [-Wunused-value]
for(d;d<n;d++){
^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
2 ms |
376 KB |
Output is partially correct |
2 |
Correct |
2 ms |
376 KB |
Output is correct |
3 |
Partially correct |
2 ms |
376 KB |
Output is partially correct |
4 |
Partially correct |
2 ms |
376 KB |
Output is partially correct |
5 |
Partially correct |
2 ms |
376 KB |
Output is partially correct |
6 |
Correct |
2 ms |
376 KB |
Output is correct |
7 |
Partially correct |
2 ms |
376 KB |
Output is partially correct |
8 |
Correct |
2 ms |
376 KB |
Output is correct |
9 |
Partially correct |
2 ms |
376 KB |
Output is partially correct |
10 |
Partially correct |
2 ms |
376 KB |
Output is partially correct |