-
Notifications
You must be signed in to change notification settings - Fork 0
/
LUCKYNUM.cpp
64 lines (55 loc) · 2.02 KB
/
LUCKYNUM.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Problem: Lucky Number
// Contest: CodeChef - SnackDown 2021 - Online Qualifiers
// URL: https://www.codechef.com/SNCKQL21/problems/LUCKYNUM
// Memory Limit: 256 MB
// Time Limit: 500 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wsign-compare"
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std ;
#define Pi 2*acos(0.0)
#define ll long long
#define pb push_back
#define mp make_pair
#define MAX 500006
#define MAX1 10000008
#define mem(a,v) memset(a,v,sizeof(a))
#define lcm(a, b) ((a)*((b)/__gcd(a,b)))
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
void fastIO (){ios_base::sync_with_stdio(false);cin.tie(0); cout.precision(20);}
template<class T> using oset=tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
// order_of_key returns the 0 based position of a value
// find_by_order returns a pointer pointing at the kth element
// also 0 indexed
ll A[MAX], B[MAX], C[MAX];
int main ()
{
fastIO();
ll a, b, c, d, n, m, k, l, p, q, r, t, x, y;
ll cnt = 0, cntr = 0, sum = 0,ans = 1, check = 0;
ll Max = 0, Min = 2e18;
string s, s1, s2;
cin >> t;
while(t--){
cin >> a >> b >> c;
if(a == 7 or b == 7 or c == 7)cout <<"YES"<<endl;
else cout<<"NO"<<endl;
}
/*
precedence : ! * / % + - << >>
< > <= >= == != & ^ | && ||
always check the limit and make sure that is correct.
lcm of first 40 numbers can be calculated.
sqrt of 10^9 is 31622.
always usee 1LL while doing binary operations.
*/
return (0 - 0 + 1 - 1 * 1);
}