제출 #1304444

#제출 시각아이디문제언어결과실행 시간메모리
1304444lunarechoMemory (IOI10_memory)C++20
100 / 100
2 ms412 KiB
#include "grader.h"
#include "memory.h"
#include <bits/stdc++.h>
using namespace std;

void play() {
   map<char, int> pos1, pos2;
   map<char, bool> did;
   for(int i=0;i<25;++i) {
      char a = faceup(2 * i + 1), b = faceup(2 * i + 2);
      if(a == b) {
         did[a] = true; 
      } else {
         if(pos1.find(a) == pos1.end()) {
            pos1[a] = 2 * i + 1;
         } else {
            pos2[a] = 2 * i + 1;
         }
         if(pos1.find(b) == pos1.end()) {
            pos1[b] = 2 * i + 2;
         } else {
            pos2[b] = 2 * i + 2;
         }
      }
   }
   for(char ch='A';ch<='Y';++ch) {
      if(!did[ch]) {
         faceup(pos1[ch]);
         faceup(pos2[ch]);
      }
   }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...