제출 #563298

#제출 시각아이디문제언어결과실행 시간메모리
563298JANCARAPANMemory (IOI10_memory)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define ii pair<int,int> #define vi vector<int> #define vvi vector<vi> #define vvii vector<vector<ii>> #define pb push_back #define vpi vector<ii> #define forcin for(int i = 0; i<n; ++i) cin>>v[i]; #define pq priority_queue<ii> #define mp make_pair #define ld long double #define all(a) (a).begin(),(a).end() #define print(v) for (auto e : v) cout << e << " "; #define endl '\n' const int INF = LLONG_MAX; const int MOD = 1000000007; const int MAXN = 100005; void play(){ map<int,char> m; int ans = 0; for (int i=1; i<=50; i++){ char c = faceup(i); m[i] = c; } for (char c = 'a'; c<='y'; c++){ int pos1=-1, pos2=-1; for (auto e : m){ if (e.second == c && pos1 == -1) pos1 = e.first; else pos2 = e.first; } char f = faceup(pos1); char k = faceup(pos2); } }

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

memory.cpp: In function 'void play()':
memory.cpp:29:18: error: 'faceup' was not declared in this scope
   29 |         char c = faceup(i);
      |                  ^~~~~~
memory.cpp:38:18: error: 'faceup' was not declared in this scope
   38 |         char f = faceup(pos1);
      |                  ^~~~~~
memory.cpp:38:14: warning: unused variable 'f' [-Wunused-variable]
   38 |         char f = faceup(pos1);
      |              ^
memory.cpp:39:14: warning: unused variable 'k' [-Wunused-variable]
   39 |         char k = faceup(pos2);
      |              ^
memory.cpp:27:9: warning: unused variable 'ans' [-Wunused-variable]
   27 |     int ans = 0;
      |         ^~~