QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#153562#141. 8 染色hyforcesCompile Error//C++201.5kb2023-08-30 11:31:582023-08-30 11:31:59

详细

Bob.code:3:1: error: ‘vector’ does not name a type
    3 | vector<int>adj[MAXN];
      | ^~~~~~
Bob.code: In function ‘std::vector<int> Bob(int, int, std::vector<int>, std::vector<int>, std::vector<int>)’:
Bob.code:7:5: error: ‘vector’ was not declared in this scope
    7 |     vector<int>ret;ret.resize(N,-1);
      |     ^~~~~~
Bob.code:7:5: note: suggested alternatives:
In file included from /usr/include/c++/11/vector:67,
                 from /usr/include/c++/11/functional:62,
                 from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/11/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
                 from Bob.code:1:
/usr/include/c++/11/bits/stl_vector.h:389:11: note:   ‘std::vector’
  389 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
In file included from /usr/include/c++/11/functional:62,
                 from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/11/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
                 from Bob.code:1:
/usr/include/c++/11/vector:86:13: note:   ‘std::pmr::vector’
   86 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
Bob.code:7:12: error: expected primary-expression before ‘int’
    7 |     vector<int>ret;ret.resize(N,-1);
      |            ^~~
Bob.code:7:20: error: ‘ret’ was not declared in this scope
    7 |     vector<int>ret;ret.resize(N,-1);
      |                    ^~~
Bob.code:8:26: error: ‘adj’ was not declared in this scope
    8 |     for(int a=0;a<M;++a){adj[U[a]].push_back(V[a]);adj[V[a]].push_back(U[a]);}
      |                          ^~~
Bob.code:10:32: error: ‘adj’ was not declared in this scope
   10 |     for(int a=0,i=0;a<N;++a)if(adj[a].size()>=8)ic[a]=adj[i]+2*adj[i+1];
      |                                ^~~
Bob.code: In lambda function:
Bob.code:14:17: error: ‘queue’ was not declared in this scope; did you mean ‘std::queue’?
   14 |                 queue<int>bfs;bfs.push(st);ret[st]=2*color;
      |                 ^~~~~
      |                 std::queue
In file included from /usr/include/c++/11/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:86,
                 from Bob.code:1:
/usr/include/c++/11/bits/stl_queue.h:96:11: note: ‘std::queue’ declared here
   96 |     class queue
      |           ^~~~~
Bob.code:14:23: error: expected primary-expression before ‘int’
   14 |                 queue<int>bfs;bfs.push(st);ret[st]=2*color;
      |                       ^~~
Bob.code:14:31: error: ‘bfs’ was not declared in this scope; did you mean ‘ffs’?
   14 |                 queue<int>bfs;bfs.push(st);ret[st]=2*color;
      |                               ^~~
      |                               ffs
Bob.code:18:32: error: ‘adj’ was not declared in this scope
   18 |                     for(auto a:adj[cur])if(ic[a]==color&&!vis[a]){ret[a]=ret[cur]^1;bfs.push(a);}
      |                                ^~~
Bob.code: In function ‘std::vector<int> Bob(int, int, std::vector<int>, std::vector<int>, std::vector<int>)’:
Bob.code:25:20: error: ‘adj’ was not declared in this scope
   25 |         for(auto b:adj[a])if(~ret[b])nok[b]=true;
      |                    ^~~