/ OPS /

记录详情

Compile Error

/in/foo.cc: In function 'int rn(int)':
/in/foo.cc:12:17: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   12 |  if (y % 4 == 0 && y % 100 != 0 || y % 400 == 0) return 1;
      |      ~~~~~~~~~~~^~~~~~~~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:37:22: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   37 |    while (sum >= 365 && rn(yr + 1) == 0 || sum >= 366 && rn(yr + 1) == 1) {
      |           ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/in/foo.cc:88:45: error: expected '}' at end of input
   88 |   printf("%.4d-%.2d-%.2d\n", yr, mo_x, dy_x);
      |                                             ^
/in/foo.cc:18:31: note: to match this '{'
   18 |  for (int i = 1; i <= n; i++) {
      |                               ^
/in/foo.cc:88:45: error: expected '}' at end of input
   88 |   printf("%.4d-%.2d-%.2d\n", yr, mo_x, dy_x);
      |                                             ^
/in/foo.cc:15:12: note: to match this '{'
   15 | int main() {
      |            ^

信息

递交者
类型
递交
题目
P1130 推断日期
语言
C++
递交时间
2024-05-06 21:00:32
评测时间
2024-05-06 21:00:32
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes