답안 #650453

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
650453 2022-10-13T19:26:16 Z ktkerem Karte (COCI15_karte) C++17
30 / 50
1 ms 212 KB
/*#pragma GCC target ("avx2")
#pragma GCC optimize ("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")/**/
#include<bits/stdc++.h>
/**/
//typedef int ll;
typedef long long ll;
typedef unsigned long long ull;
/*typedef __int128 vll;
typedef unsigned __int128 uvll;*/
#define llll std::pair<ll , ll>
#define pb push_back
#define pf push_front
#define halo cout << "hello\n"
#define fi first
#define sec second
#define all(a) a.begin() , a.end()
const ll limit = 1e15+7; 
const ll ous = 2e5 + 7;
const ll dx[4] = {-1 , 0 , 1 , 0} , dy[4] = {0,1,0,-1};
std::vector<ll> ar;
ll n;
void solve(){
    std::string h;std::cin >> h;
    ll n = h.size();
    std::map<ll , ll> mp;
    ll sp = 13, H = 13 , k = 13, t= 13;
    for(ll i=0;n>i;i+=3){
        ll p = h[i] * (((h[i+1]-'0')*10) + h[i+2] - '0');
        //std::cout << h[i] << "\n";
        if(mp[p] == 1){
            std::cout << "GRESKA\n";
            return;
        }
        mp[p] = 1;
        if(h[i] == 'P'){
            sp--;
            //std::cout << p << "\n";
        }
        else if(h[i] == 'K'){
            k--;
        }
        else if(h[i] == 'H'){
            H--;
        }
        else{
            t--;
        }
    }
    std::cout << sp << " " << k << " " << H << " " << t << "\n";
    return;/**/
}
signed main(){
    std::ios_base::sync_with_stdio(false);std::cin.tie(NULL);
    ll t=1;
    //std::cin >> t;
    ll o = 1;
    while(t--){ 
        //cout << "Case " << o++ << ":\n";
        solve();
    }
    return 0;
}

Compilation message

karte.cpp:5:78: warning: "/*" within comment [-Wcomment]
    5 | #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")/**/
      |                                                                               
karte.cpp: In function 'int main()':
karte.cpp:59:8: warning: unused variable 'o' [-Wunused-variable]
   59 |     ll o = 1;
      |        ^
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Incorrect 1 ms 212 KB Output isn't correct
7 Incorrect 1 ms 212 KB Output isn't correct
8 Incorrect 1 ms 212 KB Output isn't correct
9 Incorrect 1 ms 212 KB Output isn't correct
10 Correct 1 ms 212 KB Output is correct