/ Vijos /

记录详情

Accepted

foo.cc: In function 'int check_1(int)':
foo.cc:17:35: 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;
                                   ^
foo.cc:18:60: 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;
                                                            ^
foo.cc:19:41: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
  if (num[k]==4) if (!equal(s[k][3],"not")) return 2;
                                         ^
foo.cc: In function 'int check_2(int)':
foo.cc:28:35: 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;
                                   ^
foo.cc:29:25: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
  if (!equal(s[k][2],"is")) return 2;
                         ^
foo.cc:30:41: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
  if (num[k]==4) if (!equal(s[k][3],"not")) return 2;
                                         ^
foo.cc: In function 'int check_3(int)':
foo.cc:39:39: 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;
                                       ^
foo.cc:39:61: 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;
                                                             ^
foo.cc: In function 'int OK(char)':
foo.cc:63:17: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  return (ch>='A'&&ch<='Z'||ch>='a'&&ch<='z');
          ~~~~~~~^~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:66:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d%d",&n,&lie,&m);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~
foo.cc:67:39: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  for (i=1; i<=n; i++) scanf("%s",a[i]),Map[a[i]]=i;
                       ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
foo.cc:69:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%s",name[i]);
   ~~~~~^~~~~~~~~~~~~~
foo.cc:71:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%s",s[i][num[i]=1]);
   ~~~~~^~~~~~~~~~~~~~~~~~~~~
foo.cc:72:57: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   while (OK(s[i][num[i]][strlen(s[i][num[i]])-1])) scanf("%s",s[i][++num[i]]);
                                                    ~~~~~^~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 1ms 384.0 KiB
#2 Accepted 1ms 384.0 KiB
#3 Accepted 1ms 384.0 KiB
#4 Accepted 2ms 376.0 KiB
#5 Accepted 1ms 384.0 KiB
#6 Accepted 1ms 524.0 KiB
#7 Accepted 1ms 384.0 KiB
#8 Accepted 1ms 384.0 KiB
#9 Accepted 1ms 384.0 KiB
#10 Accepted 1ms 384.0 KiB

信息

递交者
类型
递交
题目
P1106 侦探推理
语言
C++
递交时间
2021-08-17 21:53:25
评测时间
2021-08-17 21:53:25
评测机
分数
100
总耗时
18ms
峰值内存
524.0 KiB