Submission #776782

#TimeUsernameProblemLanguageResultExecution timeMemory
776782mindiyakMemory (IOI10_memory)C++14
0 / 100
1 ms208 KiB
#include "grader.h" #include "memory.h" #include <vector> #include <iostream> using namespace std; void play() { vector<int> left(26,-1); vector<int> right(26,-1); vector<bool> solved(26,false); for (int i=0;i<25;i++) { char a = faceup((i*2)+1); char b = faceup((i*2)+2); // cout << (i*2)+1 << " " << (i*2)+2 << " " << a << " " << b << endl; if(left[a-'A'] != -1){ right[a-'A'] = (i*2)+1; }else{ left[a-'A'] = (i*2)+1; } if(left[b-'A'] != -1){ right[b-'A'] = (i*2)+1; }else{ left[b-'A'] = (i*2)+1; } if(a==b){ solved[a-'A'] = true; } } // for(int i = 0;i < 26;i++){ // cout << left[i] << " " << right[i] << " " << solved[i] << endl; // } for(int i = 0;i < 26;i++){ if(solved[i] == 0){ faceup(left[i]); faceup(right[i]); } // cout << left[i] << " " << right[i] << " " << solved[i] << endl; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...