제출 #595428

#제출 시각아이디문제언어결과실행 시간메모리
595428SlyGaleebMemory (IOI10_memory)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define ld long double
#define F first
#define S second

char faceup (int a);

void play () {
	map<char,vector<int>>mp;
	for (int i = 1; i <= 50; ++i) 
		mp[faceup(i)].push_back(i);
	for (auto c:mp) {
		faceup(c[0]);
		faceup(c[1]);
	}
}

/*int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);


}*/

컴파일 시 표준 에러 (stderr) 메시지

memory.cpp: In function 'void play()':
memory.cpp:15:11: error: no match for 'operator[]' (operand types are 'std::pair<const char, std::vector<int> >' and 'int')
   15 |   faceup(c[0]);
      |           ^
memory.cpp:16:11: error: no match for 'operator[]' (operand types are 'std::pair<const char, std::vector<int> >' and 'int')
   16 |   faceup(c[1]);
      |           ^