# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
563297 | JANCARAPAN | Memory (IOI10_memory) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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);
}
}