답안 #201879

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
201879 2020-02-12T17:40:18 Z Leonardo_Paes Memory (IOI10_memory) C++17
컴파일 오류
0 ms 0 KB
#include "grader.h"
#include "memory.h"
#include <bits/stdc++.h>

vector<int> p[26];
 
void play() {
    int i=1, j=50, a;
    while(i<j){
        a = faceup(i);
        p[a].push_back(i);
        a = faceup(j);
        p[a].push_back(j);
        i++, j--;
    }
    for(int i=1; i<=26; i++){
        faceup(p[i][0]); faceup(p[i][1]);
    }
}

Compilation message

memory.cpp:5:1: error: 'vector' does not name a type; did you mean 'wctob'?
 vector<int> p[26];
 ^~~~~~
 wctob
memory.cpp: In function 'void play()':
memory.cpp:11:9: error: 'p' was not declared in this scope
         p[a].push_back(i);
         ^
memory.cpp:17:16: error: 'p' was not declared in this scope
         faceup(p[i][0]); faceup(p[i][1]);
                ^