제출 #470775

#제출 시각아이디문제언어결과실행 시간메모리
470775a_aguiloMemory (IOI10_memory)C++14
컴파일 에러
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); } }

컴파일 시 표준 에러 (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);
      |              ^