Runtime Error

foo.cc: In function ‘int main()’:
foo.cc:9:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
    9 |         for(int i=1;i<=s.size();i++)
      |                     ~^~~~~~~~~~
foo.cc:12:32: warning: ‘n’ may be used uninitialized [-Wmaybe-uninitialized]
   12 |                         st[++n]=s[i];
foo.cc:8:13: note: ‘n’ was declared here
    8 |         int n;
      |             ^
# 状态 耗时 内存占用
#1 Runtime Error Segmentation fault 3ms 536.0 KiB
#2 Wrong Answer Read 0x7ffd7eb84270, expect NO. 3ms 536.0 KiB
#3 Wrong Answer Read 0x7ffe17de2300, expect YES. 3ms 536.0 KiB
#4 Wrong Answer Read 0x7ffc677d97a0, expect YES. 3ms 320.0 KiB
#5 Wrong Answer Read 0x7fff321895c0, expect NO. 3ms 532.0 KiB

信息

递交者
类型
递交
题目
P1001 判断闰年
语言
C++
递交时间
2024-10-01 19:33:11
评测时间
2024-10-01 19:33:11
评测机
分数
0
总耗时
15ms
峰值内存
536.0 KiB