Submission #53293653


Source Code Expand

// LUOGU_RID: 158595424
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
typedef vector<int> VI;
typedef long long ll;
typedef pair<int,int> PII;
const ll MOD=1e9+7;
// head

signed main() 
{
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int n;cin>>n;
    map<string,int> M;
    for(int i=0;i<n;i++){
    	string s;cin>>s;
    	if(!M[s]) cout<<s<<endl;
    	else cout<<s<<"("<<M[s]<<")"<<endl;
    	M[s]++;
	}
}

Submission Info

Submission Time
Task C - NewFolder(1)
User gangbengr
Language C++ 17 (gcc 12.2)
Score 300
Code Size 621 Byte
Status AC
Exec Time 271 ms
Memory 19144 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 2
AC × 16
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All hand_01.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
hand_01.txt AC 1 ms 3536 KiB
random_01.txt AC 270 ms 19076 KiB
random_02.txt AC 271 ms 19144 KiB
random_03.txt AC 212 ms 4120 KiB
random_04.txt AC 215 ms 4140 KiB
random_05.txt AC 233 ms 4240 KiB
random_06.txt AC 215 ms 4096 KiB
random_07.txt AC 55 ms 3408 KiB
random_08.txt AC 170 ms 3552 KiB
random_09.txt AC 112 ms 6620 KiB
random_10.txt AC 3 ms 3460 KiB
random_11.txt AC 100 ms 3460 KiB
random_12.txt AC 173 ms 4916 KiB
random_13.txt AC 21 ms 4560 KiB
sample_01.txt AC 1 ms 3516 KiB
sample_02.txt AC 1 ms 3456 KiB