|
|
I don't understand, where I made a mistake, but program crushes there everytime, although in my compilator it is works Edited by author 15.03.2016 01:56 what is the limit for output size it could be very big for n=10000 and s=100000 and if the coordinates is in center of hypercube then there is (s-1)*2^(n-1) by bishop and n*(s-1) by rock squares that queen can move how the hell should i output this?? or am i wrong??? plz help ASAP!!! Edited by author 21.08.2008 07:36 Edited by author 21.08.2008 07:36 you can use BigInteger class in java, which calculates the numbers of any sizes... test1: (for WA#5) input: 1 2 output: 1 test2: (for (WA#10) input: 21 21 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 output: 20971940 hope can help you! Anyone knows where I can find the tests to this problem? I get WA #5. I don't remember exactly, but in this test N=1 or N=2 It's because this test case probably has only one dimension, so moving like a bishop counts the same fields as moving like a rook. It's only simple formula and I think it's correct! I know when formula simple BUT N=10000 And S=100000 It Cool? Somebody can help avoid TLE. i got wa 11 i made 2 completely different programs and both times i got WA #5, can any1 tell me why ? Same here can someone tell me what is wrong with that test, i have one version of program that goes to the test 4, then i made some corections and take it to test 8, I corect it again, I am sure that everything is working, but again WA test 4, pls help this is important... What is so special about this test? If someone have idea for this test post here Edited by author 07.05.2008 14:52 Same here! WA on test 10 Same problem here. I have solution in O(N*S), and it seems ok, but i still get WA#10. Any help would be appreciated, at least idea what could be so diferent in this test. have a nice day Generate large input data, and see what the output is. when dimension=1 and length=x result is x-1! Does anyone know any other special c.? Not really... That's the only one where you mustn't take bishop's movement into account, because it covers the same fields the rook does. |
|
|