#include <iostream>
#include <string>
#include <map>
using namespace std;
int n;
int main()
{
string str;
map<string,int> q;
cin >> n;
for(int i = 1;i <= n;i ++)
{
cin >> str;
if(q[str] > 0)
{
cout << str << q[str] << endl;
q[str] ++;
}
else
{
cout << "OK" << endl;
q[str] = 1;
}
}
return 0;
}
CodeForces 4C
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
Codeforces Round #479 (Div. 3)(A-F)題解
Harris-H
2020-07-07 12:04:43
codeforece 18c
revstar_
2020-07-06 17:53:24
Codeforces Round #178 (Div. 2) B .Shaass and Bookshelf
revstar_
2020-07-06 17:53:24
codeforce492 B. Vanya and Lanterns
revstar_
2020-07-06 17:53:24
constructive algorithms:Codeforces Round #654 (Div. 2):B. Magical Calendar
仝竞奇
2020-07-06 01:51:28
Codeforces Round #262 (Div. 2) 460C. Present
王宸敏
2020-07-04 08:02:36
Oulipo(http://acm.hdu.edu.cn/showproblem.php?pid=1686)
LR1741670057
2020-07-07 11:10:52
【簡單題】CCPC Huatuo's Medicine L
劢臻佳境
2020-07-07 06:57:07
Largest prime factor(素數篩選法)
crazy理工科
2020-07-06 14:28:06
簡單題(K-D Tree+單點插入+矩形區間和)
UniverseofHK
2020-07-06 03:44:12
hdu 5058 So easy
Kefault
2020-07-04 16:54:56
hdu 5059 Help him
Kefault
2020-07-04 16:54:56
shu_1746 無平方因子
naturelan
2020-07-03 12:16:22
hdu_1407測試你是否和LTC水平一樣高
naturelan
2020-07-03 12:16:22