Submission #502147

#TimeUsernameProblemLanguageResultExecution timeMemory
502147dnauxMemory (IOI10_memory)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "grader.h"
#include "memory.h"

using namespace std;;

void play(){
   map<char,int> mymp;
   vector<pair<int,int>> ans;
   for(int i = 1; i <= 50; i++){
      char c = faceup(i);
      if(mymp[c])ans.pb(mp(mymp[c],i));
      else mymp[c] = i;
   }
   for(auto i:ans){
      faceup(i.first);
      faceup(i.second);
   }
   return;
}

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:12:22: error: 'class std::vector<std::pair<int, int> >' has no member named 'pb'
   12 |       if(mymp[c])ans.pb(mp(mymp[c],i));
      |                      ^~
memory.cpp:12:25: error: 'mp' was not declared in this scope
   12 |       if(mymp[c])ans.pb(mp(mymp[c],i));
      |                         ^~