/ Vijos /

记录详情

Compile Error

foo.c:4:1: error: unknown type name 'bool'
 bool b;
 ^
foo.c: In function 'main':
foo.c:9:1: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'char (*)[12000]' [-Wformat=]
 scanf("%d%s%s%s",&n,&s1,&s2,&s3);
 ^
foo.c:9:1: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'char (*)[12000]' [-Wformat=]
foo.c:9:1: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'char (*)[12000]' [-Wformat=]
foo.c:10:75: error: 'true' undeclared (first use in this function)
 if(strcmp(s2,"gdrsccsrdg")==0) puts(s2); else { k1=(s2[0]-s1[0]+26)%26; b=true; for(i=1;i<n&&b;i++) { k2=(s2[i]-s1[i]+26)%26; if(k2!=k1) b=false; } if(b) for(i=n-1;i>=0;i--) puts(s3); else { k1=(s2[0]-s3[0]+26)%26; b=true; for(i=1;i<n&&b;i++) { k2=(s2[i]-s3[i]+26)%26; if(k2!=k1) b=false; } if(b) for(i=n-1;i>=0;i--) printf("%c",s1[i]); else { k1=(s1[0]-s3[0]+26)%26; b=true; for(i=1;i<n&&b;i++) { k2=(s1[i]-s3[i]+26)%26; if(k2!=k1) b=false; } if(b) for(i=n-1;i>=0;i--) printf("%c",s2[i]);
                                                                           ^
foo.c:10:75: note: each undeclared identifier is reported only once for each function it appears in
foo.c:10:140: error: 'false' undeclared (first use in this function)
 if(strcmp(s2,"gdrsccsrdg")==0) puts(s2); else { k1=(s2[0]-s1[0]+26)%26; b=true; for(i=1;i<n&&b;i++) { k2=(s2[i]-s1[i]+26)%26; if(k2!=k1) b=false; } if(b) for(i=n-1;i>=0;i--) puts(s3); else { k1=(s2[0]-s3[0]+26)%26; b=true; for(i=1;i<n&&b;i++) { k2=(s2[i]-s3[i]+26)%26; if(k2!=k1) b=false; } if(b) for(i=n-1;i>=0;i--) printf("%c",s1[i]); else { k1=(s1[0]-s3[0]+26)%26; b=true; for(i=1;i<n&&b;i++) { k2=(s1[i]-s3[i]+26)%26; if(k2!=k1) b=false; } if(b) for(i=n-1;i>=0;i--) printf("%c",s2[i]);
                                                                                                                                            ^

信息

递交者
类型
递交
题目
P1449 字符串还原
语言
C
递交时间
2016-12-22 18:50:56
评测时间
2016-12-22 18:50:57
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes