Compile Error

foo.cc: In function ‘bool cmp(t, t)’:
foo.cc:13:33: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   13 |         return a.x<b.x||a.x==b.x&&a.y<b.y;
      |                         ~~~~~~~~^~~~~~~~~
foo.cc: In function ‘void read()’:
foo.cc:27:17: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
   27 |         return x*f;
      |                ~^~
foo.cc: In function ‘int main()’:
foo.cc:41:15: error: void value not ignored as it ought to be
   41 |         n=read();q=read();
      |           ~~~~^~
foo.cc:41:24: error: void value not ignored as it ought to be
   41 |         n=read();q=read();
      |                    ~~~~^~
foo.cc:44:28: error: void value not ignored as it ought to be
   44 |                 a[i].x=read();
      |                        ~~~~^~
foo.cc:50:29: error: void value not ignored as it ought to be
   50 |                 int s;s=read();
      |                         ~~~~^~
foo.cc:53:41: error: void value not ignored as it ought to be
   53 |                         int k,l,u;k=read();l=read();
      |                                     ~~~~^~
foo.cc:53:50: error: void value not ignored as it ought to be
   53 |                         int k,l,u;k=read();l=read();
      |                                              ~~~~^~
foo.cc:53:33: warning: unused variable ‘u’ [-Wunused-variable]
   53 |                         int k,l,u;k=read();l=read();
      |                                 ^
foo.cc:61:37: error: void value not ignored as it ought to be
   61 |                         int f;f=read();
      |                                 ~~~~^~

信息

递交者
类型
递交
题目
P2433 插入排序
语言
C++
递交时间
2025-07-19 13:30:40
评测时间
2025-07-19 13:30:40
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes