# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
100387 |
2019-03-10T20:32:08 Z |
AKaan37 |
Karte (COCI15_karte) |
C++17 |
|
7 ms |
5120 KB |
//Sani buyuk Osman Pasa Plevneden cikmam diyor.
//Bismillahirrahmanirrahim
#include <bits/stdc++.h>
using namespace std;
typedef long long int lo;
typedef pair< int,int > PII;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(int i=1;i<=n;i++)
#define mid (bas+son)/2
const lo MAX = -1000000000000000000;
const lo MIN = 1000000000000000000;
const lo inf = 1000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 100005;
const lo mod = 1000000007;
int n,m,cev,b,a[li],k,P,K,T,H;
string s;
vector<int> v;
map<int,int> mpp[li];
int main(){
cin>>s;
for(int i=0;i<(int)s.size();i+=3){
if(mpp[(s[i+1]-'0')*10+(s[i+2]-'0')][s[i]]==1){printf("GRESKA\n");return 0;}
mpp[(s[i+1]-'0')*10+(s[i+2]-'0')][s[i]]=1;
//~ cout<<s[i]<<" "<<s[i+1]<<" "<<s[i+2]<<end
}
for(int i=1;i<=13;i++){
if(mpp[i]['P']==0) P++;
}
for(int i=1;i<=13;i++){
if(mpp[i]['H']==0) H++;
//~ cout<<mpp[i]['H']<<endl;
}
for(int i=1;i<=13;i++){
if(mpp[i]['K']==0) K++;
}
for(int i=1;i<=13;i++){
if(mpp[i]['T']==0) T++;
}
printf("%d %d %d %d\n",P,K,H,T);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
4992 KB |
Output is correct |
2 |
Correct |
7 ms |
4992 KB |
Output is correct |
3 |
Correct |
7 ms |
4992 KB |
Output is correct |
4 |
Correct |
7 ms |
4992 KB |
Output is correct |
5 |
Correct |
7 ms |
4992 KB |
Output is correct |
6 |
Correct |
6 ms |
4992 KB |
Output is correct |
7 |
Correct |
6 ms |
4992 KB |
Output is correct |
8 |
Correct |
6 ms |
4992 KB |
Output is correct |
9 |
Correct |
7 ms |
5120 KB |
Output is correct |
10 |
Correct |
6 ms |
4992 KB |
Output is correct |