Submission #100387

#TimeUsernameProblemLanguageResultExecution timeMemory
100387AKaan37Karte (COCI15_karte)C++17
50 / 50
7 ms5120 KiB
//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 timeMemoryGrader output
Fetching results...