| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1013880 | May27_th | Karte (COCI15_karte) | C++17 | 1 ms | 456 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define i64 long long
#define i128 __int128
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()
void Solve(void) {
string decks; cin >> decks;
vector<set<int>> suits(4);
map<char, int> mp;
mp['P'] = 0; mp['K'] = 1; mp['H'] = 2; mp['T'] = 3;
for (int i = 0; i < (int)decks.size(); i += 3) {
int num = (decks[i + 1] - '0') * 10 + decks[i + 2] - '0';
if (suits[mp[decks[i]]].count(num)) {
cout << "GRESKA";
return;
}
suits[mp[decks[i]]].insert(num);
}
for (int i = 0; i < 4; i ++) {
cout << 13 - suits[i].size() << " ";
}
}
signed main() {
ios_base::sync_with_stdio(false); cin.tie(0);
cout << fixed << setprecision(10);
int Tests = 1; // cin >> Tests;
while (Tests --) {
Solve();
}
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
