-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNOTIME.cpp
More file actions
executable file
·54 lines (43 loc) · 814 Bytes
/
NOTIME.cpp
File metadata and controls
executable file
·54 lines (43 loc) · 814 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//optimisations
#pragma GCC optimise"O2"
#pragma GCC optimise"Os"
#pragma GCC optimise"unroll-loops"
#pragma GCC target"avx2"
//Libraries
#include<bits/stdc++.h>
#include<iostream>
//Definition
#define nl "\n"
#define loop(i,a,n) for(int i=a; i<n; i++)
#define rloop(i,a,n) for(int i=a;i>=n;i--)
//Namespaces
using namespace std;
void solve();
int tmz(int *T,int& N);
signed main(){
solve();
return 0;
return 0;
}
int tmz(int *T, int &N){
int large=-1; int i;
loop(i,0,N){
if(T[i]>large)
large=T[i];
}
return large;
}
void solve(){
int *T,x,H,N,i;
cin>>N>>x>>H;
T = new int[N];
loop(i,0,N){
cin>>*(T+i);
}
int tz = tmz(T, N);
if((tz+x)<=H){
cout<<"YES";
}
else
cout<<"NO";
}