QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#457226#7123. Robot ContesthyforcesCompile Error//C++203.1kb2024-06-29 09:22:542024-06-29 09:22:57

Details

answer.code:16:1: error: ‘pair’ does not name a type
   16 | pair<int,char>getInstruction(int center,int west,int south,int east,int north){
      | ^~~~
answer.code: In function ‘void program_pulibot()’:
answer.code:86:25: error: ‘pair’ was not declared in this scope; did you mean ‘std::pair’?
   86 |                         pair<int,char>ret=getInstruction(a,b,c,d,e);
      |                         ^~~~
      |                         std::pair
In file included from /usr/include/c++/13/bits/stl_algobase.h:64,
                 from /usr/include/c++/13/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51,
                 from answer.code:1:
/usr/include/c++/13/bits/stl_pair.h:187:12: note: ‘std::pair’ declared here
  187 |     struct pair
      |            ^~~~
answer.code:86:30: error: expected primary-expression before ‘int’
   86 |                         pair<int,char>ret=getInstruction(a,b,c,d,e);
      |                              ^~~
answer.code:87:28: error: ‘ret’ was not declared in this scope
   87 |                         if(ret.first==IMPOSSIBLE)continue;
      |                            ^~~
answer.code:88:53: error: ‘ret’ was not declared in this scope
   88 |                         set_instruction({a,b,c,d,e},ret.first,ret.second);
      |                                                     ^~~