# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1041743 | kheira | Memory (IOI10_memory) | C++14 | 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 "grader.h"
#include "memory.h"
#include <map>
#include <vector>
using namespace std;
void play() {
unordered_map<char, vector<int>> Cards;
vector<pair<int, int>> matchedCards;
for (int C = 1; C <= 50; ++C) {
char letterCard = faceup(C);
if (Cards.find(letterCard) != Cards.end()) {
int previousCard = Cards[letterCard][0];
matchedCards.push_back(make_pair(previousCard, C));
faceup(previousCard);
faceup(C);
}
else {
Cards[letterCard].push_back(C);
}
}
}