QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#430065#7008. Rikka with Nice Counting Striking Backucup-team2335Compile Error//C++144.0kb2024-06-03 13:07:032024-06-03 13:07:04

詳細信息

answer.code: In function ‘ull gethsh(int, int)’:
answer.code:179:54: error: invalid operands of types ‘long long int’ and ‘int [2]’ to binary ‘operator%’
  179 |         int x=(hsh[0][r]-1ll*hsh[0][l-1]*pw[0][r-l+1]%mod+mod)%mod;
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
      |                                         |             |
      |                                         long long int int [2]
answer.code:180:54: error: invalid operands of types ‘long long int’ and ‘int [2]’ to binary ‘operator%’
  180 |         int y=(hsh[1][r]-1ll*hsh[1][l-1]*pw[1][r-l+1]%mod+mod)%mod;
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
      |                                         |             |
      |                                         long long int int [2]
answer.code: In function ‘void setfile()’:
answer.code:9:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |         freopen("string.in","r",stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
answer.code:10:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |         freopen("string.out","w",stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
answer.code: In function ‘int Runs::cmp(int, int)’:
answer.code:121:9: warning: control reaches end of non-void function [-Wreturn-type]
  121 |         }
      |         ^