QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#152985 | #6521. Swapping Operation | alch07 | Compile Error | / | / | C++14 | 3.2kb | 2023-08-29 05:14:36 | 2023-08-29 05:14:37 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code: In function ‘int construct(int, int)’: answer.code:27:1: warning: no return statement in function returning non-void [-Wreturn-type] 27 | } | ^ answer.code: In function ‘void queryAnd(int, int, int, int, int)’: answer.code:31:23: error: return-statement with a value, in function returning ‘void’ [-fpermissive] 31 | return val[cur]; | ~~~~~~~^ answer.code:33:16: error: return-statement with a value, in function returning ‘void’ [-fpermissive] 33 | return mx; | ^~ answer.code:35:54: error: invalid operands of types ‘void’ and ‘void’ to binary ‘operator&’ 35 | return queryAnd(lc[cur], l, (l+r)/2, fl, fr) & queryAnd(rc[cur], (l+r)/2+1, r, fl, fr); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | void void answer.code: In function ‘void solve()’: answer.code:50:27: error: void value not ignored as it ought to be 50 | pand[i] = queryAnd(root, 0, n-1, 0, i-1); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ answer.code:53:27: error: void value not ignored as it ought to be 53 | sand[i] = queryAnd(root, 0, n-1, i, n-1); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ answer.code:61:5: error: ‘vector’ was not declared in this scope 61 | vector <int> iPre; | ^~~~~~ answer.code:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? 1 | #include <iostream> +++ |+#include <vector> 2 | answer.code:61:13: error: expected primary-expression before ‘int’ 61 | vector <int> iPre; | ^~~ answer.code:62:13: error: expected primary-expression before ‘int’ 62 | vector <int> iSuf; | ^~~ answer.code:65:13: error: ‘iPre’ was not declared in this scope 65 | iPre.push_back(i); | ^~~~ answer.code:71:13: error: ‘iSuf’ was not declared in this scope 71 | iSuf.push_back(i); | ^~~~ answer.code:79:53: error: invalid operands of types ‘void’ and ‘void’ to binary ‘operator+’ 79 | ans = max(ans, queryAnd(root, 0, n-1, 0, i) + queryAnd(root, 0, n-1, i+1, n-1)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | void void answer.code:83:24: error: ‘iPre’ was not declared in this scope 83 | for(int j = 0; j < iPre.size(); j++){ | ^~~~ answer.code:84:28: error: ‘iSuf’ was not declared in this scope 84 | for(int k = 0; k < iSuf.size(); k++){ | ^~~~ answer.code:91:43: error: ‘arr’ was not declared in this scope; did you mean ‘sarr’? 91 | parr[i] = parr[i-1] & arr[i-1]; | ^~~ | sarr answer.code:94:43: error: ‘arr’ was not declared in this scope; did you mean ‘sarr’? 94 | sarr[i] = sarr[i+1] & arr[i]; | ^~~ | sarr answer.code:105:24: error: ‘iPre’ was not declared in this scope 105 | for(int i = 0; i < iPre.size(); i++){ | ^~~~ answer.code:107:14: error: ‘pre’ was not declared in this scope 107 | lAnd[pre[i]] = curLand; | ^~~ answer.code:107:24: error: ‘curLand’ was not declared in this scope; did you mean ‘curLAnd’? 107 | lAnd[pre[i]] = curLand; | ^~~~~~~ | curLAnd answer.code:109:13: error: ‘land’ was not declared in this scope; did you mean ‘lAnd’? 109 | land[j] = land[j-1] & a[j]; | ^~~~ | lAnd answer.code:114:16: error: ‘land’ was not declared in this scope; did you mean ‘lAnd’? 114 | if(land[j-1] != land[j] || i == n-1){ | ^~~~ | lAnd