Compile Error

foo.cc: In function ‘bool leap(int)’:
foo.cc:4:18: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
    4 |         if(x%4==0&&x%100!=0||x%400==0)return true;
      |            ~~~~~~^~~~~~~~~~
foo.cc: In function ‘int m1(int, int)’:
foo.cc:10:32: error: ‘x’ was not declared in this scope
   10 |         else if(m==2)d=28+leap(x);
      |                                ^

信息

递交者
类型
递交
题目
P2881 时间跨越2025.3GESP2级T2
语言
C++
递交时间
2025-07-19 09:35:55
评测时间
2025-07-19 09:35:55
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes