제출 #1098684

#제출 시각아이디문제언어결과실행 시간메모리
1098684SulAMemory (IOI10_memory)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define bitcount __builtin_popcountll
using namespace std;
using namespace __gnu_pbds;
using ordered_set = tree<long long,null_type,less_equal<>,rb_tree_tag,tree_order_statistics_node_update>;

void play() {
    vector<int> ind['Z'];
    for (int i = 1; i <= 50; i++) {
        ind[faceup(i)].push_back(i);
    }
    for (char c = 'A'; c <= 'Y'; c++) {
        faceup(ind[c][0]);
        faceup(ind[c][1]);
    }
}

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

memory.cpp: In function 'void play()':
memory.cpp:12:13: error: 'faceup' was not declared in this scope
   12 |         ind[faceup(i)].push_back(i);
      |             ^~~~~~
memory.cpp:15:20: warning: array subscript has type 'char' [-Wchar-subscripts]
   15 |         faceup(ind[c][0]);
      |                    ^
memory.cpp:15:9: error: 'faceup' was not declared in this scope
   15 |         faceup(ind[c][0]);
      |         ^~~~~~
memory.cpp:16:20: warning: array subscript has type 'char' [-Wchar-subscripts]
   16 |         faceup(ind[c][1]);
      |                    ^