本站将迁移至 oj.etao.net, 详情请见 oj.etao.net 首页的公告

/ OPS /

记录详情

Wrong Answer

/in/foo.cc: In function 'std::string daysToDate(int)':
/in/foo.cc:55:24: warning: '%02d' directive writing 2 bytes into a region of size between 0 and 6 [-Wformat-overflow=]
   55 |     sprintf(buf, "%04d-%02d-%02d", y, m, d);
      |                        ^~~~
/in/foo.cc:55:18: note: directive argument in the range [1, 13]
   55 |     sprintf(buf, "%04d-%02d-%02d", y, m, d);
      |                  ^~~~~~~~~~~~~~~~
/in/foo.cc:55:18: note: directive argument in the range [-2147483647, 2147483647]
In file included from /usr/include/stdio.h:867,
                 from /usr/include/c++/9/cstdio:42,
                 from /usr/include/c++/9/ext/string_conversions.h:43,
                 from /usr/include/c++/9/bits/basic_string.h:6496,
                 from /usr/include/c++/9/string:55,
                 from /usr/include/c++/9/bits/locale_classes.h:40,
                 from /usr/include/c++/9/bits/ios_base.h:41,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from /in/foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: '__builtin___sprintf_chk' output between 11 and 26 bytes into a destination of size 11
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 状态 耗时 内存占用
#1 Wrong Answer 4ms 1.105 MiB

信息

递交者
类型
递交
题目
P1132 整理日期
语言
C++
递交时间
2025-09-18 16:03:50
评测时间
2025-09-18 16:03:51
评测机
分数
0
总耗时
4ms
峰值内存
1.105 MiB