- Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathrough.cpp
More file actions
Latest commit
49 lines (40 loc) · 1.06 KB
/
Copy pathrough.cpp
File metadata and controls
49 lines (40 loc) · 1.06 KB
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<bits/stdc++.h>
usingnamespacestd;
#defineloop(i,l,r) for(int i=l; i<r; i++)
#defineintlonglong
#definepb push_back
#definevi vector<int>
#definemkp make_pair<int,int>
#defineumpii unordered_map<int,int>
#definemaxheap priority_queue<int>
#defineminheap priority_queue<int, vi,greater<int>>
#definesetbits(x) __builtin_popcountll(x)
#definezerobits(x) __builtin_ctzll(x)
#definein_arr(A,n) loop(i,0,n) cin>>A[i];
#definep_arr(A,n) loop(i,0,n) cout<<A[i]
;
#definepln_arr(A,n) loop(i,0,n) cout<<A[i]<<endl
#definetake_nint n; cin>>n;
#definetake_arrint arr[n]; loop(i,0,n) cin>>arr[i];
constint mod= 1e9+7;
constint inf= 1e15;
voidsolve(){
int n= 5;
set<int> st;
st.insert(1);
st.insert(3);
st.insert(4);
st.insert(5);
st.insert(7);
loop(i,0,n){
int q; cin>>q;
int j= *st.lower_bound(q);
cout<<j<<endl;
}
}
int32_tmain(){
int t;
cin>>t;
while(t--) solve();
return0;
}