Check-in [589fb61dc1]
Not logged in
Overview
SHA1 Hash:589fb61dc1024f4a5fc3ba9705b5469843fa7965
Date: 2014-08-30 13:03:23
User: kinaba
Comment:630
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Added SRM/630-U/1A.cpp version [ed70dea932dd0a15]

> 1 #include <iostream> > 2 #include <sstream> > 3 #include <iomanip> > 4 #include <vector> > 5 #include <string> > 6 #include <map> > 7 #include <set> > 8 #include <algorithm> > 9 #include <numeric> > 10 #include <iterator> > 11 #include <functional> > 12 #include <complex> > 13 #include <queue> > 14 #include <stack> > 15 #include <cmath> > 16 #include <cassert> > 17 #include <tuple> > 18 using namespace std; > 19 typedef long long LL; > 20 typedef complex<double> CMP; > 21 > 22 class Egalitarianism3 { public: > 23 int maxCities(int n, vector <int> a, vector <int> b, vector <int> len) > 24 { > 25 if(n<=2) > 26 return n; > 27 > 28 const int INF = 0x3fffffff; > 29 vector<vector<int>> d(n, vector<int>(n, INF)); > 30 for(int i=0; i<n; ++i) > 31 d[i][i] = 0; > 32 for(int i=0; i<a.size(); ++i) { > 33 d[a[i]-1][b[i]-1] = len[i]; > 34 d[b[i]-1][a[i]-1] = len[i]; > 35 } > 36 for(int k=0; k<n; ++k) > 37 for(int i=0; i<n; ++i) > 38 for(int j=0; j<n; ++j) > 39 d[i][j] = min(d[i][j], d[i][k]+d[k][j]); > 40 > 41 int best = 2; > 42 for(int c=0; c<n; ++c) { > 43 map<int, vector<int>> cand; > 44 for(int v=0; v<n; ++v) if(v!=c) { > 45 int rad = d[c][v]; > 46 bool ok = true; > 47 for(int u: cand[rad]) > 48 if(d[v][u] != 2*rad) > 49 ok = false; > 50 if(ok) { > 51 cand[rad].push_back(v); > 52 best = max<int>(best, cand[rad].size()); > 53 } > 54 } > 55 } > 56 return best; > 57 } > 58 }; > 59 > 60 // BEGIN CUT HERE > 61 #include <ctime> > 62 double start_time; string timer() > 63 { ostringstream os; os << " (" << int((clock()-start_time)/CLOCKS_PER_SEC*1000) > 64 template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) > 65 { os << "{ "; > 66 for(typename vector<T>::const_iterator it=v.begin(); it!=v.end(); ++it) > 67 os << '\"' << *it << '\"' << (it+1==v.end() ? "" : ", "); os << " }"; return > 68 void verify_case(const int& Expected, const int& Received) { > 69 bool ok = (Expected == Received); > 70 if(ok) cerr << "PASSED" << timer() << endl; else { cerr << "FAILED" << timer() > 71 cerr << "\to: \"" << Expected << '\"' << endl << "\tx: \"" << Received << '\"' > 72 #define CASE(N) {cerr << "Test Case #" << N << "..." << flush; start_time=clock( > 73 #define END verify_case(_, Egalitarianism3().maxCities(n, a, b, len));} > 74 int main(){ > 75 > 76 CASE(0) > 77 int n = 4; > 78 int a_[] = {1,1,1}; > 79 vector <int> a(a_, a_+sizeof(a_)/sizeof(*a_)); > 80 int b_[] = {2,3,4}; > 81 vector <int> b(b_, b_+sizeof(b_)/sizeof(*b_)); > 82 int len_[] = {1,1,1}; > 83 vector <int> len(len_, len_+sizeof(len_)/sizeof(*len_)); > 84 int _ = 3; > 85 END > 86 CASE(1) > 87 int n = 6; > 88 int a_[] = {1,2,3,2,3}; > 89 vector <int> a(a_, a_+sizeof(a_)/sizeof(*a_)); > 90 int b_[] = {2,3,4,5,6}; > 91 vector <int> b(b_, b_+sizeof(b_)/sizeof(*b_)); > 92 int len_[] = {2,1,3,2,3}; > 93 vector <int> len(len_, len_+sizeof(len_)/sizeof(*len_)); > 94 int _ = 3; > 95 END > 96 CASE(2) > 97 int n = 10; > 98 int a_[] = {1,1,1,1,1,1,1,1,1}; > 99 vector <int> a(a_, a_+sizeof(a_)/sizeof(*a_)); > 100 int b_[] = {2,3,4,5,6,7,8,9,10}; > 101 vector <int> b(b_, b_+sizeof(b_)/sizeof(*b_)); > 102 int len_[] = {1000,1000,1000,1000,1000,1000,1000,1000,1000}; > 103 vector <int> len(len_, len_+sizeof(len_)/sizeof(*len_)); > 104 int _ = 9; > 105 END > 106 CASE(3) > 107 int n = 1; > 108 vector <int> a; > 109 vector <int> b; > 110 vector <int> len; > 111 int _ = 1; > 112 END > 113 /* > 114 CASE(4) > 115 int n = ; > 116 int a_[] = ; > 117 vector <int> a(a_, a_+sizeof(a_)/sizeof(*a_)); > 118 int b_[] = ; > 119 vector <int> b(b_, b_+sizeof(b_)/sizeof(*b_)); > 120 int len_[] = ; > 121 vector <int> len(len_, len_+sizeof(len_)/sizeof(*len_)); > 122 int _ = ; > 123 END > 124 CASE(5) > 125 int n = ; > 126 int a_[] = ; > 127 vector <int> a(a_, a_+sizeof(a_)/sizeof(*a_)); > 128 int b_[] = ; > 129 vector <int> b(b_, b_+sizeof(b_)/sizeof(*b_)); > 130 int len_[] = ; > 131 vector <int> len(len_, len_+sizeof(len_)/sizeof(*len_)); > 132 int _ = ; > 133 END > 134 */ > 135 } > 136 // END CUT HERE

Added SRM/630-U/1B.cpp version [ae2c1c3a335778aa]

> 1 #include <iostream> > 2 #include <sstream> > 3 #include <iomanip> > 4 #include <vector> > 5 #include <string> > 6 #include <map> > 7 #include <set> > 8 #include <algorithm> > 9 #include <numeric> > 10 #include <iterator> > 11 #include <functional> > 12 #include <complex> > 13 #include <queue> > 14 #include <stack> > 15 #include <cmath> > 16 #include <cassert> > 17 #include <tuple> > 18 using namespace std; > 19 typedef long long LL; > 20 typedef complex<double> CMP; > 21 > 22 class SuffixArrayDiv1 { public: > 23 int minimalCharacters(vector <int> SA) > 24 { > 25 int N = SA.size(); > 26 > 27 vector<int> rank(N); > 28 for(int i=0; i<N; ++i) > 29 rank[SA[i]] = i; > 30 rank.push_back(-1); // EOS > 31 > 32 int cnt = 1; > 33 for(int pi=1; pi<N; ++pi) { > 34 int p = SA[pi-1]; > 35 int q = SA[pi]; > 36 if(rank[p+1] > rank[q+1]) > 37 ++cnt; > 38 } > 39 return cnt; > 40 } > 41 }; > 42 > 43 // BEGIN CUT HERE > 44 #include <ctime> > 45 double start_time; string timer() > 46 { ostringstream os; os << " (" << int((clock()-start_time)/CLOCKS_PER_SEC*1000) > 47 template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) > 48 { os << "{ "; > 49 for(typename vector<T>::const_iterator it=v.begin(); it!=v.end(); ++it) > 50 os << '\"' << *it << '\"' << (it+1==v.end() ? "" : ", "); os << " }"; return > 51 void verify_case(const int& Expected, const int& Received) { > 52 bool ok = (Expected == Received); > 53 if(ok) cerr << "PASSED" << timer() << endl; else { cerr << "FAILED" << timer() > 54 cerr << "\to: \"" << Expected << '\"' << endl << "\tx: \"" << Received << '\"' > 55 #define CASE(N) {cerr << "Test Case #" << N << "..." << flush; start_time=clock( > 56 #define END verify_case(_, SuffixArrayDiv1().minimalCharacters(SA));} > 57 int main(){ > 58 > 59 CASE(0) > 60 int SA_[] = {3,0,1,2}; > 61 vector <int> SA(SA_, SA_+sizeof(SA_)/sizeof(*SA_)); > 62 int _ = 2; > 63 END > 64 CASE(1) > 65 int SA_[] = {3,2,1,0}; > 66 vector <int> SA(SA_, SA_+sizeof(SA_)/sizeof(*SA_)); > 67 int _ = 1; > 68 END > 69 CASE(2) > 70 int SA_[] = {0,1,2,3}; > 71 vector <int> SA(SA_, SA_+sizeof(SA_)/sizeof(*SA_)); > 72 int _ = 2; > 73 END > 74 CASE(3) > 75 int SA_[] = {7,4,8,6,1,5,2,9,3,0}; > 76 vector <int> SA(SA_, SA_+sizeof(SA_)/sizeof(*SA_)); > 77 int _ = 4; > 78 END > 79 CASE(4) > 80 int SA_[] = {0}; > 81 vector <int> SA(SA_, SA_+sizeof(SA_)/sizeof(*SA_)); > 82 int _ = 1; > 83 END > 84 /* > 85 CASE(5) > 86 int SA_[] = ; > 87 vector <int> SA(SA_, SA_+sizeof(SA_)/sizeof(*SA_)); > 88 int _ = ; > 89 END > 90 CASE(6) > 91 int SA_[] = ; > 92 vector <int> SA(SA_, SA_+sizeof(SA_)/sizeof(*SA_)); > 93 int _ = ; > 94 END > 95 */ > 96 } > 97 // END CUT HERE

Added SRM/630-U/1C-U.cpp version [bf5480b367321259]

> 1 #include <iostream> > 2 #include <sstream> > 3 #include <iomanip> > 4 #include <vector> > 5 #include <string> > 6 #include <map> > 7 #include <set> > 8 #include <algorithm> > 9 #include <numeric> > 10 #include <iterator> > 11 #include <functional> > 12 #include <complex> > 13 #include <queue> > 14 #include <stack> > 15 #include <cmath> > 16 #include <cassert> > 17 #include <tuple> > 18 using namespace std; > 19 typedef long long LL; > 20 typedef complex<double> CMP; > 21 > 22 class NeverAskHerAge { public: > 23 vector <int> possibleSolution(int n, vector <int> id1, vector <int> id2, > 24 { > 25 // !!!Being a geek, Jiro has to perfer 0-origin numbering!!! > 26 for(auto& g: id1) --g; > 27 for(auto& g: id2) --g; > 28 > 29 for(auto& s: rl) {if(s=="<=") s="L"; if(s==">=") s="G";} > 30 > 31 // check obviously false conditions. > 32 for(int i=0; i<id1.size(); ++i) if(rl[i]=="=") { > 33 if(op[i]=="/") { > 34 if(val[i]==0) > 35 return vector<int>(); > 36 continue; > 37 } > 38 if(val[i]%1000 != 0) > 39 return vector<int>(); > 40 int v = val[i] / 1000; > 41 if(op[i]=="+" && (v<2 || v>200)) return vector<int>(); > 42 if(op[i]=="-" && (v<-99 || v>99)) return vector<int>(); > 43 if(op[i]=="*") { > 44 if(v<1 || 10000<v) return vector<int>(); > 45 for(int p=2; p*p<=v; ++p) > 46 while(v%p==0)v/=p; > 47 if(v>100) return vector<int>(); > 48 } > 49 } > 50 > 51 // Relevant constraints > 52 vector<set<int>> rel(n); > 53 for(int i=0; i<id1.size(); ++i) rel[id1[i]].insert(i); > 54 for(int i=0; i<id2.size(); ++i) rel[id2[i]].insert(i); > 55 > 56 // Try highly constrained girl first. > 57 vector<int> girls; for(int g=0; g<n; ++g) girls.push_back(g); > 58 sort(girls.begin(), girls.end(), [&](int g1, int g2){return rel[ > 59 > 60 const int UNDETERMINED = 0; > 61 vector<int> x(n, UNDETERMINED); > 62 function<bool(int)> rec; > 63 rec = [&](int gi){ > 64 if(gi == n) > 65 return true; > 66 int g = girls[gi]; > 67 for(int age=1; age<=100; ++age) > 68 { > 69 x[g] = age; > 70 bool bad = false; > 71 for(int i: rel[g]) if(x[id1[i]]!=UNDETERMINED && > 72 if(!ok(x[id1[i]], op[i][0], x[id2[i]], r > 73 {bad=true; break;} > 74 } else { > 75 if(!ok_part(x[id1[i]], op[i][0], x[id2[i > 76 {bad=true; break;} > 77 } > 78 if(!bad && rec(gi+1)) > 79 return true; > 80 x[g] = UNDETERMINED; > 81 } > 82 return false; > 83 }; > 84 if(!rec(0)) return vector<int>(); > 85 return x; > 86 } > 87 > 88 static bool ok(int x1, char op, int x2, char rl, int val) > 89 { > 90 switch(op) { > 91 case '+': return ok((x1+x2)*1000, rl, val); > 92 case '-': return ok((x1-x2)*1000, rl, val); > 93 case '*': return ok((x1*x2)*1000, rl, val); > 94 case '/': return ok((x1)*1000, rl, val*x2); > 95 } > 96 return false; > 97 } > 98 static bool ok(int x, char rel, int y) > 99 { > 100 if(rel=='<') return x < y; > 101 if(rel=='L') return x <= y; > 102 if(rel=='>') return x > y; > 103 if(rel=='G') return x >= y; > 104 if(rel=='=') return x == y; > 105 return false; > 106 } > 107 static bool ok_part(int x1, char op, int x2, char rl, int val) > 108 { > 109 switch(op) { > 110 case '+': return ok_part_plus(max(x1,x2), rl, val); > 111 case '-': return x1 ? ok_part_minusl(x1, rl, val) > 112 : ok_part_minusr(x2, rl, val); > 113 case '*': return ok_part_mult(max(x1,x2), rl, val); > 114 case '/': return x1 ? ok_part_divl(x1, rl, val) > 115 : ok_part_divr(x2, rl, val); > 116 } > 117 return true; > 118 } > 119 // (x + ?)*1000 rel y > 120 static bool ok_part_plus(int x, char rel, int y) > 121 { > 122 if(rel=='<') return (x+1)*1000 < y; > 123 if(rel=='L') return (x+1)*1000 <= y; > 124 if(rel=='>') return (x+100)*1000 > y; > 125 if(rel=='G') return (x+100)*1000 >= y; > 126 if(rel=='=') return (x+1)*1000<=y && y<=(x+100)*1000; > 127 return false; > 128 } > 129 // (x - ?)*1000 rel y > 130 static bool ok_part_minusl(int x, char rel, int y) > 131 { > 132 if(rel=='<') return (x-100)*1000 < y; > 133 if(rel=='L') return (x-100)*1000 <= y; > 134 if(rel=='>') return (x-1)*1000 > y; > 135 if(rel=='G') return (x-1)*1000 >= y; > 136 if(rel=='=') return (x-100)*1000<=y && y<=(x-1)*1000; > 137 return false; > 138 } > 139 // (? - x)*1000 rel y > 140 static bool ok_part_minusr(int x, char rel, int y) > 141 { > 142 if(rel=='<') return (1-x)*1000 < y; > 143 if(rel=='L') return (1-x)*1000 <= y; > 144 if(rel=='>') return (100-x)*1000 > y; > 145 if(rel=='G') return (100-x)*1000 >= y; > 146 if(rel=='=') return (1-x)*1000<=y && y<=(100-x)*1000; > 147 return false; > 148 } > 149 // (x * ?)*1000 rel y > 150 static bool ok_part_mult(int x, char rel, int y) > 151 { > 152 if(rel=='<') return (x*1)*1000 < y; > 153 if(rel=='L') return (x*1)*1000 <= y; > 154 if(rel=='>') return (x*100)*1000 > y; > 155 if(rel=='G') return (x*100)*1000 >= y; > 156 if(rel=='=') return (x*1)*1000<=y && y<=(x*100)*1000 && y%(x*100 > 157 return false; > 158 } > 159 // (x / ?)*1000 rel y > 160 static bool ok_part_divl(int x, char rel, int y) > 161 { > 162 if(rel=='<') return x*1000 < y*100; > 163 if(rel=='L') return x*1000 <= y*100; > 164 if(rel=='>') return x*1000 > y*1; > 165 if(rel=='G') return x*1000 >= y*1; > 166 if(rel=='=') return x*1000 <= y*100 && x*1000 >= y*1 && (x*1000% > 167 return false; > 168 } > 169 static bool ok_part_divr(int x, char rel, int y) > 170 { > 171 return true; > 172 } > 173 }; > 174 > 175 // BEGIN CUT HERE > 176 #include <ctime> > 177 double start_time; string timer() > 178 { ostringstream os; os << " (" << int((clock()-start_time)/CLOCKS_PER_SEC*1000) > 179 template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) > 180 { os << "{ "; > 181 for(typename vector<T>::const_iterator it=v.begin(); it!=v.end(); ++it) > 182 os << '\"' << *it << '\"' << (it+1==v.end() ? "" : ", "); os << " }"; return > 183 void verify_case(const vector <int>& Expected, const vector <int>& Received) { > 184 bool ok = (Expected == Received); > 185 if(ok) cerr << "PASSED" << timer() << endl; else { cerr << "FAILED" << timer() > 186 cerr << "\to: " << Expected << endl << "\tx: " << Received << endl; } } > 187 #define CASE(N) {cerr << "Test Case #" << N << "..." << flush; start_time=clock( > 188 #define END verify_case(_, NeverAskHerAge().possibleSolution(n, id1, id2, o > 189 int main(){ > 190 > 191 CASE(0) > 192 int n = 2; > 193 int id1_[] = {1,1}; > 194 vector <int> id1(id1_, id1_+sizeof(id1_)/sizeof(*id1_)); > 195 int id2_[] = {2,2}; > 196 vector <int> id2(id2_, id2_+sizeof(id2_)/sizeof(*id2_)); > 197 string op_[] = {"+","*"}; > 198 vector <string> op(op_, op_+sizeof(op_)/sizeof(*op_)); > 199 string rl_[] = {"=","="}; > 200 vector <string> rl(rl_, rl_+sizeof(rl_)/sizeof(*rl_)); > 201 int val_[] = {10000,21000}; > 202 vector <int> val(val_, val_+sizeof(val_)/sizeof(*val_)); > 203 int __[] = {3, 7 }; > 204 vector <int> _(__, __+sizeof(__)/sizeof(*__)); > 205 END > 206 CASE(1) > 207 int n = 7; > 208 int id1_[] = {1,2,3,4,5,6}; > 209 vector <int> id1(id1_, id1_+sizeof(id1_)/sizeof(*id1_)); > 210 int id2_[] = {2,3,4,5,6,7}; > 211 vector <int> id2(id2_, id2_+sizeof(id2_)/sizeof(*id2_)); > 212 string op_[] = {"/","/","/","/","/","/"}; > 213 vector <string> op(op_, op_+sizeof(op_)/sizeof(*op_)); > 214 string rl_[] = {"=","=","=","=","=","="}; > 215 vector <string> rl(rl_, rl_+sizeof(rl_)/sizeof(*rl_)); > 216 int val_[] = {2000,2000,2000,2000,2000,2000}; > 217 vector <int> val(val_, val_+sizeof(val_)/sizeof(*val_)); > 218 int __[] = {64, 32, 16, 8, 4, 2, 1 }; > 219 vector <int> _(__, __+sizeof(__)/sizeof(*__)); > 220 END > 221 CASE(2) > 222 int n = 2; > 223 int id1_[] = {1,1}; > 224 vector <int> id1(id1_, id1_+sizeof(id1_)/sizeof(*id1_)); > 225 int id2_[] = {2,2}; > 226 vector <int> id2(id2_, id2_+sizeof(id2_)/sizeof(*id2_)); > 227 string op_[] = {"/","/"}; > 228 vector <string> op(op_, op_+sizeof(op_)/sizeof(*op_)); > 229 string rl_[] = {">","<"}; > 230 vector <string> rl(rl_, rl_+sizeof(rl_)/sizeof(*rl_)); > 231 int val_[] = {2621,2622}; > 232 vector <int> val(val_, val_+sizeof(val_)/sizeof(*val_)); > 233 int __[] = {97, 37 }; > 234 vector <int> _(__, __+sizeof(__)/sizeof(*__)); > 235 END > 236 CASE(3) > 237 int n = 2; > 238 int id1_[] = {1,1}; > 239 vector <int> id1(id1_, id1_+sizeof(id1_)/sizeof(*id1_)); > 240 int id2_[] = {2,2}; > 241 vector <int> id2(id2_, id2_+sizeof(id2_)/sizeof(*id2_)); > 242 string op_[] = {"*","+"}; > 243 vector <string> op(op_, op_+sizeof(op_)/sizeof(*op_)); > 244 string rl_[] = {">","<="}; > 245 vector <string> rl(rl_, rl_+sizeof(rl_)/sizeof(*rl_)); > 246 int val_[] = {6000,5000}; > 247 vector <int> val(val_, val_+sizeof(val_)/sizeof(*val_)); > 248 vector <int> _; > 249 END > 250 CASE(4) > 251 int n = 8; > 252 int id1_[] = {1,3,5,7}; > 253 vector <int> id1(id1_, id1_+sizeof(id1_)/sizeof(*id1_)); > 254 int id2_[] = {2,4,6,8}; > 255 vector <int> id2(id2_, id2_+sizeof(id2_)/sizeof(*id2_)); > 256 string op_[] = {"+","-","*","/"}; > 257 vector <string> op(op_, op_+sizeof(op_)/sizeof(*op_)); > 258 string rl_[] = {">=","<=","=","<="}; > 259 vector <string> rl(rl_, rl_+sizeof(rl_)/sizeof(*rl_)); > 260 int val_[] = {200000,-99000,3589000,10}; > 261 vector <int> val(val_, val_+sizeof(val_)/sizeof(*val_)); > 262 int __[] = {100, 100, 1, 100, 97, 37, 1, 100 }; > 263 vector <int> _(__, __+sizeof(__)/sizeof(*__)); > 264 END > 265 CASE(5) > 266 int n = 8; > 267 int id1_[] = {7,1,3,4,4,3,7,2,3,6,4,4,6,5,2,8,2,2,7,6,2,2,8,6,5,6,5,4,4, > 268 vector <int> id1(id1_, id1_+sizeof(id1_)/sizeof(*id1_)); > 269 int id2_[] = {2,7,6,6,1,2,4,7,4,4,8,3,8,2,4,1,7,7,6,2,5,7,6,5,8,2,8,1,8, > 270 vector <int> id2(id2_, id2_+sizeof(id2_)/sizeof(*id2_)); > 271 string op_[] = {"/","*","/","-","*","+","*","+","/","+","-","+","*","+", > 272 vector <string> op(op_, op_+sizeof(op_)/sizeof(*op_)); > 273 string rl_[] = {"<","<","<=",">","<","<=","<",">","<","<=","<=",">",">", > 274 vector <string> rl(rl_, rl_+sizeof(rl_)/sizeof(*rl_)); > 275 int val_[] = {47636,5754558,3307,-41496,7043286,144246,5048203,72315,853 > 276 vector <int> val(val_, val_+sizeof(val_)/sizeof(*val_)); > 277 int __[] = {56, 77, 19, 59, 77, 87, 43, 51 }; > 278 vector <int> _(__, __+sizeof(__)/sizeof(*__)); > 279 END > 280 CASE(6) > 281 int n = 8; > 282 int id1_[] = {7,1,3,4,4,3,7,2,3,6,4,4,6,5,2,8,2,2,7,6,2,2,8,6,5,6,5,4,4, > 283 vector <int> id1(id1_, id1_+sizeof(id1_)/sizeof(*id1_)); > 284 int id2_[] = {2,7,6,6,1,2,4,7,4,4,8,3,8,2,4,1,7,7,6,2,5,7,6,5,8,2,8,1,8, > 285 vector <int> id2(id2_, id2_+sizeof(id2_)/sizeof(*id2_)); > 286 string op_[] = {"/","*","/","-","*","+","*","+","/","+","-","+","*","+", > 287 vector <string> op(op_, op_+sizeof(op_)/sizeof(*op_)); > 288 string rl_[] = {"=","<","<=",">","<","<=","<",">","<","<=","<=",">",">", > 289 vector <string> rl(rl_, rl_+sizeof(rl_)/sizeof(*rl_)); > 290 int val_[] = {2000,5754558,3307,-41496,7043286,144246,5048203,72315,8538 > 291 vector <int> val(val_, val_+sizeof(val_)/sizeof(*val_)); > 292 vector <int> _; > 293 END > 294 /* > 295 CASE(7) > 296 int n = ; > 297 int id1_[] = ; > 298 vector <int> id1(id1_, id1_+sizeof(id1_)/sizeof(*id1_)); > 299 int id2_[] = ; > 300 vector <int> id2(id2_, id2_+sizeof(id2_)/sizeof(*id2_)); > 301 string op_[] = ; > 302 vector <string> op(op_, op_+sizeof(op_)/sizeof(*op_)); > 303 string rl_[] = ; > 304 vector <string> rl(rl_, rl_+sizeof(rl_)/sizeof(*rl_)); > 305 int val_[] = ; > 306 vector <int> val(val_, val_+sizeof(val_)/sizeof(*val_)); > 307 int __[] = ; > 308 vector <int> _(__, __+sizeof(__)/sizeof(*__)); > 309 END > 310 CASE(8) > 311 int n = ; > 312 int id1_[] = ; > 313 vector <int> id1(id1_, id1_+sizeof(id1_)/sizeof(*id1_)); > 314 int id2_[] = ; > 315 vector <int> id2(id2_, id2_+sizeof(id2_)/sizeof(*id2_)); > 316 string op_[] = ; > 317 vector <string> op(op_, op_+sizeof(op_)/sizeof(*op_)); > 318 string rl_[] = ; > 319 vector <string> rl(rl_, rl_+sizeof(rl_)/sizeof(*rl_)); > 320 int val_[] = ; > 321 vector <int> val(val_, val_+sizeof(val_)/sizeof(*val_)); > 322 int __[] = ; > 323 vector <int> _(__, __+sizeof(__)/sizeof(*__)); > 324 END > 325 */ > 326 } > 327 // END CUT HERE