/ Vijos /

记录详情

Accepted

/in/foo.cc: In function 'int equal(char*, char*)':
/in/foo.cc:13:1: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
 for (int i=0;i<l1;i++) if (s1[i]!=s2[i]) return 0;return 1;
 ^~~
/in/foo.cc:13:51: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
 for (int i=0;i<l1;i++) if (s1[i]!=s2[i]) return 0;return 1;
                                                   ^~~~~~
/in/foo.cc: In function 'int check_1(int)':
/in/foo.cc:17:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
 if (!equal(s[k][num[k]],"guilty.")||num[k]<3||num[k]>4) return 2;
                                  ^
/in/foo.cc:18:59: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
 if (s[k][1][0]!='I'||s[k][1][1]!='\0'||!equal(s[k][2],"am")) return 2;
                                                           ^
/in/foo.cc:19:40: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
 if (num[k]==4) if (!equal(s[k][3],"not")) return 2;
                                        ^
/in/foo.cc:21:1: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
 if (num[k]==3) return 1;return 0;
 ^~
/in/foo.cc:21:25: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
 if (num[k]==3) return 1;return 0;
                         ^~~~~~
/in/foo.cc: In function 'int check_2(int)':
/in/foo.cc:25:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
 if (!equal(s[k][num[k]],"guilty.")||num[k]<3||num[k]>4) return 2;
                                  ^
/in/foo.cc:26:24: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
 if (!equal(s[k][2],"is")) return 2;
                        ^
/in/foo.cc:27:40: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
 if (num[k]==4) if (!equal(s[k][3],"not")) return 2;
                                        ^
/in/foo.cc:29:1: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
 if (num[k]==3) return 1;return 0;
 ^~
/in/foo.cc:29:25: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
 if (num[k]==3) return 1;return 0;
                         ^~~~~~
/in/foo.cc: In function 'int check_3(int)':
/in/foo.cc:33:38: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
 if (num[k]!=3||!equal(s[k][1],"Today")||!equal(s[k][2],"is")) return 2;
                                      ^
/in/foo.cc:33:60: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
 if (num[k]!=3||!equal(s[k][1],"Today")||!equal(s[k][2],"is")) return 2;
                                                            ^
/in/foo.cc: In function 'int OK(char)':
/in/foo.cc:49:39: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
 inline int OK(char ch){return (ch>='A'&&ch<='Z'||ch>='a'&&ch<='z');}
                                ~~~~~~~^~~~~~~~~
# 状态 耗时 内存占用
#1 Accepted 3ms 376.0 KiB
#2 Accepted 1ms 376.0 KiB
#3 Accepted 1ms 380.0 KiB
#4 Accepted 1ms 468.0 KiB
#5 Accepted 1ms 376.0 KiB
#6 Accepted 1ms 508.0 KiB
#7 Accepted 1ms 340.0 KiB
#8 Accepted 1ms 376.0 KiB
#9 Accepted 1ms 484.0 KiB
#10 Accepted 1ms 380.0 KiB

信息

递交者
类型
递交
题目
P1106 侦探推理
语言
C++
递交时间
2021-12-18 11:18:33
评测时间
2021-12-18 11:18:33
评测机
分数
100
总耗时
18ms
峰值内存
508.0 KiB