forked from sanjiv1705/codechef
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaprlun.cpp
More file actions
36 lines (31 loc) · 688 Bytes
/
aprlun.cpp
File metadata and controls
36 lines (31 loc) · 688 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include<iostream>
#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
int t , i;
cin>>t;
for(i=0 ; i<t ; i++)
{
int n , j , k ;
cin>>n;
char a[20][n], b[20][n];
for(j=0 ; j<n ; j++ )
cin>>a[j]>>b[j];
for(j= 0 ; j<n ; j++)
{ int l = 0;
for(k=0 ; k<n ; k++)
{
if(strcmp(a[j] , a[k])==0)
{
l=1;
break;}
}
if(l==1)
cout<<a[j]<<" "<<b[j]<<endl;
else
cout<<a[j]<<endl;
}
}
}