General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
122179063 Practice:
jaioff02
4C - 11 C++14 (GCC 6-32) Wrong answer on test 7 1092 ms 3800 KB 2021-07-12 10:06:35 2021-07-12 10:06:35
→ Source
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main(){
map<string,int> m;
int n,count=0,flag=0;cin>>n;
string s;
for(int i=0;i<n;i++)
{
flag=0;
   cin>>s;
   m[s]++;
   if(m[s]>1){
   flag=1;
   count++;}
   else
   count=0;
if(flag==1)
cout<<s<<count<<endl;
else
cout<<"OK"<<endl;
}
return 0;
}
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details