@@ -11,17 +11,41 @@ int main(int argc, char* argv[]) {
1111 int num = atoi (argv[3 ]);
1212 bool diff = atoi (argv[4 ]);
1313
14- if (max_n == 2 ) {
15- cout << 2 << ' \n ' ;
16- cout << bitset<2 >(num) << ' \n ' ;
17- }else if (max_n == 3 ) {
18- cout << 3 << ' \n ' ;
19- cout << bitset<3 >(num) << ' \n ' ;
20- }else if (max_n == 4 ) {
21- cout << 4 << ' \n ' ;
22- cout << bitset<4 >(num) << ' \n ' ;
14+ if (max_n == 16 ) {
15+ if (num==1 ) {
16+ cout << (1 <<15 ) <<' \n ' ;
17+ for (int i = 0 ; i < (1 <<15 ); i++) {
18+ cout << max_n << ' \n ' ;
19+ for (int j = 0 ; j < max_n; j++) {
20+ if ((i>>j)&1 ) cout<<1 ;
21+ else cout<<0 ;
22+ }
23+ cout<<' \n ' ;
24+ }
25+ }else {
26+ cout << (1 <<15 ) << ' \n ' ;
27+ for (int i = (1 <<15 ); i < (1 <<16 ); i++) {
28+ cout << max_n << ' \n ' ;
29+ for (int j=0 ;j<max_n;j++) {
30+ if ((i>>j)&1 ) cout<<1 ;
31+ else cout<<0 ;
32+ }
33+ cout<<' \n ' ;
34+ }
35+ }
36+ }else if (max_n <= 15 ) {
37+ cout << (1 <<max_n) << ' \n ' ;
38+ for (int i = 0 ; i < (1 <<max_n); i++) {
39+ cout<<max_n<<' \n ' ;
40+ for (int j = 0 ; j < max_n; j++) {
41+ if ((i>>j)&1 ) cout<<1 ;
42+ else cout<<0 ;
43+ }
44+ cout<<' \n ' ;
45+ }
2346 }else if (no) {
24- int n = rnd.next (2 , max_n);
47+ cout<<1 <<' \n ' ;
48+ int n = rnd.next (max_n/2 , max_n);
2549 n = min ( n / 3 * 3 + 2 , 999998 );
2650 cout << n << ' \n ' ;
2751 for (int i = 0 ; i < n; i++) {
@@ -30,7 +54,8 @@ int main(int argc, char* argv[]) {
3054 }
3155 cout << ' \n ' ;
3256 }else if (diff) {
33- int n = rnd.next (2 , max_n);
57+ cout<<1 <<' \n ' ;
58+ int n = rnd.next (max_n/2 , max_n);
3459 cout << n << ' \n ' ;
3560 int fir = rnd.next (0 , 1 );
3661 for (int i = 0 ; i < n; i++) {
@@ -39,7 +64,8 @@ int main(int argc, char* argv[]) {
3964 }
4065 cout << ' \n ' ;
4166 }else {
42- int n = rnd.next (2 , max_n);
67+ cout << 1 <<' \n ' ;
68+ int n = rnd.next (max_n/2 , max_n);
4369 cout << n << ' \n ' ;
4470 for (int i = 0 ; i < n; i++) {
4571 cout << rnd.next (0 , 1 );
0 commit comments