Submission #470775

#TimeUsernameProblemLanguageResultExecution timeMemory
470775a_aguiloMemory (IOI10_memory)C++14
Compilation error
0 ms0 KiB
#include "grader.h" #include "memory.h" #include <bits/stdc++.h> using namespace std; void play() { vector <pair <char, int>> data; for (int i = 1; i <= 50; ++i){ char c = faceup (i); data.pus_back(make_pair(c, i)); } sort (data.begin(), data.end()); for (int e = 1; e <= 25; ++e){ char x = faceup(data[2 * e - 1].second); char y = faceup(data[2*e].second); } }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:12:14: error: 'class std::vector<std::pair<char, int> >' has no member named 'pus_back'; did you mean 'push_back'?
   12 |         data.pus_back(make_pair(c, i));
      |              ^~~~~~~~
      |              push_back
memory.cpp:16:14: warning: unused variable 'x' [-Wunused-variable]
   16 |         char x = faceup(data[2 * e - 1].second);
      |              ^
memory.cpp:17:14: warning: unused variable 'y' [-Wunused-variable]
   17 |         char y = faceup(data[2*e].second);
      |              ^