QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#324801#8237. Sugar Sweet IIucup-team244#Compile Error//C++142.6kb2024-02-11 00:25:432024-02-11 00:25:43

详细

answer.code: In function ‘void solve()’:
answer.code:47:17: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘std::pair<int, int>*’ [-Wformat=]
   47 |         scanf("%d",&p[i].x);
      |                ~^
      |                 |
      |                 int*
answer.code:3:11: error: cannot convert ‘std::pair<int, int>’ to ‘int’ in assignment
    3 | #define x first
      |           ^
      |           |
      |           std::pair<int, int>
answer.code:48:19: note: in expansion of macro ‘x’
   48 |         a[i]=p[i].x;
      |                   ^
answer.code:73:18: error: ‘i’ was not declared in this scope
   73 |         if(vis[p[i].y])continue;
      |                  ^
answer.code:74:15: error: ‘i’ was not declared in this scope
   74 |         vis[p[i].y]=1;
      |               ^
answer.code:42:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   42 |     scanf("%d",&n);
      |     ~~~~~^~~~~~~~~
answer.code:47:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   47 |         scanf("%d",&p[i].x);
      |         ~~~~~^~~~~~~~~~~~~~
answer.code:52:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   52 |         scanf("%d",&b[i]);
      |         ~~~~~^~~~~~~~~~~~
answer.code:56:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   56 |         scanf("%d",&w[i]);
      |         ~~~~~^~~~~~~~~~~~
answer.code: In function ‘int main()’:
answer.code:102:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  102 |     scanf("%d",&t);
      |     ~~~~~^~~~~~~~~