# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
104655 | MatesV13 | Karte (COCI15_karte) | C++11 | 3 ms | 384 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
string s; char a, b, c;
int d;
set<int> n[100];
int main (){
ios::sync_with_stdio(0);
cin.tie(0);
cin >> s;
for (int i=0;i<s.size();i+=3){
a=s[i];
b=s[i+1];
c=s[i+2];
d=0;
if (b=='1') d=10;
for (char i = '0';i<='9';i++) if (c==i) d += (int)i - (int)'0';
n[a].insert(d);
}
if (n['P'].size() + n['K'].size() + n['H'].size() + n['T'].size() != (s.size()/3)) cout << "GRESKA";
else cout << 13 - n['P'].size() << " " << 13 - n['K'].size() << " " << 13 - n['H'].size() << " " << 13 - n['T'].size();
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |