/ Vijos /

记录详情

Compile Error

foo.cc: In function 'void Merge(node*, node, node&)':
foo.cc:91:8: error: no match for 'operator=' (operand types are 'node' and 'node*')
   91 | t = pt ++ ;
      |        ^~
foo.cc:21:8: note: candidate: 'node& node::operator=(const node&)'
   21 | struct node {
      |        ^~~~
foo.cc:21:8: note:   no known conversion for argument 1 from 'node*' to 'const node&'
foo.cc:21:8: note: candidate: 'node& node::operator=(node&&)'
foo.cc:21:8: note:   no known conversion for argument 1 from 'node*' to 'node&&'
foo.cc:92:3: error: base operand of '->' has non-pointer type 'node'
   92 | t -> l = l -> l , t -> r = l -> r , t -> mid = l -> mid , t -> g = gcd( l -> g , r -> g ) ;
      |   ^~
foo.cc:92:21: error: base operand of '->' has non-pointer type 'node'
   92 | t -> l = l -> l , t -> r = l -> r , t -> mid = l -> mid , t -> g = gcd( l -> g , r -> g ) ;
      |                     ^~
foo.cc:92:39: error: base operand of '->' has non-pointer type 'node'
   92 | t -> l = l -> l , t -> r = l -> r , t -> mid = l -> mid , t -> g = gcd( l -> g , r -> g ) ;
      |                                       ^~
foo.cc:92:61: error: base operand of '->' has non-pointer type 'node'
   92 | t -> l = l -> l , t -> r = l -> r , t -> mid = l -> mid , t -> g = gcd( l -> g , r -> g ) ;
      |                                                             ^~
foo.cc:92:84: error: base operand of '->' has non-pointer type 'node'
   92 | t -> l = l -> l , t -> r = l -> r , t -> mid = l -> mid , t -> g = gcd( l -> g , r -> g ) ;
      |                                                                                    ^~
foo.cc:93:8: error: base operand of '->' has non-pointer type 'node'
   93 | if ( t -> l == t -> r ) return ;
      |        ^~
foo.cc:93:18: error: base operand of '->' has non-pointer type 'node'
   93 | if ( t -> l == t -> r ) return ;
      |                  ^~
foo.cc:94:20: error: base operand of '->' has non-pointer type 'node'
   94 | Merge( l -> lc , r -> lc , t -> lc ) , Merge( l -> rc , r -> rc , t -> rc ) ;
      |                    ^~
foo.cc:94:30: error: base operand of '->' has non-pointer type 'node'
   94 | Merge( l -> lc , r -> lc , t -> lc ) , Merge( l -> rc , r -> rc , t -> rc ) ;
      |                              ^~
foo.cc:94:59: error: base operand of '->' has non-pointer type 'node'
   94 | Merge( l -> lc , r -> lc , t -> lc ) , Merge( l -> rc , r -> rc , t -> rc ) ;
      |                                                           ^~
foo.cc:94:69: error: base operand of '->' has non-pointer type 'node'
   94 | Merge( l -> lc , r -> lc , t -> lc ) , Merge( l -> rc , r -> rc , t -> rc ) ;
      |                                                                     ^~
foo.cc: In function 'void Build(int, int, Node*&)':
foo.cc:107:34: error: could not convert 't->Node::rc->Node::t' from 'node*' to 'node'
  107 | Merge( t -> lc -> t , t -> rc -> t , t -> t ) ;
      |                       ~~~~~~~~~~~^
      |                                  |
      |                                  node*
foo.cc: In function 'int main()':
foo.cc:158:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  158 | scanf( "%d%d%d%d%d" , &n , &m , &px , &py , &q ) ;
      | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:160:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  160 | rep( i , n ) rep( j , m ) scanf( "%lld" , &a[ chose( i , j ) ] ) ;
      |                           ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:172:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  172 | scanf( "%d" , &z ) ;
      | ~~~~~^~~~~~~~~~~~~
foo.cc:174:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  174 | scanf( "%d%d%d%d" , &l , &x , &r , &y ) ;
      | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:177:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  177 | scanf( "%d%d%d%d%lld" , &l , &x , &r , &y , &d ) ;
      | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1806 魔幻棋盘
语言
C++
递交时间
2022-02-27 19:52:57
评测时间
2022-02-27 19:52:57
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes