| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1101211 | bvv23 | Karte (COCI15_karte) | C++17 | 1 ms | 508 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// Ahmadov orz
/// successful failure
#include <bits/stdc++.h>
/// #include <ext/pb_ds/assoc_container.hpp>
using namespace std;
/// using namespace __gnu_pbds;
#define int long long
#define pb push_back
#define pii pair<int, int>
#define all(v) v.begin(),v.end()
#define ff first
#define ss second
#define drop(x) cout<<x<<endl;return
// template <class T>
// using isTree = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
/// sometimes you gotta think simple
struct custom_hash {
size_t operator()(uint64_t x) const {
static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
x ^= FIXED_RANDOM;
return x ^ (x >> 16);
}
};
void failure()
{
string s;
cin >> s;
map <char,int> mp;
vector <set<int>> card(4);
mp['P'] = 0;
mp['K'] = 1;
mp['H'] = 2;
mp['T'] = 3;
// card[herf] = ededi
for (int i = 0; i < s.size(); i += 3) {
int eded = (s[i + 1] - '0') * 10 + (s[i + 2] - '0');
if (card[mp[s[i]]].count(eded)) {
drop("GRESKA");
}
card[mp[s[i]]].insert(eded);
}
for (int i = 0; i < 4; i++) {
cout << 13 - card[i].size() << " ";
}
}
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
int tt = 1;
//cin >> tt;
while (tt--)
{
failure();
}
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
