# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
739994 | 2023-05-11T19:51:57 Z | unexpectedbro | Karte (COCI15_karte) | C++14 | 1 ms | 212 KB |
#include <bits/stdc++.h> using namespace std; #define fast ios::sync_with_stdio(false);cin.tie(nullptr); #define ll long long #define pb push_back #define all(a) a.begin(),a.end() /* 3 P01K02H03H04 H02H10P11H02 P10K10H10T01 */ const int maxn=20; bool vis[maxn][maxn]; int getcolor(char c){ if(c=='P'){ return 0; } if(c=='K'){ return 1; } if(c=='H'){ return 2; } if(c=='T'){ return 3; } } void solve() { string s; cin >> s; for(int i=0;i<20;i++){ for(int j=0;j<20;j++){ vis[i][j]=0; } } for(int i=0;i<s.size();i+=3){ int b=getcolor(s[i]); int x=(s[i+1]-'0')*10+(s[i+2]-'0'); if(vis[b][x]){ cout<<"GRESKA"<<endl; return; } vis[b][x]=true; } for(int i=0;i<4;i++){ int cnt=0; for(int j=1;j<=13;j++){ cnt+=vis[i][j]; } cout<<13-cnt<<" "; } cout<<endl; } int main() { fast int tc; cin >> tc; while (tc--) { solve(); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Incorrect | 0 ms | 212 KB | Output isn't correct |
3 | Incorrect | 0 ms | 212 KB | Output isn't correct |
4 | Incorrect | 0 ms | 212 KB | Output isn't correct |
5 | Incorrect | 0 ms | 212 KB | Output isn't correct |
6 | Incorrect | 0 ms | 212 KB | Output isn't correct |
7 | Incorrect | 0 ms | 212 KB | Output isn't correct |
8 | Incorrect | 0 ms | 212 KB | Output isn't correct |
9 | Incorrect | 1 ms | 212 KB | Output isn't correct |
10 | Incorrect | 1 ms | 212 KB | Output isn't correct |