Check-in [d6047a481e]
Not logged in
Overview
SHA1 Hash:d6047a481e7e89f52fdf159d0207332fbdc27a70
Date: 2014-07-05 15:37:46
User: kinaba
Comment:626
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Added SRM/626-U/1A.cpp version [75565be9d11ad28a]

> 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 FixedDiceGameDiv1 { public: > 23 double getExpectation(int a, int b, int c, int d) > 24 { > 25 if(a*b<=c*1) > 26 return -1.0; > 27 auto d1 = distr(a, b); > 28 auto d2 = distr(c, d); > 29 > 30 double total_prob = 0.0; > 31 for(auto& vp: d1) > 32 for(auto& zq: d2) > 33 { > 34 int v = vp.first; > 35 double p = vp.second; > 36 int z = zq.first; > 37 double q = zq.second; > 38 if(v > z) > 39 total_prob += p*q; > 40 } > 41 > 42 double e = 0.0; > 43 for(auto& vp: d1) > 44 for(auto& zq: d2) > 45 { > 46 int v = vp.first; > 47 double p = vp.second; > 48 int z = zq.first; > 49 double q = zq.second; > 50 if(v > z) > 51 e += v * p*q/total_prob; > 52 } > 53 return e; > 54 } > 55 > 56 map<int, double> distr(int n, int f) > 57 { > 58 if(n == 0) { > 59 map<int, double> m; > 60 m[0] = 1,0; > 61 return m; > 62 } > 63 map<int, double> m = distr(n-1, f), m2; > 64 for(auto& up: m) { > 65 int u = up.first; > 66 double p = up.second; > 67 for(int v=1; v<=f; ++v) > 68 m2[u+v] += p/f; > 69 } > 70 return m2; > 71 } > 72 }; > 73 > 74 // BEGIN CUT HERE > 75 #include <ctime> > 76 double start_time; string timer() > 77 { ostringstream os; os << " (" << int((clock()-start_time)/CLOCKS_PER_SEC*1000) > 78 template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) > 79 { os << "{ "; > 80 for(typename vector<T>::const_iterator it=v.begin(); it!=v.end(); ++it) > 81 os << '\"' << *it << '\"' << (it+1==v.end() ? "" : ", "); os << " }"; return > 82 void verify_case(const double& Expected, const double& Received) { > 83 bool ok = (abs(Expected - Received) < 1e-9); > 84 if(ok) cerr << "PASSED" << timer() << endl; else { cerr << "FAILED" << timer() > 85 cerr << "\to: \"" << Expected << '\"' << endl << "\tx: \"" << Received << '\"' > 86 #define CASE(N) {cerr << "Test Case #" << N << "..." << flush; start_time=clock( > 87 #define END verify_case(_, FixedDiceGameDiv1().getExpectation(a, b, c, d)); > 88 int main(){ > 89 > 90 CASE(0) > 91 int a = 1; > 92 int b = 2; > 93 int c = 1; > 94 int d = 5; > 95 double _ = 2.0; > 96 END > 97 CASE(1) > 98 int a = 3; > 99 int b = 1; > 100 int c = 1; > 101 int d = 3; > 102 double _ = 3.0; > 103 END > 104 CASE(2) > 105 int a = 1; > 106 int b = 5; > 107 int c = 1; > 108 int d = 1; > 109 double _ = 3.4999999999999996; > 110 END > 111 CASE(3) > 112 int a = 2; > 113 int b = 6; > 114 int c = 50; > 115 int d = 30; > 116 double _ = -1.0; > 117 END > 118 CASE(4) > 119 int a = 50; > 120 int b = 11; > 121 int c = 50; > 122 int d = 50; > 123 double _ = 369.8865999182022; > 124 END > 125 /* > 126 CASE(5) > 127 int a = ; > 128 int b = ; > 129 int c = ; > 130 int d = ; > 131 double _ = ; > 132 END > 133 CASE(6) > 134 int a = ; > 135 int b = ; > 136 int c = ; > 137 int d = ; > 138 double _ = ; > 139 END > 140 */ > 141 } > 142 // END CUT HERE

Added SRM/626-U/1B-U.cpp version [b9e1391bc29563f6]

> 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 static const LL INF = 0x1fffffffffffffffLL; > 22 > 23 class NegativeGraphDiv1 { public: > 24 long long findMin(int N, vector <int> from, vector <int> to, vector <int > 25 { > 26 // base graph > 27 vector<vector<LL>> g(N, vector<LL>(N, INF)); > 28 vector<vector<LL>> g_neg(N, vector<LL>(N, INF)); > 29 for(int i=0; i<N; ++i) > 30 g[i][i] = 0; > 31 for(int i=0; i<from.size(); ++i) { > 32 int f = from[i]-1; > 33 int t = to[i]-1; > 34 LL w = weight[i]; > 35 g[f][t] = min(g[f][t], w); > 36 g_neg[f][t] = min(g_neg[f][t], -w); > 37 } > 38 > 39 int CMAX = N*2; > 40 > 41 // 0-magic > 42 vector<vector<vector<LL>>> d(CMAX+1, g); > 43 for(int k=0; k<N; ++k) > 44 for(int i=0; i<N; ++i) > 45 for(int j=0; j<N; ++j) > 46 d[0][i][j] = min(d[0][i][j], d[0][i][k]+d[0][k][j]); > 47 // 1-magic > 48 for(int a=0; a<N; ++a) > 49 for(int b=0; b<N; ++b) > 50 for(int c=0; c<N; ++c) > 51 for(int z=0; z<N; ++z) > 52 d[1][a][z] = min(d[1][a][z], d[0][a][b] + g_neg[b][c] + > 53 > 54 // C-magic > 55 for(int C=1; C<=CMAX; ++C) { > 56 for(int a=0; a<N; ++a) > 57 for(int b=0; b<N; ++b) > 58 for(int z=0; z<N; ++z) > 59 d[C][a][z] = min(d[C][a][z], d[1][a][b] + d[C-1] > 60 } > 61 > 62 // go,cycle,go > 63 LL best = INF; > 64 for(int S=0; S<=min(CMAX,charges); ++S) > 65 best = min(best, d[S][0][N-1]); > 66 for(int S=0; S<=N; ++S) > 67 for(int M=1; M<=N; ++M) > 68 for(int E=0; E<=CMAX; ++E) if(S+E<=charges) > 69 for(int x=0; x<N; ++x) > 70 best = min(best, d[S][0][x] + d[M][x][x]*((charges-S-E)/ > 71 return best; > 72 } > 73 }; > 74 > 75 // BEGIN CUT HERE > 76 #include <ctime> > 77 double start_time; string timer() > 78 { ostringstream os; os << " (" << int((clock()-start_time)/CLOCKS_PER_SEC*1000) > 79 template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) > 80 { os << "{ "; > 81 for(typename vector<T>::const_iterator it=v.begin(); it!=v.end(); ++it) > 82 os << '\"' << *it << '\"' << (it+1==v.end() ? "" : ", "); os << " }"; return > 83 void verify_case(const long long& Expected, const long long& Received) { > 84 bool ok = (Expected == Received); > 85 if(ok) cerr << "PASSED" << timer() << endl; else { cerr << "FAILED" << timer() > 86 cerr << "\to: \"" << Expected << '\"' << endl << "\tx: \"" << Received << '\"' > 87 #define CASE(N) {cerr << "Test Case #" << N << "..." << flush; start_time=clock( > 88 #define END verify_case(_, NegativeGraphDiv1().findMin(N, from, to, weight, > 89 int main(){ > 90 > 91 CASE(0) > 92 int N = 3; > 93 int from_[] = {1,1,2,2,3,3}; > 94 vector <int> from(from_, from_+sizeof(from_)/sizeof(*from_)); > 95 int to_[] = {2,3,1,3,1,2}; > 96 vector <int> to(to_, to_+sizeof(to_)/sizeof(*to_)); > 97 int weight_[] = {1,5,1,10,1,1}; > 98 vector <int> weight(weight_, weight_+sizeof(weight_)/sizeof(*weight_)) > 99 int charges = 1; > 100 long long _ = -9LL; > 101 END > 102 CASE(1) > 103 int N = 1; > 104 int from_[] = {1}; > 105 vector <int> from(from_, from_+sizeof(from_)/sizeof(*from_)); > 106 int to_[] = {1}; > 107 vector <int> to(to_, to_+sizeof(to_)/sizeof(*to_)); > 108 int weight_[] = {100}; > 109 vector <int> weight(weight_, weight_+sizeof(weight_)/sizeof(*weight_)) > 110 int charges = 100000; > 111 long long _ = -10000000LL; > 112 END > 113 CASE(2) > 114 int N = 2; > 115 int from_[] = {1,1,2}; > 116 vector <int> from(from_, from_+sizeof(from_)/sizeof(*from_)); > 117 int to_[] = {2,2,1}; > 118 vector <int> to(to_, to_+sizeof(to_)/sizeof(*to_)); > 119 int weight_[] = {6,1,4}; > 120 vector <int> weight(weight_, weight_+sizeof(weight_)/sizeof(*weight_)) > 121 int charges = 2; > 122 long long _ = -9LL; > 123 END > 124 CASE(3) > 125 int N = 2; > 126 int from_[] = {1}; > 127 vector <int> from(from_, from_+sizeof(from_)/sizeof(*from_)); > 128 int to_[] = {2}; > 129 vector <int> to(to_, to_+sizeof(to_)/sizeof(*to_)); > 130 int weight_[] = {98765}; > 131 vector <int> weight(weight_, weight_+sizeof(weight_)/sizeof(*weight_)) > 132 int charges = 1000000000; > 133 long long _ = -98765LL; > 134 END > 135 CASE(4) > 136 int N = 40; > 137 int from_[] = {21,2,36,21,32,1,34,1,40,38,19,10,39,40,31,29,22,18,24,8,2 > 138 33,5,10,31,10,39,18,18,3,19,17,17,34,9,7,17,21,13,12,16,36,39,9,7,3,5,26,16,32,4 > 139 28,11,32,34,2,12,12,33,27,24,5,5,40,34,4,8,10,17,39,30,26,24,10,37,23,40,38,17,4 > 140 23,16,21,10,18,8,28,15,20,38,5,22,4,29,32,13,13,15,24,28,27,11,24,24,23,40,34,20 > 141 27,18,6,22,38,9,40,35,15,16,30,4,3,29,2,34,40,3,12,20,29,14,2,3,8,37,12,28,25,7, > 142 23,31,30,3,15,5,25,14,8,13,12,4,18,9,20,17,11,21,5,25,15,9,40,26,28,36,1,10,33,3 > 143 39,17,33,4,5,22,21,13,29,38,34,6,24,18,29,4,20,33,16,14,30,20,20,7,21,13,5,20,1, > 144 33,40,7,25,20,13,36,30,13,9,3,15,38,33,27,36,4,9,18,39,7,12,30,17,2,21,17,11,26, > 145 17,12,12,32,1,40,10,34,29,39,7,17,3}; > 146 vector <int> from(from_, from_+sizeof(from_)/sizeof(*from_)); > 147 int to_[] = {27,37,32,14,19,25,4,14,40,9,36,23,21,25,39,13,4,30,11,32,22 > 148 30,9,35,29,20,4,21,25,15,32,27,24,13,3,10,21,40,12,39,4,10,2,39,28,23,21,19,21,1 > 149 20,7,31,3,7,36,15,36,10,6,37,26,39,39,26,31,8,36,26,10,21,24,33,13,29,31,10,12,2 > 150 32,3,27,14,22,16,37,40,18,25,28,20,27,27,30,11,19,16,18,25,4,21,14,14,13,22,34,2 > 151 21,8,17,20,20,28,22,22,13,29,34,20,26,11,10,8,33,10,37,11,16,5,9,18,39,1,8,4,5,2 > 152 2,11,19,32,1,32,27,7,23,9,13,18,12,36,11,32,34,38,35,15,6,36,32,28,6,40,2,33,2,6 > 153 29,20,28,37,1,30,6,5,5,1,10,40,13,14,21,32,19,25,37,21,28,34,28,29,27,24,33,35,1 > 154 35,14,2,39,22,21,2,2,19,38,15,25,10,13,2,39,31,13,5,39,11,33,4,18,18,38,19,39,39 > 155 21,40,1,10,2,17,5,8,5,31,18,18,25,13,3}; > 156 vector <int> to(to_, to_+sizeof(to_)/sizeof(*to_)); > 157 int weight_[] = {93486,55539,34680,56705,10415,99106,26365,51838,20794,9 > 158 12730,27623,25353,89948,55002,36720,87151,39759,66091,3690,83881,82635,69084,541 > 159 76819,4094,63971,1454,21318,44848,92540,26354,18611,2394,68363,64345,60985,725,3 > 160 30493,26360,7745,7165,47668,83884,89463,46615,7729,22187,78818,10817,31141,79159 > 161 21233,72418,26911,74250,13704,68327,89871,72035,3437,97910,2325,83391,39732,7924 > 162 19102,10840,27306,76027,86368,55373,40192,49370,90597,21685,23630,68099,50880,84 > 163 20293,24724,7404,6579,11282,83421,37466,80598,53398,15720,66117,28965,90631,4400 > 164 38034,5948,72313,16772,81862,11871,33534,91097,93908,57721,91890,46009,21400,412 > 165 26503,31676,50683,46103,43963,90273,8938,41054,90794,95115,11689,61662,72089,122 > 166 72212,770,60745,25817,47807,85312,27451,51063,83640,2978,49906,744,69457,20244,8 > 167 63417,24967,54923,62001,38920,59719,65486,174,52231,84176,83531,39896,70918,5239 > 168 14103,24615,10710,27635,24064,23022,4506,29939,2044,48330,53688,41320,21646,6259 > 169 96029,93359,32457,98487,62899,51282,8656,45002,83345,36991,77420,37086,53484,188 > 170 24162,99257,58066,90088,66809,53472,73237,31964,4792,42336,88141,80467,96893,442 > 171 6283,49250,54852,27312,42709,97204,16834,80593,27523,31700,44435,25338,43513,848 > 172 7082,46471,3025,57872,57510,13666,48726,3907,12500,53578,28346,15804,32122,89396 > 173 32562,95679,32377,5909,29805,85810,31593,85985,27637,24974,41557,56442,48912,623 > 174 2582,26623,14347,98894,92041,83228,58089,96181,3913,75974,18569,11428,95165,2756 > 175 vector <int> weight(weight_, weight_+sizeof(weight_)/sizeof(*weight_)) > 176 int charges = 160743953; > 177 long long _ = -15328623718914LL; > 178 END > 179 CASE(4) > 180 int N = 50; > 181 int from_[] = {21,2,36,21,32,1,34,1,40,38,19,10,39,40,31,29,22,18,24,8,2 > 182 33,5,10,31,10,39,18,18,3,19,17,17,34,9,7,17,21,13,12,16,36,39,9,7,3,5,26,16,32,4 > 183 28,11,32,34,2,12,12,33,27,24,5,5,40,34,4,8,10,17,39,30,26,24,10,37,23,40,38,17,4 > 184 23,16,21,10,18,8,28,15,20,38,5,22,4,29,32,13,13,15,24,28,27,11,24,24,23,40,34,20 > 185 27,18,6,22,38,9,40,35,15,16,30,4,3,29,2,34,40,3,12,20,29,14,2,3,8,37,12,28,25,7, > 186 23,31,30,3,15,5,25,14,8,13,12,4,18,9,20,17,11,21,5,25,15,9,40,26,28,36,1,10,33,3 > 187 39,17,33,4,5,22,21,13,29,38,34,6,24,18,29,4,20,33,16,14,30,20,20,7,21,13,5,20,1, > 188 33,40,7,25,20,13,36,30,13,9,3,15,38,33,27,36,4,9,18,39,7,12,30,17,2,21,17,11,26, > 189 17,12,12,32,1,40,10,34,29,39,7,17,3,1,1,1,1,1,1,1,1,1,1}; > 190 vector <int> from(from_, from_+sizeof(from_)/sizeof(*from_)); > 191 int to_[] = {27,37,32,14,19,25,4,14,40,9,36,23,21,25,39,13,4,30,11,32,22 > 192 30,9,35,29,20,4,21,25,15,32,27,24,13,3,10,21,40,12,39,4,10,2,39,28,23,21,19,21,1 > 193 20,7,31,3,7,36,15,36,10,6,37,26,39,39,26,31,8,36,26,10,21,24,33,13,29,31,10,12,2 > 194 32,3,27,14,22,16,37,40,18,25,28,20,27,27,30,11,19,16,18,25,4,21,14,14,13,22,34,2 > 195 21,8,17,20,20,28,22,22,13,29,34,20,26,11,10,8,33,10,37,11,16,5,9,18,39,1,8,4,5,2 > 196 2,11,19,32,1,32,27,7,23,9,13,18,12,36,11,32,34,38,35,15,6,36,32,28,6,40,2,33,2,6 > 197 29,20,28,37,1,30,6,5,5,1,10,40,13,14,21,32,19,25,37,21,28,34,28,29,27,24,33,35,1 > 198 35,14,2,39,22,21,2,2,19,38,15,25,10,13,2,39,31,13,5,39,11,33,4,18,18,38,19,39,39 > 199 21,40,1,10,2,17,5,8,5,31,18,18,25,13,3,41,42,43,44,45,46,47,48,49,50}; > 200 vector <int> to(to_, to_+sizeof(to_)/sizeof(*to_)); > 201 int weight_[] = {93486,55539,34680,56705,10415,99106,26365,51838,20794,9 > 202 12730,27623,25353,89948,55002,36720,87151,39759,66091,3690,83881,82635,69084,541 > 203 76819,4094,63971,1454,21318,44848,92540,26354,18611,2394,68363,64345,60985,725,3 > 204 30493,26360,7745,7165,47668,83884,89463,46615,7729,22187,78818,10817,31141,79159 > 205 21233,72418,26911,74250,13704,68327,89871,72035,3437,97910,2325,83391,39732,7924 > 206 19102,10840,27306,76027,86368,55373,40192,49370,90597,21685,23630,68099,50880,84 > 207 20293,24724,7404,6579,11282,83421,37466,80598,53398,15720,66117,28965,90631,4400 > 208 38034,5948,72313,16772,81862,11871,33534,91097,93908,57721,91890,46009,21400,412 > 209 26503,31676,50683,46103,43963,90273,8938,41054,90794,95115,11689,61662,72089,122 > 210 72212,770,60745,25817,47807,85312,27451,51063,83640,2978,49906,744,69457,20244,8 > 211 63417,24967,54923,62001,38920,59719,65486,174,52231,84176,83531,39896,70918,5239 > 212 14103,24615,10710,27635,24064,23022,4506,29939,2044,48330,53688,41320,21646,6259 > 213 96029,93359,32457,98487,62899,51282,8656,45002,83345,36991,77420,37086,53484,188 > 214 24162,99257,58066,90088,66809,53472,73237,31964,4792,42336,88141,80467,96893,442 > 215 6283,49250,54852,27312,42709,97204,16834,80593,27523,31700,44435,25338,43513,848 > 216 7082,46471,3025,57872,57510,13666,48726,3907,12500,53578,28346,15804,32122,89396 > 217 32562,95679,32377,5909,29805,85810,31593,85985,27637,24974,41557,56442,48912,623 > 218 2582,26623,14347,98894,92041,83228,58089,96181,3913,75974,18569,11428,95165,2756 > 219 vector <int> weight(weight_, weight_+sizeof(weight_)/sizeof(*weight_)) > 220 int charges = 160743953; > 221 long long _ = -15328623718914LL; > 222 END > 223 CASE(5) > 224 int N = 2; > 225 int from_[] = {1,1}; > 226 vector <int> from(from_, from_+sizeof(from_)/sizeof(*from_)); > 227 int to_[] = {2,2}; > 228 vector <int> to(to_, to_+sizeof(to_)/sizeof(*to_)); > 229 int weight_[] = {3,1}; > 230 vector <int> weight(weight_, weight_+sizeof(weight_)/sizeof(*weight_)) > 231 int charges = 1; > 232 long long _ = -3LL; > 233 END > 234 /* > 235 CASE(6) > 236 int N = ; > 237 int from_[] = ; > 238 vector <int> from(from_, from_+sizeof(from_)/sizeof(*from_)); > 239 int to_[] = ; > 240 vector <int> to(to_, to_+sizeof(to_)/sizeof(*to_)); > 241 int weight_[] = ; > 242 vector <int> weight(weight_, weight_+sizeof(weight_)/sizeof(*weight_)) > 243 int charges = ; > 244 long long _ = LL; > 245 END > 246 */ > 247 } > 248 // END CUT HERE

Added SRM/626-U/1C-U.cpp version [e67bc0ae357b08b2]

> 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 static const unsigned MODVAL = 1000000007; > 23 struct mint > 24 { > 25 unsigned val; > 26 mint():val(0){} > 27 mint(int x):val(x%MODVAL) {} > 28 mint(unsigned x):val(x%MODVAL) {} > 29 mint(LL x):val(x%MODVAL) {} > 30 }; > 31 mint& operator+=(mint& x, mint y) { return x = x.val+y.val; } > 32 mint& operator*=(mint& x, mint y) { return x = LL(x.val)*y.val; } > 33 mint operator+(mint x, mint y) { return x+=y; } > 34 mint operator*(mint x, mint y) { return x*=y; } > 35 > 36 int gcd(int a, int b) > 37 { > 38 while(a) > 39 swap(a, b%=a); > 40 return b; > 41 } > 42 > 43 class ReflectiveRectangle { public: > 44 int findSum(int A, int B, int bounces) > 45 { > 46 if(bounces%2 == 1) > 47 return 0; > 48 if(bounces == 0) > 49 return (mint(A)*A+mint(B)*B).val; > 50 > 51 mint sh; > 52 for(int h=1; h<bounces+2; h+=2) { > 53 if(gcd(h, bounces+2) == 1) > 54 sh += LL(h)*h; > 55 } > 56 // solution: Sigma(h*h) - Sigma_divisors(h*h) ? > 57 // but no time to code...... > 58 > 59 return (sh*A*A+sh*B*B).val; > 60 } > 61 }; > 62 > 63 // BEGIN CUT HERE > 64 #include <ctime> > 65 double start_time; string timer() > 66 { ostringstream os; os << " (" << int((clock()-start_time)/CLOCKS_PER_SEC*1000) > 67 template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) > 68 { os << "{ "; > 69 for(typename vector<T>::const_iterator it=v.begin(); it!=v.end(); ++it) > 70 os << '\"' << *it << '\"' << (it+1==v.end() ? "" : ", "); os << " }"; return > 71 void verify_case(const int& Expected, const int& Received) { > 72 bool ok = (Expected == Received); > 73 if(ok) cerr << "PASSED" << timer() << endl; else { cerr << "FAILED" << timer() > 74 cerr << "\to: \"" << Expected << '\"' << endl << "\tx: \"" << Received << '\"' > 75 #define CASE(N) {cerr << "Test Case #" << N << "..." << flush; start_time=clock( > 76 #define END verify_case(_, ReflectiveRectangle().findSum(sideA, sideB, boun > 77 int main(){ > 78 > 79 CASE(0) > 80 int sideA = 3; > 81 int sideB = 4; > 82 int bounces = 0; > 83 int _ = 25; > 84 END > 85 CASE(1) > 86 int sideA = 3; > 87 int sideB = 3; > 88 int bounces = 2; > 89 int _ = 180; > 90 END > 91 CASE(2) > 92 int sideA = 13; > 93 int sideB = 17; > 94 int bounces = 1; > 95 int _ = 0; > 96 END > 97 CASE(3) > 98 int sideA = 59325; > 99 int sideB = 31785; > 100 int bounces = 262142; > 101 int _ = 48032850; > 102 END > 103 CASE(4) > 104 int sideA = 1000000; > 105 int sideB = 1000000; > 106 int bounces = 1000000000; > 107 int _ = 145972110; > 108 END > 109 /* > 110 CASE(5) > 111 int sideA = ; > 112 int sideB = ; > 113 int bounces = ; > 114 int _ = ; > 115 END > 116 CASE(6) > 117 int sideA = ; > 118 int sideB = ; > 119 int bounces = ; > 120 int _ = ; > 121 END > 122 */ > 123 } > 124 // END CUT HERE