QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#409676#4829. Mark on a Graphucup-team1332#Compile Error//C++981.2kb2024-05-12 15:17:022024-05-12 15:17:02

Details

answer.code: In function ‘int main()’:
answer.code:27:21: error: in C++98 ‘vec’ must be initialized by constructor, not by ‘{...}’
   27 |         vector<int> vec={u,v,x,y};
      |                     ^~~
answer.code:27:33: error: could not convert ‘{u, v, x, y}’ from ‘<brace-enclosed initializer list>’ to ‘std::vector<int>’
   27 |         vector<int> vec={u,v,x,y};
      |                                 ^
      |                                 |
      |                                 <brace-enclosed initializer list>
answer.code:38:15: warning: range-based ‘for’ loops only available with ‘-std=c++11’ or ‘-std=gnu++11’
   38 |     for(int x:st)
      |               ^~
answer.code:38:15: error: forming reference to reference type ‘std::set<int>&’
answer.code:11:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |     scanf("%d%d",&n,&m);
      |     ~~~~~^~~~~~~~~~~~~~
answer.code:15:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   15 |         scanf("%d%d",&x,&y);
      |         ~~~~~^~~~~~~~~~~~~~