-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path10530.cpp
49 lines (48 loc) · 1.13 KB
/
10530.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<map>
#include<vector>
#include<stack>
#include<queue>
using namespace std;
int i,cases,n,res,g,a,A[11];
char B[50];
int main(){
//freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);
while(scanf("%d",&a)!=EOF){
//printf("a==%d\n",a);
if(a==0){
//printf("dhukse\n");
break;
}
getchar();
gets(B);
string b=B;
if(b=="too low"){
for(i=a;i>=1;i--){
A[i]=-1;
//printf("ekhon %d==%d\n",i,A[i]);
}
}
else if(b=="too high"){
for(i=a;i<=10;i++){
A[i]=-1;
//printf("ekhon %d==%d\n",A[i]);
}
}
else{
//printf("a==%d\n",A[a]);
if(A[a]==-1){
printf("Stan is dishonest\n");
}
else{
printf("Stan may be honest\n");
}
for(i=1;i<=10;i++)A[i]=0;
}
}
}