QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#721642 | #9570. Binary Tree | ucup-team5467 | Compile Error | / | / | C++14 | 2.2kb | 2024-11-07 16:31:04 | 2024-11-07 16:31:06 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code: In function ‘void solve()’: answer.code:41:9: error: ‘vector’ was not declared in this scope 41 | vector<bool> st(n+1); | ^~~~~~ answer.code:5:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? 4 | #include <functional> +++ |+#include <vector> 5 | using namespace std; answer.code:41:16: error: expected primary-expression before ‘bool’ 41 | vector<bool> st(n+1); | ^~~~ answer.code:43:23: error: expected primary-expression before ‘int’ 43 | vector<vector<int>> e(n+1); | ^~~ answer.code:44:16: error: expected primary-expression before ‘int’ 44 | vector<int> pre(n+1,0); | ^~~ answer.code:45:16: error: expected primary-expression before ‘int’ 45 | vector<int> d(n+1,0); | ^~~ answer.code:49:26: error: ‘e’ was not declared in this scope 49 | if(x!=0) e[x].push_back(i),e[i].push_back(x); | ^ answer.code:50:26: error: ‘e’ was not declared in this scope 50 | if(y!=0) e[y].push_back(i),e[i].push_back(y); | ^ answer.code: In lambda function: answer.code:54:17: error: ‘pre’ was not declared in this scope 54 | pre[u] = fa; | ^~~ answer.code:55:29: error: ‘e’ was not declared in this scope 55 | for(int v : e[u]){ | ^ answer.code:56:37: error: ‘st’ was not declared in this scope; did you mean ‘std’? 56 | if(v==fa || st[v] == 1) continue; | ^~ | std answer.code:57:25: error: ‘d’ was not declared in this scope 57 | d[v] = d[u] + 1; | ^ answer.code: In function ‘void solve()’: answer.code:67:17: error: ‘d’ was not declared in this scope 67 | d[c] = 0; | ^ answer.code:68:17: error: ‘pre’ was not declared in this scope 68 | pre[c] = 0; | ^~~ answer.code:99:33: error: ‘st’ was not declared in this scope; did you mean ‘ss’? 99 | st[mid] = 1; | ^~ | ss answer.code:102:33: error: ‘st’ was not declared in this scope; did you mean ‘ss’? 102 | st[mid] = 1; | ^~ | ss answer.code:118:33: error: ‘st’ was not declared in this scope; did you mean ‘ss’? 118 | st[mid] = 1; | ^~ | ss answer.code:121:33: error: ‘st’ was not declared in this scope; did you mean ‘ss’? 121 | st[pre[mid]] = 1; | ^~ | ss answer.code:131:25: error: ‘st’ was not declared in this scope; did you mean ‘ss’? 131 | st[pre[mid]] = 1; | ^~ | ss answer.code: In function ‘int check(int, int)’: answer.code:34:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 34 | scanf("%d",&s); | ~~~~~^~~~~~~~~ answer.code: In function ‘int main()’: answer.code:142:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 142 | scanf("%d",&t); | ~~~~~^~~~~~~~~