-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA_Primary_Task.cpp
More file actions
38 lines (32 loc) · 860 Bytes
/
Copy pathA_Primary_Task.cpp
File metadata and controls
38 lines (32 loc) · 860 Bytes
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
#include <bits/stdc++.h>
using namespace std;
#define yes {cout<<"YES"<<endl;}
#define no {cout<<"NO"<<endl;}
#define ll long long
#define endl '\n';
#define all(x) x.begin(),x.end()
#define rep(i,b,e) for(__typeof(e) i=b-(b>e); i != (e)-(b>e);i+=1-2*(b>e))
// int lcm(int a,int b) { return a / gcd(a,b)*b; }
int nxt(){ int x; cin>>x; return x;}
const int MOD = 1e9 + 7;
#define what_is(x) cerr << #x << " is " << x << endl;
void solve(){
string s; cin >> s;
if( s.size() < 3){
no; return;
}
if( s[0] == '1' && s[1] == '0' && s[2] != '0'){
if( s[2] >= '2' || s.size() > 3 ){
yes; return;
}
}
no;
}
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int t; cin >> t;
while(t--){
solve();
}
}