제출 #1174945

#제출 시각아이디문제언어결과실행 시간메모리
1174945vahagngMemory (IOI10_memory)C++20
컴파일 에러
0 ms0 KiB
#include "grader.h"
#include <bits/stdc++.h>
#include "memory.h"

vector<int>v[26];

void play() {
   for(int i = 0; i < 26; i++){
      v[i].clear();
   }
   for(int i = 1; i < 50; i+=2){
      char c = faceup(i);
      v[c - 'A'].push_back(i);
      c = faceup(i+1);
      v[c-'A'].push_back(i+1);
   }
   for(int i = 0; i < 25; i++){
      if(v[i].size() < 2) continue;
      faceup(v[i][0]);
      faceup(v[i][1]);
   }
}

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

memory.cpp:5:1: error: 'vector' does not name a type
    5 | vector<int>v[26];
      | ^~~~~~
memory.cpp: In function 'void play()':
memory.cpp:9:7: error: 'v' was not declared in this scope
    9 |       v[i].clear();
      |       ^
memory.cpp:13:7: error: 'v' was not declared in this scope
   13 |       v[c - 'A'].push_back(i);
      |       ^
memory.cpp:18:10: error: 'v' was not declared in this scope
   18 |       if(v[i].size() < 2) continue;
      |          ^
memory.cpp:19:14: error: 'v' was not declared in this scope
   19 |       faceup(v[i][0]);
      |              ^