|
|
back to board2 admins: Posted by ftc 22 Jun 2008 18:17 Please check test #20 for this problem. It seems to be incorrect. There is a pulley X which is connected to Y, but Y is not connected to X. I think so, because i got WA20, then added such code and got AC. Code: for (i = 0; i < n; i++) { if (blk[i].y > 0) { int t = blk[i].y - 1; if ((blk[t].x1 != i + 1) && (blk[t].y != i + 1) && (blk[t].x2 != i + 1)) { cout << "1.0000"; return; } } if (blk[i].x1 > 0) { int t = blk[i].x1 - 1; if ((blk[t].x1 != i + 1) && (blk[t].y != i + 1) && (blk[t].x2 != i + 1)) { cout << "1.0000"; return; } } if (blk[i].x2 > 0) { int t = blk[i].x2 - 1; if ((blk[t].x1 != i + 1) && (blk[t].y != i + 1) && (blk[t].x2 != i + 1)) { cout << "1.0000"; return; } } }
Test 20 is corrected. Thank you. (-) |
|
|