제출 #1010628

#제출 시각아이디문제언어결과실행 시간메모리
1010628Muaath_5Memory (IOI10_memory)C++17
컴파일 에러
0 ms0 KiB
#include "memory.h"
#include <bits/stdc++.h>
using namespace std;
char faceup(int c);

vector<int> cc[1001];
void play() {
  for (int i = 1; i <= 50; i++)
    cc[faceup(i)-'A'].push_back(i);
  for (int i = 0; i < 50; i++)
  	if (cc.size() == 2)
      	faceup(cc[i][0]), faceup(cc[i][1]);
}

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

memory.cpp: In function 'void play()':
memory.cpp:11:11: error: request for member 'size' in 'cc', which is of non-class type 'std::vector<int> [1001]'
   11 |    if (cc.size() == 2)
      |           ^~~~