верно ли,что при n=48,ответ 793566522023068987143383410279408208612410000 а при n=100 3834688188199309756675466732967588185862422492337212276545580039517258085033387305291001857619600 long ans[] = new long[23]; ans[2]=lim[2]; for (int i=4; i<=20; i+=4) { int half=i/2; ans[i]=lim[half]*lim[half]; ans[i+2]=lim[half]*lim[half+2]; } System.out.println(ans[N]); lim stands for the "lucky in Moskva" There is no direct hint in task description that first n/2 and last n/2 should sum up in n case instead of first 3 and last 3 digits. Wouldn't it be more correct to replace "the first 3 digits" with "the first half of digits"? > Who knows, who knows... > > Who knows, who knows... thanks. answer me,plz this is a maths problem! you will do it as 1044 And 1036 but could you say it clearly? thank you. D[i,j,k] : i-th digit with the sum of 1st -> i-th digit = j and the difference between sum of even digits and sum of odd digits = k Result = Sum of D[n div 2,i,j] * D[n div 2,i,j] ; Understand ? No, can you explain it clearly ? Ha Ha! I think it's mostly the same as mine. But they're a little bit different. My Solution was 2 deminition DP. Use algorithm from problem #1036 2 10 4 100 14 266095289560 20 187019610394369600 Edited by author 09.05.2010 03:36 I could't got AC without long numbers (but I've got it using constant answers). So, is here someone who used only standard types? No, big integer or real types is quite enough 12 ans:3052783504 16 ans:23194144960900 Thank!!! Edited by author 30.08.2007 04:32 What answer,when n=14.Thank! n=14 n=16 n=12 Please help me! 0.001s and 354k without precalculation, just simple DP!!!! Can you do it better? My program got WA (probably on test 10, I don't remember for certain). I was using comp type in Pascal, I posted my answers for n = 18 and n = 20 in forum, and people said they are correct. Then I wrote a program that used my answers as constants and got AC. I think that something is wrong with comp type. Probably because of your compiler. Please, try to fix it. Both FreePascal and Delphi do not write all 19 digits of comp type. But Delphi writes 18 digits while FreePascal writes only 15 digits. Thank you! But it is a little bit unfair comparing with C, as it is with 373kb of memory, that is counted by default for all programs using Pascal. Hm. Nobody prevents you to write on C :) Hi! It's alright, so I'm studying C now, because problems like 1100 are rather difficult to solve on Pascal, but are really simple to solve using C. Yes, Pascal - rulezzz. But problem 1217 is the only one that has two-digit amount of submissions in my stats, so it doesn't look straight and pretty anymore :) When I submited the whole program, I got WA on test 6.. Then I submited only the constants and got AC... :-/ My program gets WA on test 10. My answers: 18 - 2082728967969200 20 - 187019610394369600 No, it's not correct !!!! 2 - 10 4 - 100 6 - 6646 8 - 445876 10 - 36752641 ... > 2 - 10 > 4 - 100 > 6 - 6646 > 8 - 445876 > 10 - 36752641 > ... Your answers is not correct 2 - 10 4 - 100 6 - 6700 8 - 448900 10 - 37018840 Good Luck! Leonid Volkov ! Please Reply to me , Is there any bugs ??? I agree with you. There're some bugs with the test data. I also have some questions: When n=2,is there (2n) or (n) digs in the ticket? BTW. You got 91 in the contest.So you must be careful in GDKOI'2003. Haha. My E-mail Address is sgsniper@163.com And my homepage address is sgsniper.51.net
Welcome to My Homepage. -------------- Someone in the No.1 Middle School. :) As far as I can judge, there are no bugs in the testdata. To prove you viewpoint, please give some samples and some answers (your answers), and try to prove, that they are correct. There's no bugs with the test data. I got AC. Thank you. My QQ is 50012966. Welcome. del Edited by moderator 15.06.2008 16:10 del Edited by moderator 15.06.2008 16:10 I think, that there are some bugs in tests answers and judge solutions. My long ariphmetics with bugs gets AC and without - WA. All problems were in multiplication. I had overflow of WORD and got AC. Who knows, how to post my opinion to site Creators. > I think, that there are some bugs in tests answers and judge > solutions. My long ariphmetics with bugs gets AC and without - WA. > All problems were in multiplication. I had overflow of WORD and got > AC. Who knows, how to post my opinion to site Creators. |
|