-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path10188.cpp
More file actions
47 lines (45 loc) · 713 Bytes
/
10188.cpp
File metadata and controls
47 lines (45 loc) · 713 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
37
38
39
40
41
42
43
44
45
46
47
#include<stdio.h>
#include<string.h>
#define si 1000010
long i,j,k=1,n;
char ind1[si],ind2[si],ins1[si],ins2[si],c;
int main()
{
while(~scanf("%ld",&n)&&n)
{
getchar();
i=j=0;
while(n)
{
c=getchar();
ins1[i++]=c;
if(c>=48&&c<=57)
ind1[j++]=c;
if(c=='\n')
n--;
}
ins1[i]=0;
ind1[j]=0;
scanf("%ld",&n);
getchar();
i=j=0;
while(n)
{
c=getchar();
ins2[i++]=c;
if(c>=48&&c<=57)
ind2[j++]=c;
if(c=='\n')
n--;
}
ins2[i]=0;
ind2[j]=0;
if(strcmp(ins1,ins2)==0)
printf("Run #%ld: Accepted\n",k++);
else if(strcmp(ind1,ind2)==0)
printf("Run #%ld: Presentation Error\n",k++);
else
printf("Run #%ld: Wrong Answer\n",k++);
}
return 0;
}