QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#391357#7936. Eliminate TreeHuangHanShengCompile Error//C++982.9kb2024-04-16 15:49:052024-04-16 15:49:06

Details

answer.code: In function ‘void Test_Case()’:
answer.code:47:20: error: ISO C++ forbids declaration of ‘v’ with no type [-fpermissive]
   47 |         for(auto & v : g[u]){
      |                    ^
answer.code:47:24: warning: range-based ‘for’ loops only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   47 |         for(auto & v : g[u]){
      |                        ^
answer.code:47:27: error: forming reference to reference type ‘std::vector<int>&’
   47 |         for(auto & v : g[u]){
      |                           ^
answer.code:54:32: error: ISO C++ forbids declaration of ‘it’ with no type [-fpermissive]
   54 |                     for(auto & it : g[v]){
      |                                ^~
answer.code:54:37: warning: range-based ‘for’ loops only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   54 |                     for(auto & it : g[v]){
      |                                     ^
answer.code:54:40: error: forming reference to reference type ‘std::vector<int>&’
   54 |                     for(auto & it : g[v]){
      |                                        ^