| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 382129 | BlancaHM | Karte (COCI15_karte) | C++14 | 1 ms | 492 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 <iostream>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
	string S;
	cin >> S;
	map<char, vector<bool>> cards;
	cards['P'] = vector<bool>(13, false);
	cards['K'] = vector<bool>(13, false);
	cards['H'] = vector<bool>(13, false);
	cards['T'] = vector<bool>(13, false);
	bool greska = false;
	for (int i = 0; i < (int) S.size(); i += 3) {
		int cardsNum = (S[i+1]-'0')*10 + S[i+2]-'0';
		if (cards[S[i]][cardsNum - 1]) {
			greska = true;
			break;
		}
		cards[S[i]][cardsNum-1] = true;
	}
	if (greska)
		cout << "GRESKA";
	else {
		cout << count(cards['P'].begin(), cards['P'].end(), false);
		cout << " " << count(cards['K'].begin(), cards['K'].end(), false);
		cout << " " << count(cards['H'].begin(), cards['H'].end(), false);
		cout << " " << count(cards['T'].begin(), cards['T'].end(), false);
	}
	return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
