Submission #563297

#TimeUsernameProblemLanguageResultExecution timeMemory
563297JANCARAPANMemory (IOI10_memory)C++17
Compilation error
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;
 

signed main(){
    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;
        }
        faceup(pos1);
        faceup(pos2);
    }
}

Compilation message (stderr)

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