Check-in [143923277f]
Not logged in
Overview
SHA1 Hash:143923277fcb664536f8b36ff6745bf3c005ec0b
Date: 2014-11-03 04:00:22
User: kinaba
Comment:638
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Added SRM/638-U/1A-U.cpp version [21a69859a51bc35b]

> 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 struct UnionFind > 23 { > 24 vector<int> uf, sz; > 25 int nc; > 26 > 27 UnionFind(int N): uf(N), sz(N,1), nc(N) > 28 { for(int i=0; i<N; ++i) uf[i] = i; } > 29 int size() > 30 { return nc; } > 31 int size(int a) > 32 { return sz[Find(a)]; } > 33 int Find(int a) > 34 { return uf[a]==a ? a : uf[a]=Find(uf[a]); } > 35 bool Union(int a, int b) > 36 { > 37 a = Find(a); > 38 b = Find(b); > 39 if( a != b ) > 40 { > 41 if( sz[a] >= sz[b] ) swap(a, b); > 42 uf[a] = b; > 43 sz[b] += sz[a]; > 44 --nc; > 45 } > 46 return (a!=b); > 47 } > 48 }; > 49 > 50 class ShadowSculpture { public: > 51 string possible(vector <string> XY, vector <string> YZ, vector <string> > 52 { > 53 const int N = XY.size(); > 54 > 55 // Init > 56 bool XYZ[10][10][10]; > 57 for(int x=0; x<N; ++x) > 58 for(int y=0; y<N; ++y) > 59 for(int z=0; z<N; ++z) > 60 XYZ[x][y][z] = true; > 61 > 62 // Grave > 63 for(int x=0; x<N; ++x) > 64 for(int y=0; y<N; ++y) > 65 for(int z=0; z<N; ++z) > 66 if(XY[x][y] == 'N' || YZ[y][z] == 'N' || ZX[z][x] == 'N' > 67 XYZ[x][y][z] = false; > 68 > 69 // Sanity check > 70 for(int x=0; x<N; ++x) > 71 for(int y=0; y<N; ++y) { > 72 bool a=false,b=false,c=false; > 73 for(int z=0; z<N; ++z) { > 74 a |= XYZ[x][y][z]; > 75 b |= XYZ[z][x][y]; > 76 c |= XYZ[y][z][x]; > 77 } > 78 if(XY[x][y]=='Y'&&!a) return "Impossible"; > 79 if(YZ[x][y]=='Y'&&!b) return "Impossible"; > 80 if(ZX[x][y]=='Y'&&!c) return "Impossible"; > 81 } > 82 > 83 // Judge > 84 return is_connected(XYZ, N) ? "Possible" : "Impossible"; > 85 } > 86 > 87 bool is_connected(bool XYZ[10][10][10], int N) > 88 { > 89 UnionFind uf(N*N*N); > 90 function<int(int,int,int)> id = [&](int x, int y, int z) { > 91 return (x*N+y)*N+z; > 92 }; > 93 > 94 const int dx[] = {-1,+1,0,0,0,0}; > 95 const int dy[] = {0,0,-1,+1,0,0}; > 96 const int dz[] = {0,0,0,0,-1,+1}; > 97 int cnt = 0; > 98 for(int x=0; x<N; ++x) > 99 for(int y=0; y<N; ++y) > 100 for(int z=0; z<N; ++z) if(XYZ[x][y][z]) { > 101 ++cnt; > 102 for(int d=0; d<6; ++d) { > 103 int xx=x+dx[d], yy=y+dy[d], zz=z+dz[d]; > 104 if(0<=xx&&xx<N&&0<=yy&&yy<N&&0<=zz&&zz<N&&XYZ[xx > 105 uf.Union(id(x,y,z), id(xx,yy,zz)); > 106 } > 107 } > 108 > 109 for(int x=0; x<N; ++x) > 110 for(int y=0; y<N; ++y) > 111 for(int z=0; z<N; ++z) if(XYZ[x][y][z] && uf.size(id(x,y,z))!=cn > 112 return false; > 113 return true; > 114 } > 115 }; > 116 > 117 // BEGIN CUT HERE > 118 #include <ctime> > 119 double start_time; string timer() > 120 { ostringstream os; os << " (" << int((clock()-start_time)/CLOCKS_PER_SEC*1000) > 121 template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) > 122 { os << "{ "; > 123 for(typename vector<T>::const_iterator it=v.begin(); it!=v.end(); ++it) > 124 os << '\"' << *it << '\"' << (it+1==v.end() ? "" : ", "); os << " }"; return > 125 void verify_case(const string& Expected, const string& Received) { > 126 bool ok = (Expected == Received); > 127 if(ok) cerr << "PASSED" << timer() << endl; else { cerr << "FAILED" << timer() > 128 cerr << "\to: \"" << Expected << '\"' << endl << "\tx: \"" << Received << '\"' > 129 #define CASE(N) {cerr << "Test Case #" << N << "..." << flush; start_time=clock( > 130 #define END verify_case(_, ShadowSculpture().possible(XY, YZ, ZX));} > 131 int main(){ > 132 > 133 CASE(0) > 134 string XY_[] = {"YN","NN"}; > 135 vector <string> XY(XY_, XY_+sizeof(XY_)/sizeof(*XY_)); > 136 string YZ_[] = {"YN","NN"}; > 137 vector <string> YZ(YZ_, YZ_+sizeof(YZ_)/sizeof(*YZ_)); > 138 string ZX_[] = {"YN","NN"}; > 139 vector <string> ZX(ZX_, ZX_+sizeof(ZX_)/sizeof(*ZX_)); > 140 string _ = "Possible"; > 141 END > 142 CASE(1) > 143 string XY_[] = {"YN","NY"}; > 144 vector <string> XY(XY_, XY_+sizeof(XY_)/sizeof(*XY_)); > 145 string YZ_[] = {"YN","NY"}; > 146 vector <string> YZ(YZ_, YZ_+sizeof(YZ_)/sizeof(*YZ_)); > 147 string ZX_[] = {"YN","NY"}; > 148 vector <string> ZX(ZX_, ZX_+sizeof(ZX_)/sizeof(*ZX_)); > 149 string _ = "Impossible"; > 150 END > 151 CASE(2) > 152 string XY_[] = {"YYY","YNY","YYY"}; > 153 vector <string> XY(XY_, XY_+sizeof(XY_)/sizeof(*XY_)); > 154 string YZ_[] = {"YYY","YNY","YYY"}; > 155 vector <string> YZ(YZ_, YZ_+sizeof(YZ_)/sizeof(*YZ_)); > 156 string ZX_[] = {"YYY","YNY","YYY"}; > 157 vector <string> ZX(ZX_, ZX_+sizeof(ZX_)/sizeof(*ZX_)); > 158 string _ = "Possible"; > 159 END > 160 CASE(3) > 161 string XY_[] = {"YYY","YNY","YYY"}; > 162 vector <string> XY(XY_, XY_+sizeof(XY_)/sizeof(*XY_)); > 163 string YZ_[] = {"NYY","YNY","YYY"}; > 164 vector <string> YZ(YZ_, YZ_+sizeof(YZ_)/sizeof(*YZ_)); > 165 string ZX_[] = {"YYY","YNY","YYN"}; > 166 vector <string> ZX(ZX_, ZX_+sizeof(ZX_)/sizeof(*ZX_)); > 167 string _ = "Impossible"; > 168 END > 169 CASE(4) > 170 string XY_[] = {"N"}; > 171 vector <string> XY(XY_, XY_+sizeof(XY_)/sizeof(*XY_)); > 172 string YZ_[] = {"N"}; > 173 vector <string> YZ(YZ_, YZ_+sizeof(YZ_)/sizeof(*YZ_)); > 174 string ZX_[] = {"N"}; > 175 vector <string> ZX(ZX_, ZX_+sizeof(ZX_)/sizeof(*ZX_)); > 176 string _ = "Possible"; > 177 END > 178 /* > 179 CASE(5) > 180 string XY_[] = ; > 181 vector <string> XY(XY_, XY_+sizeof(XY_)/sizeof(*XY_)); > 182 string YZ_[] = ; > 183 vector <string> YZ(YZ_, YZ_+sizeof(YZ_)/sizeof(*YZ_)); > 184 string ZX_[] = ; > 185 vector <string> ZX(ZX_, ZX_+sizeof(ZX_)/sizeof(*ZX_)); > 186 string _ = ; > 187 END > 188 CASE(6) > 189 string XY_[] = ; > 190 vector <string> XY(XY_, XY_+sizeof(XY_)/sizeof(*XY_)); > 191 string YZ_[] = ; > 192 vector <string> YZ(YZ_, YZ_+sizeof(YZ_)/sizeof(*YZ_)); > 193 string ZX_[] = ; > 194 vector <string> ZX(ZX_, ZX_+sizeof(ZX_)/sizeof(*ZX_)); > 195 string _ = ; > 196 END > 197 */ > 198 } > 199 // END CUT HERE

Added SRM/638-U/1B.cpp version [43426d2047e44511]

> 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 const int MODVAL = 1000000007; > 23 > 24 class NarrowPassage2 { public: > 25 int count(vector <int> size, int maxSizeSum) > 26 { > 27 if(size.size() <= 1) > 28 return 1; > 29 > 30 int mi = min_element(size.begin(), size.end()) - size.begin(); > 31 > 32 int lm=mi; > 33 for(int k=mi-1; k>=0 && size[k]+size[mi]<=maxSizeSum; --k) > 34 lm = k; > 35 int rm=mi; > 36 for(int k=mi+1; k<size.size() && size[k]+size[mi]<=maxSizeSum; + > 37 rm = k; > 38 > 39 size.erase(size.begin()+mi); > 40 return LL(rm-lm+1) * count(size, maxSizeSum) % MODVAL; > 41 } > 42 }; > 43 > 44 // BEGIN CUT HERE > 45 #include <ctime> > 46 double start_time; string timer() > 47 { ostringstream os; os << " (" << int((clock()-start_time)/CLOCKS_PER_SEC*1000) > 48 template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) > 49 { os << "{ "; > 50 for(typename vector<T>::const_iterator it=v.begin(); it!=v.end(); ++it) > 51 os << '\"' << *it << '\"' << (it+1==v.end() ? "" : ", "); os << " }"; return > 52 void verify_case(const int& Expected, const int& Received) { > 53 bool ok = (Expected == Received); > 54 if(ok) cerr << "PASSED" << timer() << endl; else { cerr << "FAILED" << timer() > 55 cerr << "\to: \"" << Expected << '\"' << endl << "\tx: \"" << Received << '\"' > 56 #define CASE(N) {cerr << "Test Case #" << N << "..." << flush; start_time=clock( > 57 #define END verify_case(_, NarrowPassage2().count(size, maxSizeSum));} > 58 int main(){ > 59 > 60 CASE(0) > 61 int size_[] = {1, 2, 3}; > 62 vector <int> size(size_, size_+sizeof(size_)/sizeof(*size_)); > 63 int maxSizeSum = 3; > 64 int _ = 2; > 65 END > 66 CASE(1) > 67 int size_[] = {1, 2, 3}; > 68 vector <int> size(size_, size_+sizeof(size_)/sizeof(*size_)); > 69 int maxSizeSum = 1000; > 70 int _ = 6; > 71 END > 72 CASE(2) > 73 int size_[] = {1, 2, 3}; > 74 vector <int> size(size_, size_+sizeof(size_)/sizeof(*size_)); > 75 int maxSizeSum = 4; > 76 int _ = 3; > 77 END > 78 CASE(3) > 79 int size_[] = {1,1,1,1,1,1,1,1,1,1,1,1,1}; > 80 vector <int> size(size_, size_+sizeof(size_)/sizeof(*size_)); > 81 int maxSizeSum = 2; > 82 int _ = 227020758; > 83 END > 84 CASE(4) > 85 int size_[] = {2,4,6,1,3,5}; > 86 vector <int> size(size_, size_+sizeof(size_)/sizeof(*size_)); > 87 int maxSizeSum = 8; > 88 int _ = 60; > 89 END > 90 CASE(5) > 91 int size_[] = {1000000000}; > 92 vector <int> size(size_, size_+sizeof(size_)/sizeof(*size_)); > 93 int maxSizeSum = 1000000000; > 94 int _ = 1; > 95 END > 96 /* > 97 CASE(6) > 98 int size_[] = ; > 99 vector <int> size(size_, size_+sizeof(size_)/sizeof(*size_)); > 100 int maxSizeSum = ; > 101 int _ = ; > 102 END > 103 CASE(7) > 104 int size_[] = ; > 105 vector <int> size(size_, size_+sizeof(size_)/sizeof(*size_)); > 106 int maxSizeSum = ; > 107 int _ = ; > 108 END > 109 */ > 110 } > 111 // END CUT HERE

Added SRM/638-U/1C-U.cpp version [a8492d73123f6c2f]

> 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 const int INF = 0x1fffffff; > 23 > 24 class CandleTimer { public: > 25 int differentTime(vector <int> A, vector <int> B, vector <int> len) > 26 { > 27 if(A.size() == 1) { > 28 // Special case, just in case. All nodes are leaves. > 29 // Either light only one end or both ends. > 30 return 2; > 31 } > 32 > 33 // x2, to make all the possible final points on integer coordina > 34 for(auto& li: len) > 35 li *= 2; > 36 > 37 // Prepare.... > 38 const int E = A.size(), V = E+1; > 39 > 40 vector<int> leaf; > 41 vector<bool> is_leaf(V, false); > 42 { > 43 vector<int> degree(V); > 44 for(auto a: A) degree[a]++; > 45 for(auto b: B) degree[b]++; > 46 > 47 for(int v=0; v<V; ++v) > 48 if(degree[v]==1) { > 49 leaf.push_back(v); > 50 is_leaf[v] = true; > 51 } > 52 } > 53 > 54 vector<vector<int>> dist(V, vector<int>(V, INF)); > 55 { > 56 for(int i=0; i<V; ++i) > 57 dist[i][i] = 0; > 58 for(int i=0; i<E; ++i) > 59 dist[A[i]][B[i]] = dist[B[i]][A[i]] = len[i]; > 60 for(int k=0; k<V; ++k) > 61 for(int i=0; i<V; ++i) > 62 for(int j=0; j<V; ++j) > 63 dist[i][j] = min(dist[i][j], dist[i][k]+dist[k][ > 64 } > 65 > 66 vector<vector<pair<int,int>>> G(V); // len, dest > 67 for(int e=0; e<E; ++e) { > 68 G[A[e]].emplace_back(len[e], B[e]); > 69 G[B[e]].emplace_back(len[e], A[e]); > 70 } > 71 > 72 // Compute all possible final points. > 73 enum {EID, POS}; > 74 vector<tuple<int,int>> cand; > 75 { > 76 vector<bool> done(V, false); > 77 > 78 // Add all leaves as the possible final point > 79 for(int e=0; e<E; ++e) { > 80 if(is_leaf[A[e]] && !done[A[e]]) > 81 cand.emplace_back(e, 0), done[A[e]]=true > 82 if(is_leaf[B[e]] && !done[B[e]]) > 83 cand.emplace_back(e, len[e]), done[B[e]] > 84 } > 85 > 86 // Add all mid points. > 87 for(int la: leaf) > 88 for(int lb: leaf) > 89 for(int e=0; e<E; ++e) > 90 { > 91 int a=A[e], b=B[e], ll=len[e]; > 92 if(dist[la][a]+ll+dist[lb][b] == dist[la][lb]) { > 93 if(abs(dist[la][a] - dist[lb][b]) <= ll) > 94 tuple<int,int> c(e, (ll+dist[lb] > 95 // TODO: reduce by done[] > 96 cand.push_back(c); > 97 } > 98 } else if(dist[la][b]+ll+dist[lb][a] == dist[la] > 99 if(abs(dist[la][b] - dist[lb][a]) <= ll) > 100 tuple<int,int> c(e, (ll+dist[la] > 101 // TODO: reduce by done[] > 102 cand.push_back(c); > 103 } > 104 } > 105 } > 106 } > 107 > 108 // Distance between a candidate point and a node. > 109 function<int(tuple<int,int>,int)> calc_d = [&](tuple<int,int> c, > 110 return min( > 111 dist[A[get<EID>(c)]][v] + get<POS>(c), > 112 dist[B[get<EID>(c)]][v] + len[get<EID>(c)] - get > 113 ); > 114 }; > 115 > 116 // Simulate all. > 117 set<int> answer; > 118 for(auto c: cand) > 119 { > 120 vector<pair<int,int>> dist_leaf; > 121 for(int v: leaf) > 122 dist_leaf.emplace_back(calc_d(c, v), v); > 123 sort(dist_leaf.begin(), dist_leaf.end()); > 124 > 125 for(int i=0; i<dist_leaf.size(); ++i) > 126 { > 127 const int cand_time = dist_leaf[i].first; > 128 if(i>0 && cand_time == dist_leaf[i-1].first) > 129 continue; > 130 > 131 // Light all leaves further or equal to dist_lea > 132 // Can the point |c| be the last point (burning > 133 > 134 // Dijkstra. > 135 vector<int> burn_time(V, INF); > 136 { > 137 priority_queue<pair<int,int>, vector<pai > 138 for(int k=i; k<dist_leaf.size(); ++k) > 139 Q.emplace(0, dist_leaf[k].second > 140 while(!Q.empty()) { > 141 int d = Q.top().first; > 142 int v = Q.top().second; > 143 Q.pop(); > 144 if(burn_time[v] != INF) > 145 continue; > 146 burn_time[v] = d; > 147 for(int i=0; i<G[v].size(); ++i) > 148 { > 149 int dd = G[v][i].first; > 150 int u = G[v][i].second; > 151 if(burn_time[u] == INF) > 152 Q.emplace(d+dd, > 153 } > 154 } > 155 } > 156 > 157 int bt_min = INF; > 158 for(int e=0; e<E; ++e) > 159 { > 160 int a=A[e], b=B[e], ll=len[e], bt; > 161 if(burn_time[a]+ll == burn_time[b] || bu > 162 bt = max(burn_time[a], burn_time > 163 } else { > 164 bt = max(burn_time[a], burn_time > 165 } > 166 bt_min = min(bt_min, bt); > 167 } > 168 > 169 if(bt_min >= cand_time) > 170 answer.insert(cand_time); > 171 } > 172 } > 173 > 174 return answer.size(); > 175 } > 176 }; > 177 > 178 // BEGIN CUT HERE > 179 #include <ctime> > 180 double start_time; string timer() > 181 { ostringstream os; os << " (" << int((clock()-start_time)/CLOCKS_PER_SEC*1000) > 182 template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) > 183 { os << "{ "; > 184 for(typename vector<T>::const_iterator it=v.begin(); it!=v.end(); ++it) > 185 os << '\"' << *it << '\"' << (it+1==v.end() ? "" : ", "); os << " }"; return > 186 void verify_case(const int& Expected, const int& Received) { > 187 bool ok = (Expected == Received); > 188 if(ok) cerr << "PASSED" << timer() << endl; else { cerr << "FAILED" << timer() > 189 cerr << "\to: \"" << Expected << '\"' << endl << "\tx: \"" << Received << '\"' > 190 #define CASE(N) {cerr << "Test Case #" << N << "..." << flush; start_time=clock( > 191 #define END verify_case(_, CandleTimer().differentTime(A, B, len));} > 192 int main(){ > 193 > 194 CASE(0) > 195 int A_[] = {0,1}; > 196 vector <int> A(A_, A_+sizeof(A_)/sizeof(*A_)); > 197 int B_[] = {1,2}; > 198 vector <int> B(B_, B_+sizeof(B_)/sizeof(*B_)); > 199 int len_[] = {10,1}; > 200 vector <int> len(len_, len_+sizeof(len_)/sizeof(*len_)); > 201 int _ = 2; > 202 END > 203 CASE(1) > 204 int A_[] = {0,0,0}; > 205 vector <int> A(A_, A_+sizeof(A_)/sizeof(*A_)); > 206 int B_[] = {1,2,3}; > 207 vector <int> B(B_, B_+sizeof(B_)/sizeof(*B_)); > 208 int len_[] = {1,1,1}; > 209 vector <int> len(len_, len_+sizeof(len_)/sizeof(*len_)); > 210 int _ = 2; > 211 END > 212 CASE(2) > 213 int A_[] = {0,0,0}; > 214 vector <int> A(A_, A_+sizeof(A_)/sizeof(*A_)); > 215 int B_[] = {1,2,3}; > 216 vector <int> B(B_, B_+sizeof(B_)/sizeof(*B_)); > 217 int len_[] = {1,2,3}; > 218 vector <int> len(len_, len_+sizeof(len_)/sizeof(*len_)); > 219 int _ = 4; > 220 END > 221 CASE(3) > 222 int A_[] = {0,1,1,2,3,3,2,4}; > 223 vector <int> A(A_, A_+sizeof(A_)/sizeof(*A_)); > 224 int B_[] = {1,2,3,4,5,6,7,8}; > 225 vector <int> B(B_, B_+sizeof(B_)/sizeof(*B_)); > 226 int len_[] = {5,3,2,4,6,8,7,1}; > 227 vector <int> len(len_, len_+sizeof(len_)/sizeof(*len_)); > 228 int _ = 7; > 229 END > 230 CASE(4) > 231 int A_[] = {0,0,0,0}; > 232 vector <int> A(A_, A_+sizeof(A_)/sizeof(*A_)); > 233 int B_[] = {1,2,3,4}; > 234 vector <int> B(B_, B_+sizeof(B_)/sizeof(*B_)); > 235 int len_[] = {123,456,789,1000}; > 236 vector <int> len(len_, len_+sizeof(len_)/sizeof(*len_)); > 237 int _ = 8; > 238 END > 239 CASE(5) > 240 int A_[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23, > 241 vector <int> A(A_, A_+sizeof(A_)/sizeof(*A_)); > 242 int B_[] = {0,1,2,0,0,0,1,0,0,0,2,5,4,7,13,13,6,15,11,18,19,21,22,16,19, > 243 vector <int> B(B_, B_+sizeof(B_)/sizeof(*B_)); > 244 int len_[] = {59,58,147,169,34,14,150,55,156,151,130,109,124,15,100,1,15 > 245 vector <int> len(len_, len_+sizeof(len_)/sizeof(*len_)); > 246 int _ = 65; > 247 END > 248 CASE(6) > 249 int A_[] = {0}; > 250 vector <int> A(A_, A_+sizeof(A_)/sizeof(*A_)); > 251 int B_[] = {1}; > 252 vector <int> B(B_, B_+sizeof(B_)/sizeof(*B_)); > 253 int len_[] = {1000}; > 254 vector <int> len(len_, len_+sizeof(len_)/sizeof(*len_)); > 255 int _ = 2; > 256 END > 257 /* > 258 CASE(7) > 259 int A_[] = ; > 260 vector <int> A(A_, A_+sizeof(A_)/sizeof(*A_)); > 261 int B_[] = ; > 262 vector <int> B(B_, B_+sizeof(B_)/sizeof(*B_)); > 263 int len_[] = ; > 264 vector <int> len(len_, len_+sizeof(len_)/sizeof(*len_)); > 265 int _ = ; > 266 END > 267 CASE(8) > 268 int A_[] = ; > 269 vector <int> A(A_, A_+sizeof(A_)/sizeof(*A_)); > 270 int B_[] = ; > 271 vector <int> B(B_, B_+sizeof(B_)/sizeof(*B_)); > 272 int len_[] = ; > 273 vector <int> len(len_, len_+sizeof(len_)/sizeof(*len_)); > 274 int _ = ; > 275 END > 276 */ > 277 } > 278 // END CUT HERE