QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#388904#3736. Tree Intersectionucup-team1383Compile Error//C++982.3kb2024-04-13 21:18:572024-04-13 21:18:57

Details

answer.code: In function ‘void dfs(long long int, long long int, long long int)’:
answer.code:74:14: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
   74 |     for(auto [i,j]:ve[x]){
      |              ^
answer.code:74:14: error: ISO C++ forbids declaration of ‘structured binding’ with no type [-fpermissive]
   74 |     for(auto [i,j]:ve[x]){
      |              ^~~~~
answer.code:74:14: error: structured binding declaration cannot be C++98 ‘auto’
answer.code:74:14: error: structured binding declaration cannot have type ‘int’
answer.code:74:14: note: type must be cv-qualified ‘auto’ or reference to cv-qualified ‘auto’
answer.code:74:20: warning: range-based ‘for’ loops only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   74 |     for(auto [i,j]:ve[x]){
      |                    ^~
answer.code:74:24: error: forming reference to reference type ‘std::vector<std::pair<long long int, long long int> >&’
   74 |     for(auto [i,j]:ve[x]){
      |                        ^
answer.code: In function ‘void icealsoheat()’:
answer.code:94:29: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   94 |             ve[l].push_back({r,i});
      |                             ^
answer.code:94:28: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   94 |             ve[l].push_back({r,i});
      |             ~~~~~~~~~~~~~~~^~~~~~~
answer.code:95:29: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   95 |             ve[r].push_back({l,i});
      |                             ^
answer.code:95:28: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   95 |             ve[r].push_back({l,i});
      |             ~~~~~~~~~~~~~~~^~~~~~~