-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsol2.cpp
More file actions
24 lines (21 loc) · 826 Bytes
/
sol2.cpp
File metadata and controls
24 lines (21 loc) · 826 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
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define fortests int tests;cin>>tests;for(int _=1;_<=tests;_++)
#define all(a) a.begin(),a.end()
const int mod = 1e9+7;
template <typename T>
istream &operator>>(istream &i,vector<T> &v){for(auto &it:v)cin>>it;return i;}
template <typename T>
ostream &operator<<(ostream &o,vector<T> &v){for(auto &it:v)cout<<it<<' ';return o;}
template <typename T = string>
void printif(bool a,T tp="Yes" ){if(a==true)cout<<tp<<endl;else cout<<"No"<<endl;}
ll mul(ll a,ll b){a%=mod;ll res=0;while(b>0){if(b&1)res=(res+a)%mod;a=(a+a)%mod;b>>=1;}return res;}
ll exp(ll a,ll b){a%=mod;ll res=1;while (b>0){if(b&1)res=res*a%mod;a=a*a%mod;b>>=1;}return res;}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
fortests{
}
return 0;
}