/ Vijos /

记录详情

Accepted

foo.cc: In function ‘bool go()’:
foo.cc:13:18: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   13 | if (a[i] == a[j] && a[p] == a[q] || a[i] == a[q] && a[p] == a[j])
      |     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
foo.cc: In function ‘int main()’:
foo.cc:25:5: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations]
   25 | gets(a);
      | ~~~~^~~
In file included from /nix/gcc-13.3.0/include/c++/13.3.0/cstdio:42,
                 from /nix/gcc-13.3.0/include/c++/13.3.0/ext/string_conversions.h:45,
                 from /nix/gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:4109,
                 from /nix/gcc-13.3.0/include/c++/13.3.0/string:54,
                 from /nix/gcc-13.3.0/include/c++/13.3.0/bits/locale_classes.h:40,
                 from /nix/gcc-13.3.0/include/c++/13.3.0/bits/ios_base.h:41,
                 from /nix/gcc-13.3.0/include/c++/13.3.0/ios:44,
                 from /nix/gcc-13.3.0/include/c++/13.3.0/ostream:40,
                 from iostream:41:
/nix/glibc-2.40-66-dev/include/stdio.h:667:14: note: declared here
  667 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
foo.cc:27:5: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations]
   27 | gets(a);
      | ~~~~^~~
/nix/glibc-2.40-66-dev/include/stdio.h:667:14: note: declared here
  667 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
/nix/binutils-2.43.1/bin/ld: /tmp/ccsMNNKA.o: in function `main':
foo.cc:(.text.startup+0x1a): warning: the `gets' function is dangerous and should not be used.
# 状态 耗时 内存占用
#1 Accepted 3ms 536.0 KiB
#2 Accepted 3ms 540.0 KiB
#3 Accepted 3ms 536.0 KiB
#4 Accepted 2ms 324.0 KiB
#5 Accepted 3ms 536.0 KiB
#6 Accepted 3ms 536.0 KiB
#7 Accepted 3ms 536.0 KiB
#8 Accepted 5ms 764.0 KiB
#9 Accepted 11ms 320.0 KiB
#10 Accepted 20ms 812.0 KiB

信息

递交者
类型
递交
题目
P1482 信息筛选
语言
C++
递交时间
2025-09-10 10:34:06
评测时间
2025-09-10 10:34:06
评测机
分数
100
总耗时
61ms
峰值内存
812.0 KiB