QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#675022#5465. Maximum GCDZhangYiDeCompile Error//C++989.4kb2024-10-25 17:51:172024-10-25 17:51:18

Details

answer.code:9:59: error: ‘>>’ should be ‘> >’ within a nested template argument list
    9 | typedef tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, tree_order_statistics_node_update> ordered_set_s;
      |                                                           ^~
      |                                                           > >
answer.code:10:65: error: ‘>>’ should be ‘> >’ within a nested template argument list
   10 | typedef tree<pair<int, int>, null_type, less_equal<pair<int, int>>, rb_tree_tag, tree_order_statistics_node_update> ordered_set_s2;
      |                                                                 ^~
      |                                                                 > >
answer.code: In function ‘void pri(std::vector<int>)’:
answer.code:108:15: error: ‘it’ does not name a type; did you mean ‘int’?
  108 |     for (auto it : v)
      |               ^~
      |               int
answer.code:109:27: error: expected ‘;’ before ‘cout’
  109 |         cout << it << ' ';
      |                           ^
      |                           ;
  110 |     cout << endl;
      |     ~~~~                   
answer.code:111:1: error: expected primary-expression before ‘}’ token
  111 | }
      | ^
answer.code:110:18: error: expected ‘)’ before ‘}’ token
  110 |     cout << endl;
      |                  ^
      |                  )
  111 | }
      | ~                 
answer.code:108:9: note: to match this ‘(’
  108 |     for (auto it : v)
      |         ^
answer.code:111:1: error: expected primary-expression before ‘}’ token
  111 | }
      | ^
answer.code: In function ‘void pro(std::vector<long long int>)’:
answer.code:114:15: error: ‘it’ does not name a type; did you mean ‘int’?
  114 |     for (auto it : v)
      |               ^~
      |               int
answer.code:115:27: error: expected ‘;’ before ‘cout’
  115 |         cout << it << ' ';
      |                           ^
      |                           ;
  116 |     cout << endl;
      |     ~~~~                   
answer.code:117:1: error: expected primary-expression before ‘}’ token
  117 | }
      | ^
answer.code:116:18: error: expected ‘)’ before ‘}’ token
  116 |     cout << endl;
      |                  ^
      |                  )
  117 | }
      | ~                 
answer.code:114:9: note: to match this ‘(’
  114 |     for (auto it : v)
      |         ^
answer.code:117:1: error: expected primary-expression before ‘}’ token
  117 | }
      | ^
answer.code: At global scope:
answer.code:187:34: error: ‘>>’ should be ‘> >’ within a nested template argument list
  187 | bool comp1(pair<int, pair<int,int>>x, pair<int, pair<int,int>>y)
      |                                  ^~
      |                                  > >
answer.code:187:61: error: ‘>>’ should be ‘> >’ within a nested template argument list
  187 | bool comp1(pair<int, pair<int,int>>x, pair<int, pair<int,int>>y)
      |                                                             ^~
      |                                                             > >
answer.code:201:34: error: ‘>>’ should be ‘> >’ within a nested template argument list
  201 | bool comp2(pair<int, pair<int,int>>x, pair<int, pair<int,int>>y)
      |                                  ^~
      |                                  > >
answer.code:201:61: error: ‘>>’ should be ‘> >’ within a nested template argument list
  201 | bool comp2(pair<int, pair<int,int>>x, pair<int, pair<int,int>>y)
      |                                                             ^~
      |                                                             > >
answer.code: In function ‘std::string lcs(const std::vector<std::__cxx11::basic_string<char> >&)’:
answer.code:238:16: error: ISO C++ forbids declaration of ‘str’ with no type [-fpermissive]
  238 |     for (auto& str : strs) backs.push_back(str.crbegin());
      |                ^~~
answer.code:238:22: warning: range-based ‘for’ loops only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
  238 |     for (auto& str : strs) backs.push_back(str.crbegin());
      |                      ^~~~
answer.code:238:22: error: forming reference to reference type ‘const std::vector<std::__cxx11::basic_string<char> >&’
answer.code:238:48: error: request for member ‘crbegin’ in ‘str’, which is of non-class type ‘int’
  238 |     for (auto& str : strs) backs.push_back(str.crbegin());
      |                                                ^~~~~~~
answer.code:239:32: error: ‘const class std::__cxx11::basic_string<char>’ has no member named ‘crend’; did you mean ‘rend’?
  239 |     while (backs[0] != strs[0].crend()) {
      |                                ^~~~~
      |                                rend
answer.code:242:37: error: ‘const class std::__cxx11::basic_string<char>’ has no member named ‘crend’; did you mean ‘rend’?
  242 |             if (backs[i] == strs[i].crend()) goto done;
      |                                     ^~~~~
  ...