Jump to content

Water collected between towers: Difference between revisions

m
→‎Version 2: Removed more unnecessary code due to not supporting the verbose output.
m (→‎Version 2: Removed unnecessary linefeed separator.)
m (→‎Version 2: Removed more unnecessary code due to not supporting the verbose output.)
Line 350:
new int[] { 8, 7, 7, 6 }, new int[] { 6, 7, 10, 7, 6 }};
foreach (int[] t in a) {
string bint = ""j; int jc = 0; do {
for (j = t.Length - 1; j >= 0; j--) if (t[j] > 0) break;
if (j < 0) break;
char[]int fb = new0; for string('int ',k t.Length).ToCharArray()= 0; k <= j; k++) {
int bpf = 0; forif (int t[k] => 0;) { t[k] <-= j1; kb ++)= {1; }
else if (t[k]b > 0) { f[k] = 'B'; t[k] -= 1; bpf c++= 1; }
else if (bpfb >< 02) f[k] = '.'break; }
if (bpf > 1) b += new string(f);
else break;
} while (true);
int c = 0; string v = "hold"; foreach (char x in b) if (x == '.') c++;
Cookies help us deliver our services. By using our services, you agree to our use of cookies.