| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 382129 | BlancaHM | Karte (COCI15_karte) | C++14 | 1 ms | 492 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... | ||||
