QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#44937 | #4561. Catfish Farm | GuanYunchang | Compile Error | / | / | C++17 | 819b | 2022-08-22 11:47:38 | 2022-08-22 11:47:40 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code:9:17: error: expected ‘,’ or ‘...’ before ‘X’ 9 | bool tsk1(int []X, int M) { | ^ answer.code: In function ‘bool tsk1(int*)’: answer.code:10:23: error: ‘M’ was not declared in this scope 10 | for(int i=0;i<M;i++) { | ^ answer.code:11:20: error: ‘X’ was not declared in this scope 11 | if(X[i] % 2 == 1) return 0; | ^ answer.code: At global scope: answer.code:16:17: error: expected ‘,’ or ‘...’ before ‘X’ 16 | bool tsk2(int []X, int M) { | ^ answer.code: In function ‘bool tsk2(int*)’: answer.code:17:23: error: ‘M’ was not declared in this scope 17 | for(int i=0;i<M;i++) { | ^ answer.code:18:20: error: ‘X’ was not declared in this scope 18 | if(X[i] > 1) return 0; | ^ answer.code: At global scope: answer.code:23:35: error: expected ‘,’ or ‘...’ before ‘X’ 23 | ll max_weights(int N, int M, int[]X, int[]Y, int[]W) { | ^ answer.code: In function ‘ll max_weights(int, int, int*)’: answer.code:25:17: error: ‘X’ was not declared in this scope 25 | if(tsk1(X, M)) { | ^ answer.code:26:45: error: ‘W’ was not declared in this scope 26 | for(int i=0;i<M;i++) ans += W[i]; | ^ answer.code:31:47: error: ‘W’ was not declared in this scope 31 | if(X[i] == 1) val2 += W[i]; | ^ answer.code:32:38: error: ‘W’ was not declared in this scope 32 | else val1 += W[i]; | ^ answer.code: In function ‘int main()’: answer.code:45:17: error: ‘max_weight’ was not declared in this scope; did you mean ‘max_weights’? 45 | cout << max_weight(n, m, x, y, w) << '\n'; | ^~~~~~~~~~ | max_weights