# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
154002 | RaresRosca | Karte (COCI15_karte) | C++14 | 3 ms | 376 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <cstring>
using namespace std;
int nr,n,i,p,k,h,t,a[50][20],ok=1;
char s[1010],crt;
int main(){
cin>>s;
n=strlen(s);
crt='A';
for(i=0;i<=n;i++){
if(!(s[i]>='0'&&s[i]<='9')){
if(s[i]=='P')
p++;
if(s[i]=='K')
k++;
if(s[i]=='H')
h++;
if(s[i]=='T')
t++;
if(a[crt-'0'][nr]==0)
a[crt-'0'][nr]=1;
else{
ok=0;
break;
}
crt=s[i];
nr=0;
}else{
nr=nr*10+(s[i]-'0');
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |