-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest6.cpp
68 lines (58 loc) · 1.79 KB
/
test6.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
65
66
67
68
/**
* H:\Dropbox\Code\test6.cpp
* Created on: 2015-03-15-01.27.02, Sunday
* Verdict: Not Solved
* Author: Enamul Hassan
**/
#include <bits/stdc++.h>
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define sz 200005
#define pb(a) push_back(a)
#define pp pop_back()
#define all(a) a.begin(),a.end()
#define ll long long
#define cntbit(mask) __builtin_popcount(mask)
#define unify(a) stable_sort(a.begin(),a.end());a.resize(distance(a.begin(),unique(all(a))));
#define fread freopen("input.txt","r",stdin)
#define fwrite freopen("output.txt","w",stdout)
#define inf (1e18)
#define chng(a,b) a^=b^=a^=b;
#define clr(abc,z) memset(abc,z,sizeof(abc))
#define PI acos(-1)
#define pi 3.14159265358979323846264338327950288419716939937510
#define fr(i,a,b) for(i=a;i<=b;i++)
#define print1(a) cout<<a<<endl
#define print2(a,b) cout<<a<<" "<<b<<endl
#define print3(a,b,c) cout<<a<<" "<<b<<" "<<c<<endl
#define mod 1000000007
ll bigmod(ll sonkha,ll ghat,ll vag_const){ll vag_shesh=1;while(ghat>0){if(ghat%2==1){vag_shesh=(vag_shesh*sonkha)%vag_const;}ghat/=2;sonkha=(sonkha*sonkha)%vag_const;}return vag_shesh;}
ll inverse_mod(ll bivajok, ll vag_const){return bigmod(bivajok,vag_const-2, vag_const);}
using namespace std;
int main()
{
#ifdef ENAM
// fread;
fwrite;
#endif // ENAM
int t, n, m, cas=1,k;
_
// clock_t begin, end;
// double time_spent;
// begin = clock();
srand(time(NULL));
t = rand()%100+1;
cout<<t<<"\n";
while(t--)
{
n = rand()%15+1;
k = rand()%1000;
cout<<n<<" "<<k<<"\n";
m = (1LL<<n);
for (int i = 0; i<m; i++)
cout<<(rand()%1000+1)<<" \n"[i==m-1];
}
// end = clock();
// time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
// cerr<<"Time spent = "<<time_spent<<endl;
return 0;
}