ba015e9217 2014-10-04 kinaba: #include <iostream> ba015e9217 2014-10-04 kinaba: #include <sstream> ba015e9217 2014-10-04 kinaba: #include <iomanip> ba015e9217 2014-10-04 kinaba: #include <vector> ba015e9217 2014-10-04 kinaba: #include <string> ba015e9217 2014-10-04 kinaba: #include <map> ba015e9217 2014-10-04 kinaba: #include <set> ba015e9217 2014-10-04 kinaba: #include <algorithm> ba015e9217 2014-10-04 kinaba: #include <numeric> ba015e9217 2014-10-04 kinaba: #include <iterator> ba015e9217 2014-10-04 kinaba: #include <functional> ba015e9217 2014-10-04 kinaba: #include <complex> ba015e9217 2014-10-04 kinaba: #include <queue> ba015e9217 2014-10-04 kinaba: #include <stack> ba015e9217 2014-10-04 kinaba: #include <cmath> ba015e9217 2014-10-04 kinaba: #include <cassert> ba015e9217 2014-10-04 kinaba: #include <tuple> ba015e9217 2014-10-04 kinaba: using namespace std; ba015e9217 2014-10-04 kinaba: typedef long long LL; ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: template<typename T> ba015e9217 2014-10-04 kinaba: class IdGen ba015e9217 2014-10-04 kinaba: { ba015e9217 2014-10-04 kinaba: map<T, int> v2id_; ba015e9217 2014-10-04 kinaba: vector<T> id2v_; ba015e9217 2014-10-04 kinaba: public: ba015e9217 2014-10-04 kinaba: int v2id(const T& v) { ba015e9217 2014-10-04 kinaba: if( !v2id_.count(v) ) { v2id_[v] = size(); id2v_.push_back(v); } ba015e9217 2014-10-04 kinaba: return v2id_[v]; ba015e9217 2014-10-04 kinaba: } ba015e9217 2014-10-04 kinaba: const T& id2v(int i) const { return id2v_[i]; } ba015e9217 2014-10-04 kinaba: int size() const { return id2v_.size(); } ba015e9217 2014-10-04 kinaba: }; ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: template<typename Vert, typename Flow, int NV=2048> ba015e9217 2014-10-04 kinaba: class MaxFlow ba015e9217 2014-10-04 kinaba: { ba015e9217 2014-10-04 kinaba: IdGen<Vert> idgen; ba015e9217 2014-10-04 kinaba: vector<int> G[NV]; ba015e9217 2014-10-04 kinaba: Flow F[NV][NV]; ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: public: ba015e9217 2014-10-04 kinaba: void addEdge( Vert s_, Vert t_, Flow f ) ba015e9217 2014-10-04 kinaba: { ba015e9217 2014-10-04 kinaba: const int s = idgen.v2id(s_), t = idgen.v2id(t_); ba015e9217 2014-10-04 kinaba: G[s].push_back(t); ba015e9217 2014-10-04 kinaba: G[t].push_back(s); ba015e9217 2014-10-04 kinaba: F[s][t] = f; ba015e9217 2014-10-04 kinaba: F[t][s] = 0; ba015e9217 2014-10-04 kinaba: } ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: Flow calc( Vert s_, Vert t_ ) ba015e9217 2014-10-04 kinaba: { ba015e9217 2014-10-04 kinaba: const int S = idgen.v2id(s_), D = idgen.v2id(t_); ba015e9217 2014-10-04 kinaba: for( Flow total=0 ;; ) { ba015e9217 2014-10-04 kinaba: // Do BFS and compute the level for each node. ba015e9217 2014-10-04 kinaba: int LV[NV] = {0}; ba015e9217 2014-10-04 kinaba: vector<int> Q(1, S); ba015e9217 2014-10-04 kinaba: for(int lv=1; !Q.empty(); ++lv) { ba015e9217 2014-10-04 kinaba: vector<int> Q2; ba015e9217 2014-10-04 kinaba: for(size_t i=0; i!=Q.size(); ++i) { ba015e9217 2014-10-04 kinaba: const vector<int>& ne = G[Q[i]]; ba015e9217 2014-10-04 kinaba: for(size_t j=0; j!=ne.size(); ++j) ba015e9217 2014-10-04 kinaba: if( F[Q[i]][ne[j]] && !LV[ne[j]] && ne[j]!=S ) ba015e9217 2014-10-04 kinaba: LV[ne[j]]=lv, Q2.push_back(ne[j]); ba015e9217 2014-10-04 kinaba: } ba015e9217 2014-10-04 kinaba: Q.swap(Q2); ba015e9217 2014-10-04 kinaba: } ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: // Destination is now unreachable. Done. ba015e9217 2014-10-04 kinaba: if( !LV[D] ) ba015e9217 2014-10-04 kinaba: return total; ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: // Iterating DFS. ba015e9217 2014-10-04 kinaba: bool blocked[NV] = {}; ba015e9217 2014-10-04 kinaba: total += dinic_dfs( S, D, LV, 0x7fffffff, blocked ); ba015e9217 2014-10-04 kinaba: } ba015e9217 2014-10-04 kinaba: } ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: private: ba015e9217 2014-10-04 kinaba: Flow dinic_dfs( int v, int D, int LV[], Flow flow_in, bool blocked[] ) ba015e9217 2014-10-04 kinaba: { ba015e9217 2014-10-04 kinaba: Flow flow_out = 0; ba015e9217 2014-10-04 kinaba: for(size_t i=0; i!=G[v].size(); ++i) { ba015e9217 2014-10-04 kinaba: int u = G[v][i]; ba015e9217 2014-10-04 kinaba: if( LV[v]+1==LV[u] && F[v][u] ) { ba015e9217 2014-10-04 kinaba: Flow f = min(flow_in-flow_out, F[v][u]); ba015e9217 2014-10-04 kinaba: if( u==D || !blocked[u] && (f=dinic_dfs(u,D,LV,f,blocked))>0 ) { ba015e9217 2014-10-04 kinaba: F[v][u] -= f; ba015e9217 2014-10-04 kinaba: F[u][v] += f; ba015e9217 2014-10-04 kinaba: flow_out += f; ba015e9217 2014-10-04 kinaba: if( flow_in == flow_out ) return flow_out; ba015e9217 2014-10-04 kinaba: } ba015e9217 2014-10-04 kinaba: } ba015e9217 2014-10-04 kinaba: } ba015e9217 2014-10-04 kinaba: blocked[v] = (flow_out==0); ba015e9217 2014-10-04 kinaba: return flow_out; ba015e9217 2014-10-04 kinaba: } ba015e9217 2014-10-04 kinaba: }; ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: typedef complex<int> CMP; ba015e9217 2014-10-04 kinaba: double outer_prod(const CMP& a, const CMP& b) { return imag(conj(a)*b); } ba015e9217 2014-10-04 kinaba: double inner_prod(const CMP& a, const CMP& b) { return real(conj(a)*b); } ba015e9217 2014-10-04 kinaba: int ccw(const CMP& a, CMP b, CMP c) { ba015e9217 2014-10-04 kinaba: b -= a; c -= a; ba015e9217 2014-10-04 kinaba: if( outer_prod(b,c) > 0 ) return +1; // counter clockwise ba015e9217 2014-10-04 kinaba: if( outer_prod(b,c) < 0 ) return -1; // clockwise ba015e9217 2014-10-04 kinaba: if( inner_prod(b,c) < 0 ) return +2; // c--[a--b] on line ba015e9217 2014-10-04 kinaba: if( norm(b) < norm(c) ) return -2; // [a--b]--c on line ba015e9217 2014-10-04 kinaba: return 0; // [a--c--b] on line ba015e9217 2014-10-04 kinaba: } ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: bool cross(int x1, int y1, int x2, int y2, ba015e9217 2014-10-04 kinaba: int X1, int Y1, int X2, int Y2) { ba015e9217 2014-10-04 kinaba: CMP p1(x1,y1); ba015e9217 2014-10-04 kinaba: CMP p2(x2,y2); ba015e9217 2014-10-04 kinaba: CMP P1(X1,Y1); ba015e9217 2014-10-04 kinaba: CMP P2(X2,Y2); ba015e9217 2014-10-04 kinaba: return ccw(p1,p2,P1)*ccw(p1,p2,P2)<=0 && ccw(P1,P2,p1)*ccw(P1,P2,p2)<=0; ba015e9217 2014-10-04 kinaba: } ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: class SegmentDrawing { public: ba015e9217 2014-10-04 kinaba: enum TAG {SRC, LEFT_R, RIGHT_R, LEFT_B, RIGHT_B, DST}; ba015e9217 2014-10-04 kinaba: static const int INF = 0x3fffffff; ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: int maxScore(vector <int> x, vector <int> y, vector <int> redScore, vector <int> blueScore) ba015e9217 2014-10-04 kinaba: { ba015e9217 2014-10-04 kinaba: const int N = x.size(); ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: vector<vector<bool>> cross_table(N*N, vector<bool>(N*N)); ba015e9217 2014-10-04 kinaba: for(int i=0; i<N; ++i) ba015e9217 2014-10-04 kinaba: for(int k=i+1; k<N; ++k) ba015e9217 2014-10-04 kinaba: for(int ii=0; ii<N; ++ii) ba015e9217 2014-10-04 kinaba: for(int kk=ii+1; kk<N; ++kk) ba015e9217 2014-10-04 kinaba: cross_table[i*N+k][ii*N+kk] = cross(x[i],y[i],x[k],y[k],x[ii],y[ii],x[kk],y[kk]); ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: auto* mf = new MaxFlow<pair<TAG,int>, LL>; ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: int all = 0; ba015e9217 2014-10-04 kinaba: for(int i=0; i<N; ++i) ba015e9217 2014-10-04 kinaba: for(int k=i+1; k<N; ++k) { ba015e9217 2014-10-04 kinaba: int p = i*N + k; ba015e9217 2014-10-04 kinaba: mf->addEdge(make_pair(SRC,0), make_pair(LEFT_R,p), redScore[p]); ba015e9217 2014-10-04 kinaba: mf->addEdge(make_pair(LEFT_R,p), make_pair(RIGHT_R,p), INF); ba015e9217 2014-10-04 kinaba: mf->addEdge(make_pair(RIGHT_R,p), make_pair(DST,0), 0); ba015e9217 2014-10-04 kinaba: mf->addEdge(make_pair(SRC,0), make_pair(LEFT_B,p), 0); ba015e9217 2014-10-04 kinaba: mf->addEdge(make_pair(LEFT_B,p), make_pair(RIGHT_B,p), INF); ba015e9217 2014-10-04 kinaba: mf->addEdge(make_pair(RIGHT_B,p), make_pair(DST,0), blueScore[p]); ba015e9217 2014-10-04 kinaba: all += redScore[p]; ba015e9217 2014-10-04 kinaba: all += blueScore[p]; ba015e9217 2014-10-04 kinaba: } ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: for(int i=0; i<N; ++i) ba015e9217 2014-10-04 kinaba: for(int k=i+1; k<N; ++k) ba015e9217 2014-10-04 kinaba: for(int ii=0; ii<N; ++ii) ba015e9217 2014-10-04 kinaba: for(int kk=ii+1; kk<N; ++kk) { ba015e9217 2014-10-04 kinaba: int rp = i*N + k; ba015e9217 2014-10-04 kinaba: int bp = ii*N + kk; ba015e9217 2014-10-04 kinaba: if(cross_table[rp][bp]) ba015e9217 2014-10-04 kinaba: mf->addEdge(make_pair(RIGHT_R,rp), make_pair(LEFT_B,bp), INF); ba015e9217 2014-10-04 kinaba: } ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: LL flow = mf->calc(make_pair(SRC,0), make_pair(DST,0)); ba015e9217 2014-10-04 kinaba: delete mf; ba015e9217 2014-10-04 kinaba: return all - flow; ba015e9217 2014-10-04 kinaba: } ba015e9217 2014-10-04 kinaba: }; ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: // BEGIN CUT HERE ba015e9217 2014-10-04 kinaba: #include <ctime> ba015e9217 2014-10-04 kinaba: double start_time; string timer() ba015e9217 2014-10-04 kinaba: { ostringstream os; os << " (" << int((clock()-start_time)/CLOCKS_PER_SEC*1000) << " msec)"; return os.str(); } ba015e9217 2014-10-04 kinaba: template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) ba015e9217 2014-10-04 kinaba: { os << "{ "; ba015e9217 2014-10-04 kinaba: for(typename vector<T>::const_iterator it=v.begin(); it!=v.end(); ++it) ba015e9217 2014-10-04 kinaba: os << '\"' << *it << '\"' << (it+1==v.end() ? "" : ", "); os << " }"; return os; } ba015e9217 2014-10-04 kinaba: void verify_case(const int& Expected, const int& Received) { ba015e9217 2014-10-04 kinaba: bool ok = (Expected == Received); ba015e9217 2014-10-04 kinaba: if(ok) cerr << "PASSED" << timer() << endl; else { cerr << "FAILED" << timer() << endl; ba015e9217 2014-10-04 kinaba: cerr << "\to: \"" << Expected << '\"' << endl << "\tx: \"" << Received << '\"' << endl; } } ba015e9217 2014-10-04 kinaba: #define CASE(N) {cerr << "Test Case #" << N << "..." << flush; start_time=clock(); ba015e9217 2014-10-04 kinaba: #define END verify_case(_, SegmentDrawing().maxScore(x, y, redScore, blueScore));} ba015e9217 2014-10-04 kinaba: int main(){ ba015e9217 2014-10-04 kinaba: ba015e9217 2014-10-04 kinaba: CASE(0) ba015e9217 2014-10-04 kinaba: int x_[] = {0,1,0,-1}; ba015e9217 2014-10-04 kinaba: vector <int> x(x_, x_+sizeof(x_)/sizeof(*x_)); ba015e9217 2014-10-04 kinaba: int y_[] = {1,0,-1,0}; ba015e9217 2014-10-04 kinaba: vector <int> y(y_, y_+sizeof(y_)/sizeof(*y_)); ba015e9217 2014-10-04 kinaba: int redScore_[] = {0, 1, 2, 3, ba015e9217 2014-10-04 kinaba: 1, 0, 6, 4, ba015e9217 2014-10-04 kinaba: 2, 6, 0, 5, ba015e9217 2014-10-04 kinaba: 3, 4, 5, 0}; ba015e9217 2014-10-04 kinaba: vector <int> redScore(redScore_, redScore_+sizeof(redScore_)/sizeof(*redScore_)); ba015e9217 2014-10-04 kinaba: int blueScore_[] = {0, 2, 3, 7, ba015e9217 2014-10-04 kinaba: 2, 0, 4, 6, ba015e9217 2014-10-04 kinaba: 3, 4, 0, 5, ba015e9217 2014-10-04 kinaba: 7, 6, 5, 0}; ba015e9217 2014-10-04 kinaba: vector <int> blueScore(blueScore_, blueScore_+sizeof(blueScore_)/sizeof(*blueScore_)); ba015e9217 2014-10-04 kinaba: int _ = 27; ba015e9217 2014-10-04 kinaba: END ba015e9217 2014-10-04 kinaba: CASE(1) ba015e9217 2014-10-04 kinaba: int x_[] = {0, 1}; ba015e9217 2014-10-04 kinaba: vector <int> x(x_, x_+sizeof(x_)/sizeof(*x_)); ba015e9217 2014-10-04 kinaba: int y_[] = {1, 0}; ba015e9217 2014-10-04 kinaba: vector <int> y(y_, y_+sizeof(y_)/sizeof(*y_)); ba015e9217 2014-10-04 kinaba: int redScore_[] = {0, 101, 101, 0}; ba015e9217 2014-10-04 kinaba: vector <int> redScore(redScore_, redScore_+sizeof(redScore_)/sizeof(*redScore_)); ba015e9217 2014-10-04 kinaba: int blueScore_[] = {0, 100, 100, 0}; ba015e9217 2014-10-04 kinaba: vector <int> blueScore(blueScore_, blueScore_+sizeof(blueScore_)/sizeof(*blueScore_)); ba015e9217 2014-10-04 kinaba: int _ = 101; ba015e9217 2014-10-04 kinaba: END ba015e9217 2014-10-04 kinaba: CASE(2) ba015e9217 2014-10-04 kinaba: int x_[] = {-3, -1, -1, 1, 1, 3}; ba015e9217 2014-10-04 kinaba: vector <int> x(x_, x_+sizeof(x_)/sizeof(*x_)); ba015e9217 2014-10-04 kinaba: int y_[] = { 0, -2, 2, -2, 2, 0}; ba015e9217 2014-10-04 kinaba: vector <int> y(y_, y_+sizeof(y_)/sizeof(*y_)); ba015e9217 2014-10-04 kinaba: int redScore_[] = {0, 2, 1, 2, 1, 2, ba015e9217 2014-10-04 kinaba: 2, 0, 2, 1, 2, 1, ba015e9217 2014-10-04 kinaba: 1, 2, 0, 2, 1, 2, ba015e9217 2014-10-04 kinaba: 2, 1, 2, 0, 2, 1, ba015e9217 2014-10-04 kinaba: 1, 2, 1, 2, 0, 2, ba015e9217 2014-10-04 kinaba: 2, 1, 2, 1, 2, 0}; ba015e9217 2014-10-04 kinaba: vector <int> redScore(redScore_, redScore_+sizeof(redScore_)/sizeof(*redScore_)); ba015e9217 2014-10-04 kinaba: int blueScore_[] = {0, 0, 0, 0, 0, 0, ba015e9217 2014-10-04 kinaba: 0, 0, 0, 0, 0, 0, ba015e9217 2014-10-04 kinaba: 0, 0, 0, 21, 0, 0, ba015e9217 2014-10-04 kinaba: 0, 0, 21, 0, 0, 0, ba015e9217 2014-10-04 kinaba: 0, 0, 0, 0, 0, 0, ba015e9217 2014-10-04 kinaba: 0, 0, 0, 0, 0, 0}; ba015e9217 2014-10-04 kinaba: vector <int> blueScore(blueScore_, blueScore_+sizeof(blueScore_)/sizeof(*blueScore_)); ba015e9217 2014-10-04 kinaba: int _ = 25; ba015e9217 2014-10-04 kinaba: END ba015e9217 2014-10-04 kinaba: CASE(3) ba015e9217 2014-10-04 kinaba: int x_[] = {-100, 100, 0, -10, 10, 0}; ba015e9217 2014-10-04 kinaba: vector <int> x(x_, x_+sizeof(x_)/sizeof(*x_)); ba015e9217 2014-10-04 kinaba: int y_[] = {0, 0, 100, 10, 10, 1}; ba015e9217 2014-10-04 kinaba: vector <int> y(y_, y_+sizeof(y_)/sizeof(*y_)); ba015e9217 2014-10-04 kinaba: int redScore_[] = { 0, 96, 96, 25, 25, 25, ba015e9217 2014-10-04 kinaba: 96, 0, 96, 25, 25, 25, ba015e9217 2014-10-04 kinaba: 96, 96, 0, 25, 25, 25, ba015e9217 2014-10-04 kinaba: 25, 25, 25, 0, 10, 10, ba015e9217 2014-10-04 kinaba: 25, 25, 25, 10, 0, 10, ba015e9217 2014-10-04 kinaba: 25, 25, 25, 10, 10, 0}; ba015e9217 2014-10-04 kinaba: vector <int> redScore(redScore_, redScore_+sizeof(redScore_)/sizeof(*redScore_)); ba015e9217 2014-10-04 kinaba: int blueScore_[] = { 0, 30, 30, 20, 20, 20, ba015e9217 2014-10-04 kinaba: 30, 0, 30, 20, 20, 20, ba015e9217 2014-10-04 kinaba: 30, 30, 0, 20, 20, 20, ba015e9217 2014-10-04 kinaba: 20, 20, 20, 0, 86, 86, ba015e9217 2014-10-04 kinaba: 20, 20, 20, 86, 0, 86, ba015e9217 2014-10-04 kinaba: 20, 20, 20, 86, 86, 0}; ba015e9217 2014-10-04 kinaba: vector <int> blueScore(blueScore_, blueScore_+sizeof(blueScore_)/sizeof(*blueScore_)); ba015e9217 2014-10-04 kinaba: int _ = 546; ba015e9217 2014-10-04 kinaba: END ba015e9217 2014-10-04 kinaba: CASE(4) ba015e9217 2014-10-04 kinaba: int x_[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; ba015e9217 2014-10-04 kinaba: vector <int> x(x_, x_+sizeof(x_)/sizeof(*x_)); ba015e9217 2014-10-04 kinaba: int y_[] = {1, 4, 9, 16, 25, 36, 49, 64, 81, 100}; ba015e9217 2014-10-04 kinaba: vector <int> y(y_, y_+sizeof(y_)/sizeof(*y_)); ba015e9217 2014-10-04 kinaba: int redScore_[] = {0, 15, 2, 3, 4, 5, 6, 7, 8, 9, ba015e9217 2014-10-04 kinaba: 15, 0, 15, 2, 3, 4, 5, 6, 7, 8, ba015e9217 2014-10-04 kinaba: 2, 15, 0, 15, 2, 3, 4, 5, 6, 7, ba015e9217 2014-10-04 kinaba: 3, 2, 15, 0, 15, 2, 3, 4, 5, 6, ba015e9217 2014-10-04 kinaba: 4, 3, 2, 15, 0, 15, 2, 3, 4, 5, ba015e9217 2014-10-04 kinaba: 5, 4, 3, 2, 15, 0, 15, 2, 3, 4, ba015e9217 2014-10-04 kinaba: 6, 5, 4, 3, 2, 15, 0, 15, 2, 3, ba015e9217 2014-10-04 kinaba: 7, 6, 5, 4, 3, 2, 15, 0, 15, 2, ba015e9217 2014-10-04 kinaba: 8, 7, 6, 5, 4, 3, 2, 15, 0, 15, ba015e9217 2014-10-04 kinaba: 9, 8, 7, 6, 5, 4, 3, 2, 15, 0} ba015e9217 2014-10-04 kinaba: ; ba015e9217 2014-10-04 kinaba: vector <int> redScore(redScore_, redScore_+sizeof(redScore_)/sizeof(*redScore_)); ba015e9217 2014-10-04 kinaba: int blueScore_[] = {0, 0, 2, 3, 4, 5, 6, 7, 8, 9, ba015e9217 2014-10-04 kinaba: 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, ba015e9217 2014-10-04 kinaba: 2, 0, 0, 0, 2, 3, 4, 5, 6, 7, ba015e9217 2014-10-04 kinaba: 3, 2, 0, 0, 0, 2, 3, 4, 5, 6, ba015e9217 2014-10-04 kinaba: 4, 3, 2, 0, 0, 100, 2, 3, 4, 5, ba015e9217 2014-10-04 kinaba: 5, 4, 3, 2, 100, 0, 0, 2, 3, 4, ba015e9217 2014-10-04 kinaba: 6, 5, 4, 3, 2, 0, 0, 0, 2, 3, ba015e9217 2014-10-04 kinaba: 7, 6, 5, 4, 3, 2, 0, 0, 0, 2, ba015e9217 2014-10-04 kinaba: 8, 7, 6, 5, 4, 3, 2, 0, 0, 0, ba015e9217 2014-10-04 kinaba: 9, 8, 7, 6, 5, 4, 3, 2, 0, 0}; ba015e9217 2014-10-04 kinaba: vector <int> blueScore(blueScore_, blueScore_+sizeof(blueScore_)/sizeof(*blueScore_)); ba015e9217 2014-10-04 kinaba: int _ = 300; ba015e9217 2014-10-04 kinaba: END ba015e9217 2014-10-04 kinaba: /* ba015e9217 2014-10-04 kinaba: CASE(5) ba015e9217 2014-10-04 kinaba: int x_[] = ; ba015e9217 2014-10-04 kinaba: vector <int> x(x_, x_+sizeof(x_)/sizeof(*x_)); ba015e9217 2014-10-04 kinaba: int y_[] = ; ba015e9217 2014-10-04 kinaba: vector <int> y(y_, y_+sizeof(y_)/sizeof(*y_)); ba015e9217 2014-10-04 kinaba: int redScore_[] = ; ba015e9217 2014-10-04 kinaba: vector <int> redScore(redScore_, redScore_+sizeof(redScore_)/sizeof(*redScore_)); ba015e9217 2014-10-04 kinaba: int blueScore_[] = ; ba015e9217 2014-10-04 kinaba: vector <int> blueScore(blueScore_, blueScore_+sizeof(blueScore_)/sizeof(*blueScore_)); ba015e9217 2014-10-04 kinaba: int _ = ; ba015e9217 2014-10-04 kinaba: END ba015e9217 2014-10-04 kinaba: CASE(6) ba015e9217 2014-10-04 kinaba: int x_[] = ; ba015e9217 2014-10-04 kinaba: vector <int> x(x_, x_+sizeof(x_)/sizeof(*x_)); ba015e9217 2014-10-04 kinaba: int y_[] = ; ba015e9217 2014-10-04 kinaba: vector <int> y(y_, y_+sizeof(y_)/sizeof(*y_)); ba015e9217 2014-10-04 kinaba: int redScore_[] = ; ba015e9217 2014-10-04 kinaba: vector <int> redScore(redScore_, redScore_+sizeof(redScore_)/sizeof(*redScore_)); ba015e9217 2014-10-04 kinaba: int blueScore_[] = ; ba015e9217 2014-10-04 kinaba: vector <int> blueScore(blueScore_, blueScore_+sizeof(blueScore_)/sizeof(*blueScore_)); ba015e9217 2014-10-04 kinaba: int _ = ; ba015e9217 2014-10-04 kinaba: END ba015e9217 2014-10-04 kinaba: */ ba015e9217 2014-10-04 kinaba: } ba015e9217 2014-10-04 kinaba: // END CUT HERE