foo.cc: In function 'bool rn(int)':
foo.cc:4:23: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
4 | return n%4==0 && n%100 || n%400==0;
| ~~~~~~~^~~~~~~~
foo.cc: In function 'int main()':
foo.cc:11:42: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
11 | while(n1+1<n2 || n1<n2 && y1<=y2 && r1<=r2){
| ~~~~~~~~~~~~~~~~^~~~~~~~~
foo.cc:12:26: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
12 | if(y1<=2 && rn(n1) || y1>2 && rn(n1+1)){
| ~~~~~~^~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务