******************************* *** The hack uses generator *** ******************************* ** Command line arguments ** no arguments ** Generated test ** 65537 8193 1 3 4 5 7 8 10 12 13 14 16 18 19 21 22 23 25 26 28 30 31 33 34 35 37 39 40 41 43 44 46 48 49 50 52 54 55 57 58 59 61 63 64 65 67 68 70 72 73 75 76 77 79 80 82 84 85 86 88 90 91 93 94 95 97 98 100 102 103 105 106 107 109 111 112 113 115 116 118 120 121 123 124 125 127 128 130 132 133 134 136 138 139 141 142 143 145 147 148 149 151 152 154 156 157 158 160 162 163 165 166 167 169 170 172 174 175 177 178 179 181 183 184 185 187 188 190 192 193 194 196 198 199 201 202 203 205 207 208 209 211 212 214... ** Generator source ** /** * BE CAREFUL!! I have define int li sometimes */ //#define _GLIBCXX_DEBUG #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define mp make_pair #define pb push_back #define all(a) a.begin(), a.end() typedef long long li; typedef long double ld; typedef vector vi; //typedef pair pi; void solve(); void prec(); #define FILENAME "souvenir" int main() { string s = FILENAME; #ifdef DEBUG freopen("/Users/RiaD/Contests/Contests/input", "r", stdin); //freopen("/Users/RiaD/Contests/Contests/output", "w", stdout); //cout<> tests; while (tests--) { solve(); } #ifdef DEBUG //cerr<<"\n\n"<<(clock() - start) / 1.0 / CLOCKS_PER_SEC<<"\n\n\n"; #endif return 0; } int __builtin__popcount(int x) { int r = 0; for(int i = 0; i < 20; ++i) { if(x & (1 << i)) ++r; } return r; } void solve() { vector d1, d2; for(int i = 0; i < (1 << 16); ++i) { if(__builtin__popcount(i) % 2 == 1) d1.push_back(1); else d1.push_back(2); } for(int i = 0; i < (1 << 13); ++i) { if(__builtin__popcount(i) % 2 == 1) d2.push_back(1); else d2.push_back(2); } int last; cout << d1.size() + 1 << ' ' << d2.size() + 1<< "\n"; cout << 1; last = 1; for(int x: d1) { last += x; cout << " " << last; } cout << "\n"; cout << 1; last = 1; for(int x: d2) { last += x; cout << " " << last; } cout << "\n"; }