- Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathcodesnippet.cpp
More file actions
Latest commit
78 lines (66 loc) · 1.15 KB
/
Copy pathcodesnippet.cpp
File metadata and controls
78 lines (66 loc) · 1.15 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// Nisarg Gogate
// VNIT
#include<bits/stdc++.h>
#defineDEBUG_ON0
#defineintlonglong
#defineTESTCASESfalse
#defineFASTIOtrue
#defineDBG(x) if(DEBUG_ON) cout << #x << " == " << x << endl
#defineFF first
#defineSS second
constint inf = (int)1e18 + 1;
constintSIZE = (int)1e5+3;
constintMOD = (int)1e9+7;
usingnamespacestd;
intexp(int x,int n)
{
int ret= 1;
while(n>0)
{
if(n%2)ret=(ret*x)%MOD;
x=(x*x)%MOD;
n=n/2;
}
return ret%MOD;
}
intinv(int x)
{
returnexp(x,MOD-2);
}
intncr(int n,int r)
{
if(r==0)return1;
if(n<r)return0;
int ret = n*ncr(n-1,r-1);
ret%=MOD;
ret*=inv(r);
ret%=MOD;
return ret;
}
intsolve(int n)
{
int i,j,ans=0;
vector<int> arr(n,0);
for (auto &it : arr) cin >> it;
}
voidmain_code()
{
int i,j,n,k;
cin>>n;
cout<<solve(n)<<endl;
}
signedmain()
{
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
if(FASTIO)
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
int T = 1;
if(TESTCASES)
cin >> T;
while(T--)
main_code();
}