34dd53bac9 2012-06-07 kinaba: #include <iostream> 34dd53bac9 2012-06-07 kinaba: #include <sstream> 34dd53bac9 2012-06-07 kinaba: #include <iomanip> 34dd53bac9 2012-06-07 kinaba: #include <vector> 34dd53bac9 2012-06-07 kinaba: #include <string> 34dd53bac9 2012-06-07 kinaba: #include <map> 34dd53bac9 2012-06-07 kinaba: #include <set> 34dd53bac9 2012-06-07 kinaba: #include <algorithm> 34dd53bac9 2012-06-07 kinaba: #include <numeric> 34dd53bac9 2012-06-07 kinaba: #include <iterator> 34dd53bac9 2012-06-07 kinaba: #include <functional> 34dd53bac9 2012-06-07 kinaba: #include <complex> 34dd53bac9 2012-06-07 kinaba: #include <queue> 34dd53bac9 2012-06-07 kinaba: #include <stack> 34dd53bac9 2012-06-07 kinaba: #include <cmath> 34dd53bac9 2012-06-07 kinaba: #include <cassert> 34dd53bac9 2012-06-07 kinaba: using namespace std; 34dd53bac9 2012-06-07 kinaba: typedef long long LL; 34dd53bac9 2012-06-07 kinaba: typedef long double LD; 34dd53bac9 2012-06-07 kinaba: typedef complex<LD> CMP; 34dd53bac9 2012-06-07 kinaba: 34dd53bac9 2012-06-07 kinaba: class GreedyTravelingSalesman { public: 34dd53bac9 2012-06-07 kinaba: int worstDistance(vector <string> thousands, vector <string> hundreds, vector <string> tens, vector <string> ones) 34dd53bac9 2012-06-07 kinaba: { 34dd53bac9 2012-06-07 kinaba: int N = thousands.size(); 34dd53bac9 2012-06-07 kinaba: vector< vector<int> > d(N, vector<int>(N)); 34dd53bac9 2012-06-07 kinaba: for(int a=0; a<N; ++a) 34dd53bac9 2012-06-07 kinaba: for(int b=0; b<N; ++b) 34dd53bac9 2012-06-07 kinaba: d[a][b] = (thousands[a][b]-'0')*1000+(hundreds[a][b]-'0')*100+(tens[a][b]-'0')*10+(ones[a][b]-'0'); 34dd53bac9 2012-06-07 kinaba: 34dd53bac9 2012-06-07 kinaba: int worst = 0; 34dd53bac9 2012-06-07 kinaba: for(int a=0; a<N; ++a) 34dd53bac9 2012-06-07 kinaba: for(int b=0; b<N; ++b) { 34dd53bac9 2012-06-07 kinaba: const int t = d[a][b]; 34dd53bac9 2012-06-07 kinaba: 34dd53bac9 2012-06-07 kinaba: vector<int> cand = d[a]; 34dd53bac9 2012-06-07 kinaba: for(int c=0; c<N; ++c) { 34dd53bac9 2012-06-07 kinaba: if(b>c && d[a][c]-1>=1) 34dd53bac9 2012-06-07 kinaba: cand.push_back(d[a][c]-1); 34dd53bac9 2012-06-07 kinaba: } 34dd53bac9 2012-06-07 kinaba: cand.push_back(1); 34dd53bac9 2012-06-07 kinaba: cand.push_back(9999); 34dd53bac9 2012-06-07 kinaba: for(int i=0; i<cand.size(); ++i) if(1<=cand[i]&&cand[i]<=9999){ 34dd53bac9 2012-06-07 kinaba: d[a][b] = cand[i]; 34dd53bac9 2012-06-07 kinaba: worst = max(worst, goGreedy(d, N)); 34dd53bac9 2012-06-07 kinaba: } 34dd53bac9 2012-06-07 kinaba: d[a][b] = t; 34dd53bac9 2012-06-07 kinaba: } 34dd53bac9 2012-06-07 kinaba: return worst; 34dd53bac9 2012-06-07 kinaba: } 34dd53bac9 2012-06-07 kinaba: 34dd53bac9 2012-06-07 kinaba: int goGreedy(vector< vector<int> >& d, int N) 34dd53bac9 2012-06-07 kinaba: { 34dd53bac9 2012-06-07 kinaba: vector<bool> v(N); 34dd53bac9 2012-06-07 kinaba: int p = 0; 34dd53bac9 2012-06-07 kinaba: int total = 0; 34dd53bac9 2012-06-07 kinaba: for(;;) { 34dd53bac9 2012-06-07 kinaba: v[p] = true; 34dd53bac9 2012-06-07 kinaba: vector< pair<int,int> > cand; 34dd53bac9 2012-06-07 kinaba: for(int q=0; q<N; ++q) 34dd53bac9 2012-06-07 kinaba: if(!v[q]) 34dd53bac9 2012-06-07 kinaba: cand.push_back(make_pair(d[p][q],q)); 34dd53bac9 2012-06-07 kinaba: if(cand.empty()) 34dd53bac9 2012-06-07 kinaba: return total; 34dd53bac9 2012-06-07 kinaba: int q = min_element(cand.begin(), cand.end())->second; 34dd53bac9 2012-06-07 kinaba: total += d[p][q]; 34dd53bac9 2012-06-07 kinaba: p = q; 34dd53bac9 2012-06-07 kinaba: } 34dd53bac9 2012-06-07 kinaba: } 34dd53bac9 2012-06-07 kinaba: }; 34dd53bac9 2012-06-07 kinaba: 34dd53bac9 2012-06-07 kinaba: // BEGIN CUT HERE 34dd53bac9 2012-06-07 kinaba: #include <ctime> 34dd53bac9 2012-06-07 kinaba: double start_time; string timer() 34dd53bac9 2012-06-07 kinaba: { ostringstream os; os << " (" << int((clock()-start_time)/CLOCKS_PER_SEC*1000) << " msec)"; return os.str(); } 34dd53bac9 2012-06-07 kinaba: template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) 34dd53bac9 2012-06-07 kinaba: { os << "{ "; 34dd53bac9 2012-06-07 kinaba: for(typename vector<T>::const_iterator it=v.begin(); it!=v.end(); ++it) 34dd53bac9 2012-06-07 kinaba: os << '\"' << *it << '\"' << (it+1==v.end() ? "" : ", "); os << " }"; return os; } 34dd53bac9 2012-06-07 kinaba: void verify_case(const int& Expected, const int& Received) { 34dd53bac9 2012-06-07 kinaba: bool ok = (Expected == Received); 34dd53bac9 2012-06-07 kinaba: if(ok) cerr << "PASSED" << timer() << endl; else { cerr << "FAILED" << timer() << endl; 34dd53bac9 2012-06-07 kinaba: cerr << "\to: \"" << Expected << '\"' << endl << "\tx: \"" << Received << '\"' << endl; } } 34dd53bac9 2012-06-07 kinaba: #define CASE(N) {cerr << "Test Case #" << N << "..." << flush; start_time=clock(); 34dd53bac9 2012-06-07 kinaba: #define END verify_case(_, GreedyTravelingSalesman().worstDistance(thousands, hundreds, tens, ones));} 34dd53bac9 2012-06-07 kinaba: int main(){ 34dd53bac9 2012-06-07 kinaba: 34dd53bac9 2012-06-07 kinaba: CASE(0) 34dd53bac9 2012-06-07 kinaba: string thousands_[] = {"055", "505", "550"}; 34dd53bac9 2012-06-07 kinaba: vector <string> thousands(thousands_, thousands_+sizeof(thousands_)/sizeof(*thousands_)); 34dd53bac9 2012-06-07 kinaba: string hundreds_[] = {"000", "000", "000"}; 34dd53bac9 2012-06-07 kinaba: vector <string> hundreds(hundreds_, hundreds_+sizeof(hundreds_)/sizeof(*hundreds_)); 34dd53bac9 2012-06-07 kinaba: string tens_[] = {"000", "000", "000"}; 34dd53bac9 2012-06-07 kinaba: vector <string> tens(tens_, tens_+sizeof(tens_)/sizeof(*tens_)); 34dd53bac9 2012-06-07 kinaba: string ones_[] = {"000", "000", "000"}; 34dd53bac9 2012-06-07 kinaba: vector <string> ones(ones_, ones_+sizeof(ones_)/sizeof(*ones_)); 34dd53bac9 2012-06-07 kinaba: int _ = 14999; 34dd53bac9 2012-06-07 kinaba: END 34dd53bac9 2012-06-07 kinaba: CASE(1) 34dd53bac9 2012-06-07 kinaba: string thousands_[] = {"018", "101", "990"}; 34dd53bac9 2012-06-07 kinaba: vector <string> thousands(thousands_, thousands_+sizeof(thousands_)/sizeof(*thousands_)); 34dd53bac9 2012-06-07 kinaba: string hundreds_[] = {"000", "000", "990"}; 34dd53bac9 2012-06-07 kinaba: vector <string> hundreds(hundreds_, hundreds_+sizeof(hundreds_)/sizeof(*hundreds_)); 34dd53bac9 2012-06-07 kinaba: string tens_[] = {"000", "000", "990"}; 34dd53bac9 2012-06-07 kinaba: vector <string> tens(tens_, tens_+sizeof(tens_)/sizeof(*tens_)); 34dd53bac9 2012-06-07 kinaba: string ones_[] = {"000", "000", "990"}; 34dd53bac9 2012-06-07 kinaba: vector <string> ones(ones_, ones_+sizeof(ones_)/sizeof(*ones_)); 34dd53bac9 2012-06-07 kinaba: int _ = 17999; 34dd53bac9 2012-06-07 kinaba: END 34dd53bac9 2012-06-07 kinaba: CASE(2) 34dd53bac9 2012-06-07 kinaba: string thousands_[] = {"00888", "00999", "00099", "00009", "00000"} 34dd53bac9 2012-06-07 kinaba: ; 34dd53bac9 2012-06-07 kinaba: vector <string> thousands(thousands_, thousands_+sizeof(thousands_)/sizeof(*thousands_)); 34dd53bac9 2012-06-07 kinaba: string hundreds_[] = {"00000", "00999", "00099", "00009", "00000"} 34dd53bac9 2012-06-07 kinaba: ; 34dd53bac9 2012-06-07 kinaba: vector <string> hundreds(hundreds_, hundreds_+sizeof(hundreds_)/sizeof(*hundreds_)); 34dd53bac9 2012-06-07 kinaba: string tens_[] = {"00000", "10999", "11099", "11109", "11110"} 34dd53bac9 2012-06-07 kinaba: ; 34dd53bac9 2012-06-07 kinaba: vector <string> tens(tens_, tens_+sizeof(tens_)/sizeof(*tens_)); 34dd53bac9 2012-06-07 kinaba: string ones_[] = {"01000", "00999", "00099", "00009", "00000"} 34dd53bac9 2012-06-07 kinaba: ; 34dd53bac9 2012-06-07 kinaba: vector <string> ones(ones_, ones_+sizeof(ones_)/sizeof(*ones_)); 34dd53bac9 2012-06-07 kinaba: int _ = 37997; 34dd53bac9 2012-06-07 kinaba: END 34dd53bac9 2012-06-07 kinaba: CASE(3) 34dd53bac9 2012-06-07 kinaba: string thousands_[] = {"000000", "000000", "990999", "999099", "999909", "999990"}; 34dd53bac9 2012-06-07 kinaba: vector <string> thousands(thousands_, thousands_+sizeof(thousands_)/sizeof(*thousands_)); 34dd53bac9 2012-06-07 kinaba: string hundreds_[] = {"000000", "000000", "990999", "999099", "999909", "999990"}; 34dd53bac9 2012-06-07 kinaba: vector <string> hundreds(hundreds_, hundreds_+sizeof(hundreds_)/sizeof(*hundreds_)); 34dd53bac9 2012-06-07 kinaba: string tens_[] = {"000000", "000000", "990999", "999099", "999909", "999990"}; 34dd53bac9 2012-06-07 kinaba: vector <string> tens(tens_, tens_+sizeof(tens_)/sizeof(*tens_)); 34dd53bac9 2012-06-07 kinaba: string ones_[] = {"011111", "101111", "990998", "999099", "999809", "999980"}; 34dd53bac9 2012-06-07 kinaba: vector <string> ones(ones_, ones_+sizeof(ones_)/sizeof(*ones_)); 34dd53bac9 2012-06-07 kinaba: int _ = 39994; 34dd53bac9 2012-06-07 kinaba: END 34dd53bac9 2012-06-07 kinaba: CASE(4) 34dd53bac9 2012-06-07 kinaba: string thousands_[] = {"00", "00"}; 34dd53bac9 2012-06-07 kinaba: vector <string> thousands(thousands_, thousands_+sizeof(thousands_)/sizeof(*thousands_)); 34dd53bac9 2012-06-07 kinaba: string hundreds_[] = {"00", "00"}; 34dd53bac9 2012-06-07 kinaba: vector <string> hundreds(hundreds_, hundreds_+sizeof(hundreds_)/sizeof(*hundreds_)); 34dd53bac9 2012-06-07 kinaba: string tens_[] = {"00", "00"}; 34dd53bac9 2012-06-07 kinaba: vector <string> tens(tens_, tens_+sizeof(tens_)/sizeof(*tens_)); 34dd53bac9 2012-06-07 kinaba: string ones_[] = {"01", "10"}; 34dd53bac9 2012-06-07 kinaba: vector <string> ones(ones_, ones_+sizeof(ones_)/sizeof(*ones_)); 34dd53bac9 2012-06-07 kinaba: int _ = 9999; 34dd53bac9 2012-06-07 kinaba: END 34dd53bac9 2012-06-07 kinaba: CASE(5) 34dd53bac9 2012-06-07 kinaba: string thousands_[] = {"0930", "1064", "0104", "1070"}; 34dd53bac9 2012-06-07 kinaba: vector <string> thousands(thousands_, thousands_+sizeof(thousands_)/sizeof(*thousands_)); 34dd53bac9 2012-06-07 kinaba: string hundreds_[] = {"0523", "1062", "6305", "0810"}; 34dd53bac9 2012-06-07 kinaba: vector <string> hundreds(hundreds_, hundreds_+sizeof(hundreds_)/sizeof(*hundreds_)); 34dd53bac9 2012-06-07 kinaba: string tens_[] = {"0913", "0087", "3109", "1500"}; 34dd53bac9 2012-06-07 kinaba: vector <string> tens(tens_, tens_+sizeof(tens_)/sizeof(*tens_)); 34dd53bac9 2012-06-07 kinaba: string ones_[] = {"0988", "2030", "6103", "5530"}; 34dd53bac9 2012-06-07 kinaba: vector <string> ones(ones_, ones_+sizeof(ones_)/sizeof(*ones_)); 34dd53bac9 2012-06-07 kinaba: int _ = 14124; 34dd53bac9 2012-06-07 kinaba: END 34dd53bac9 2012-06-07 kinaba: CASE(6) 34dd53bac9 2012-06-07 kinaba: string thousands_[] = {"0329", "2036", "2502", "8970"}; 34dd53bac9 2012-06-07 kinaba: vector <string> thousands(thousands_, thousands_+sizeof(thousands_)/sizeof(*thousands_)); 34dd53bac9 2012-06-07 kinaba: string hundreds_[] = {"0860", "5007", "0404", "2770"}; 34dd53bac9 2012-06-07 kinaba: vector <string> hundreds(hundreds_, hundreds_+sizeof(hundreds_)/sizeof(*hundreds_)); 34dd53bac9 2012-06-07 kinaba: string tens_[] = {"0111", "2087", "2009", "2670"}; 34dd53bac9 2012-06-07 kinaba: vector <string> tens(tens_, tens_+sizeof(tens_)/sizeof(*tens_)); 34dd53bac9 2012-06-07 kinaba: string ones_[] = {"0644", "1094", "7703", "7550"}; 34dd53bac9 2012-06-07 kinaba: vector <string> ones(ones_, ones_+sizeof(ones_)/sizeof(*ones_)); 34dd53bac9 2012-06-07 kinaba: int _ = 17785; 34dd53bac9 2012-06-07 kinaba: END 34dd53bac9 2012-06-07 kinaba: CASE(7) 34dd53bac9 2012-06-07 kinaba: string thousands_[] = {"098444156277392825243100607342", "200097656837707947798866622385", 34dd53bac9 2012-06-07 kinaba: "290231695687128834848596019656", "407026565077650435591867333275", 34dd53bac9 2012-06-07 kinaba: "843401002617957470339040852874", "349970591997218853400632158696", 34dd53bac9 2012-06-07 kinaba: "419933000593511123878416328483", "696294503254214847884399055978", 34dd53bac9 2012-06-07 kinaba: "641473980706392541888675375279", "936720077098054565078142449625", 34dd53bac9 2012-06-07 kinaba: "203476089500970673371115103717", "511071853860312304204656816567", 34dd53bac9 2012-06-07 kinaba: "347105714685052402147763392257", "125122220860203856679947732062", 34dd53bac9 2012-06-07 kinaba: "121462979669220132944063071653", "928254504048223043681383050365", 34dd53bac9 2012-06-07 kinaba: "502607124708785202536036594373", "793596587517012870906900400361", 34dd53bac9 2012-06-07 kinaba: "712360060935346182084840996318", "761671392040312345002273366240", 34dd53bac9 2012-06-07 kinaba: "812935320276738878200716148806", "228506917464479046839069740872", 34dd53bac9 2012-06-07 kinaba: "755395721473881083093906155745", "192597782177910118061710039501", 34dd53bac9 2012-06-07 kinaba: "721382839206745793530453013267", "076061794267810491768114700256", 34dd53bac9 2012-06-07 kinaba: "857528357758085424372388710251", "173322450800442594145600093043", 34dd53bac9 2012-06-07 kinaba: "761667192345925280210514410800", "521229810525064090301842864060"}; 34dd53bac9 2012-06-07 kinaba: vector <string> thousands(thousands_, thousands_+sizeof(thousands_)/sizeof(*thousands_)); 34dd53bac9 2012-06-07 kinaba: string hundreds_[] = {"098270581534726237580246464451", "108829763716747148395013332067", 34dd53bac9 2012-06-07 kinaba: "830061279541380758964430491222", "431005058477371114834129826284", 34dd53bac9 2012-06-07 kinaba: "601807314489142917339949914290", "330640126699733151822328009407", 34dd53bac9 2012-06-07 kinaba: "851821069798846354566780680271", "648888407535627630663351884365", 34dd53bac9 2012-06-07 kinaba: "051398660825518466890170447894", "631934884097214069747147155777", 34dd53bac9 2012-06-07 kinaba: "768071219404930950472885304916", "924954163330715847561718395488", 34dd53bac9 2012-06-07 kinaba: "189910033179029204426829479070", "960645776060701332402794474433", 34dd53bac9 2012-06-07 kinaba: "244875842263950931884758650019", "528470075229660077692189442311", 34dd53bac9 2012-06-07 kinaba: "752198673046476808978058423064", "899325998610605600525587569431", 34dd53bac9 2012-06-07 kinaba: "965750123741820904031880230236", "121658852172052167706008445728", 34dd53bac9 2012-06-07 kinaba: "556199378085507717770434101126", "864838242791403197110088834005", 34dd53bac9 2012-06-07 kinaba: "593435343245223500439707230479", "622529771475840345624500421425", 34dd53bac9 2012-06-07 kinaba: "503486612623475041392122088159", "518334626169655694269507400008", 34dd53bac9 2012-06-07 kinaba: "967091631529233593414345370288", "300474162107271438029222620086", 34dd53bac9 2012-06-07 kinaba: "010527691044447729596127150108", "742822904991333205419603623270"}; 34dd53bac9 2012-06-07 kinaba: vector <string> hundreds(hundreds_, hundreds_+sizeof(hundreds_)/sizeof(*hundreds_)); 34dd53bac9 2012-06-07 kinaba: string tens_[] = {"029421809872798033258029765788", "705135039569772524273274786652", 34dd53bac9 2012-06-07 kinaba: "170567418260893393020344098265", "401043354947659563658581268242", 34dd53bac9 2012-06-07 kinaba: "746709065616595245635350557925", "739570024549618413776557843034", 34dd53bac9 2012-06-07 kinaba: "184597012262496958610853505745", "689811400727818703807051112784", 34dd53bac9 2012-06-07 kinaba: "894453010121164288965541305235", "323145029073008946088869964941", 34dd53bac9 2012-06-07 kinaba: "834269564400729646453274750586", "538976762970745472202055589093", 34dd53bac9 2012-06-07 kinaba: "765511399939087047106252621388", "906733295711605356366138410423", 34dd53bac9 2012-06-07 kinaba: "107653940551700559321642810836", "428402693021051075533830345295", 34dd53bac9 2012-06-07 kinaba: "386782660475155103347385287948", "936626025836194580089064628716", 34dd53bac9 2012-06-07 kinaba: "718522629491464055045890912121", "370656945845300237607868352243", 34dd53bac9 2012-06-07 kinaba: "951908186614186444840337711498", "535178875249889835014025850038", 34dd53bac9 2012-06-07 kinaba: "505970047705717604298603983975", "484398304612602344941130624527", 34dd53bac9 2012-06-07 kinaba: "048342694079170795987835013947", "860331019262176299872846206272", 34dd53bac9 2012-06-07 kinaba: "549663926438975145562538360932", "329735455392841851511474791078", 34dd53bac9 2012-06-07 kinaba: "711755200061373546828858448100", "778808866574640894148527759780"}; 34dd53bac9 2012-06-07 kinaba: vector <string> tens(tens_, tens_+sizeof(tens_)/sizeof(*tens_)); 34dd53bac9 2012-06-07 kinaba: string ones_[] = {"050738147930236727719964251439", "804492562859282318664226330103", 34dd53bac9 2012-06-07 kinaba: "610197568193830684654773608216", "279000416545607314567843085541", 34dd53bac9 2012-06-07 kinaba: "782201171759873927350740022455", "043370803444176631019883186675", 34dd53bac9 2012-06-07 kinaba: "566092086050401228622782761449", "469598907881602996036692882305", 34dd53bac9 2012-06-07 kinaba: "116923500417992303845370254124", "796876115092839169954790509461", 34dd53bac9 2012-06-07 kinaba: "783836410405270687557924090071", "095144151150833738671751747749", 34dd53bac9 2012-06-07 kinaba: "354474585664039135189964700948", "328968176148004939648962631420", 34dd53bac9 2012-06-07 kinaba: "829651915384290848347221555092", "170980383407813034573738951375", 34dd53bac9 2012-06-07 kinaba: "728655435703349509419725538350", "121896684176286430427852435647", 34dd53bac9 2012-06-07 kinaba: "315710894574884960021671476788", "592177839598531202003634382961", 34dd53bac9 2012-06-07 kinaba: "876587919610157913350259498196", "505517243779897451333006271744", 34dd53bac9 2012-06-07 kinaba: "618607877753891664471800511372", "826358757330233811836040764274", 34dd53bac9 2012-06-07 kinaba: "206641252044293046424432092833", "704519364781672964993499009545", 34dd53bac9 2012-06-07 kinaba: "624793571592392775564426440338", "571938479010503551295729304078", 34dd53bac9 2012-06-07 kinaba: "077967252884369103891335711508", "870185204806328841827105139840"}; 34dd53bac9 2012-06-07 kinaba: vector <string> ones(ones_, ones_+sizeof(ones_)/sizeof(*ones_)); 34dd53bac9 2012-06-07 kinaba: int _ = 39896; 34dd53bac9 2012-06-07 kinaba: END 34dd53bac9 2012-06-07 kinaba: /* 34dd53bac9 2012-06-07 kinaba: CASE(8) 34dd53bac9 2012-06-07 kinaba: string thousands_[] = ; 34dd53bac9 2012-06-07 kinaba: vector <string> thousands(thousands_, thousands_+sizeof(thousands_)/sizeof(*thousands_)); 34dd53bac9 2012-06-07 kinaba: string hundreds_[] = ; 34dd53bac9 2012-06-07 kinaba: vector <string> hundreds(hundreds_, hundreds_+sizeof(hundreds_)/sizeof(*hundreds_)); 34dd53bac9 2012-06-07 kinaba: string tens_[] = ; 34dd53bac9 2012-06-07 kinaba: vector <string> tens(tens_, tens_+sizeof(tens_)/sizeof(*tens_)); 34dd53bac9 2012-06-07 kinaba: string ones_[] = ; 34dd53bac9 2012-06-07 kinaba: vector <string> ones(ones_, ones_+sizeof(ones_)/sizeof(*ones_)); 34dd53bac9 2012-06-07 kinaba: int _ = ; 34dd53bac9 2012-06-07 kinaba: END 34dd53bac9 2012-06-07 kinaba: CASE(9) 34dd53bac9 2012-06-07 kinaba: string thousands_[] = ; 34dd53bac9 2012-06-07 kinaba: vector <string> thousands(thousands_, thousands_+sizeof(thousands_)/sizeof(*thousands_)); 34dd53bac9 2012-06-07 kinaba: string hundreds_[] = ; 34dd53bac9 2012-06-07 kinaba: vector <string> hundreds(hundreds_, hundreds_+sizeof(hundreds_)/sizeof(*hundreds_)); 34dd53bac9 2012-06-07 kinaba: string tens_[] = ; 34dd53bac9 2012-06-07 kinaba: vector <string> tens(tens_, tens_+sizeof(tens_)/sizeof(*tens_)); 34dd53bac9 2012-06-07 kinaba: string ones_[] = ; 34dd53bac9 2012-06-07 kinaba: vector <string> ones(ones_, ones_+sizeof(ones_)/sizeof(*ones_)); 34dd53bac9 2012-06-07 kinaba: int _ = ; 34dd53bac9 2012-06-07 kinaba: END 34dd53bac9 2012-06-07 kinaba: */ 34dd53bac9 2012-06-07 kinaba: } 34dd53bac9 2012-06-07 kinaba: // END CUT HERE