La testoj estis kreitaj uzante hazardigilon en programo kiu ricevis AC: 12 10 8 -> 21 3 12 15 13 -> 36 3 10 18 12 -> 31 3 10 9 8 -> 21 3 20 6 16 -> 45 12 7 7 7 -> 18 3 13 15 1 -> 0 0 18 19 4 -> 9 3 18 19 19 -> 54 3 0 1 13 -> 12 12 7 10 7 -> 18 3 6 2 16 -> 27 16 2 5 10 -> 13 7 19 18 14 -> 39 3 18 3 14 -> 42 13 19 7 2 -> 6 3 0 8 2 -> 1 0 10 13 16 -> 35 5 7 9 11 -> 24 4 16 8 14 -> 39 8 7 10 7 -> 18 3 4 2 12 -> 19 12 11 15 1 -> 0 0 5 20 1 -> 0 0 8 13 8 -> 21 3 18 2 19 -> 54 19 2 12 20 -> 23 10 5 10 16 -> 25 8 10 1 3 -> 9 4 17 12 2 -> 6 3 2 7 3 -> 6 0 14 19 19 -> 46 3 3 0 5 -> 11 7 6 7 12 -> 23 7 14 11 7 -> 18 3 11 3 6 -> 18 5 2 11 10 -> 13 1 17 5 11 -> 33 8 10 16 12 -> 31 3 7 19 15 -> 28 3 17 15 5 -> 12 3 19 5 12 -> 36 9 4 12 6 -> 13 0 6 9 17 -> 28 10 4 4 18 -> 25 16 16 3 17 -> 48 16 13 0 2 -> 6 4 8 18 9 -> 24 0 3 19 8 -> 13 0 17 16 9 -> 24 3 11 5 6 -> 18 3 20 3 8 -> 24 7 1 9 13 -> 14 5 16 2 10 -> 30 10 15 2 2 -> 6 3 6 1 15 -> 26 16 5 14 19 -> 28 7 18 10 1 -> 3 3 20 1 2 -> 6 3 1 5 5 -> 6 1 3 3 12 -> 17 11 10 5 17 -> 36 14 8 19 7 -> 18 0 3 5 8 -> 13 5 18 8 15 -> 42 9 20 14 3 -> 9 3 4 0 16 -> 24 18 15 3 5 -> 15 4 7 4 9 -> 22 7 7 14 20 -> 33 8 8 10 3 -> 6 1 16 0 1 -> 3 3 13 2 3 -> 9 3 8 2 19 -> 34 19 6 7 10 -> 21 5 20 6 6 -> 18 3 11 7 1 -> 3 3 17 16 15 -> 42 3 5 11 2 -> 3 0 20 9 3 -> 9 3 8 2 4 -> 12 4 6 13 6 -> 15 0 12 1 3 -> 9 4 1 8 15 -> 16 8 10 17 16 -> 35 3 9 0 15 -> 33 17 4 2 18 -> 25 18 8 10 6 -> 15 3 12 0 13 -> 37 15 20 5 20 -> 57 17 4 14 20 -> 27 8 4 1 16 -> 23 17 17 13 6 -> 15 3 18 8 12 -> 33 6 20 3 3 -> 9 3 16 19 6 -> 15 3 0 13 14 -> 13 1 3 4 18 -> 23 16 4 10 15 -> 22 7 2 14 7 -> 10 0 Eraroj en testoj pruvas la neperfektecon de la tasko I had WA 101 and didn't know what is wrong. I tried test "0 0 1" and got something like '0 3'. I fixed it, but nothing changed. Then I realized that the problem is not only for zeros, but for all k=l and n=1, my output was '0 3'. When I fixed it, I got AC. By the way, big thanks for hints for WA 5 and 90, they helped me a lot. Edited by author 18.08.2015 20:20 Why WA 24? ... Give me some tests, please. try this test 2 1 1 answear is 3 3 Please give me this test. Try these tests: 1 5 3 -> 4 0 2 3 3 -> 6 2 Edited by author 09.07.2012 22:15 New test has been added and my program had WA on test 103. Can someone give me this test? I have your problem too. If You fined mistake, please, send to "mihran91@mail.ru". (Sorry for my English) Edited by author 04.11.2007 23:30 69499776 12314375 19853574 answer is 59560722 7539201 where are my mistake??? Edited by author 03.03.2007 16:03 Zaur loh I have WA 90 too. Hehe, AC now. What wrong with test 90? Tell me please... From other thread - it's probably about overflow. All use int64!!! {if you use pascal} that's crazy thank you unsigned int is enough (for C) Who knows some tests??!!! check 1 1 3 and 1 1 2 (4 3 and 3 2 are correct answers) Corrected. Should be %I64d for long long variables, not %lld. Now I have AC. ----------------------------------------------------------- printf("%lld %lld",max_wynik,min_wynik); <---- BAD printf("%I64d %I64d,max_wynik,min_wynik); <---- GOOD Edited by author 15.02.2008 02:51 #include <iostream> using namespace std; __int64 min(__int64 x, __int64 y) { return (x > y) ? y : x; } __int64 val(__int64 x) { if (x > 0) return 3; if (x == 0) return 1; return 0; } int main(){ __int64 k, l, n, t; cin >> k >> l >> n; t = min(k, n - 1); __int64 maxr = 3 * t + n - 1 - t + val(k - t - l); t = min(l, n - 1); __int64 minr = n - 1 - t + val(k + t - l); if (k + t - l == 1 && t >= 1) minr--;// for tests 1 1 3 and 1 1 2, because we change win + lose to 2 draws cout << maxr << ' ' << minr; return 0; } Yeah, it's nice :) There is site where most compact and unexpected C-programs competes. But I prefer to combine Pascal clearness and C- libries in some my own style Your answer for the test? 1 1 1 ... AC now. if you have WA 100, try the test 1 1 3. Edited by author 18.03.2007 15:41 If it is possible, send me on E-mail the test 17. Beforehand large thank. #include <iostream.h> int main(){ unsigned long k,l,n,sumM=0,i,kk,ll,g1,g2;cin>>k>>l>>n;kk=k;ll=l; for(i=0;i<n;i++){ g1=0;g2=0; if(kk>0&&i!=(n-1)){ g1=1;kk--; } else if(i==(n-1)){ g1=kk;g2=ll; //cout<<kk<<" "<<ll<<" "<<i<<endl; } if(g1>g2){ sumM+=3; } else if(g1==g2) { sumM+=1; } } cout<<sumM<<" "; /*sumM=0;kk=l;ll=k; for(i=0;i<n;i++){ g1=0;g2=0; if(kk>0&&i!=(n-1)){ g1=1;kk--; } else if(i==(n-1)){ g1=kk;g2=ll; //cout<<kk<<" "<<ll<<" "<<i<<endl; } if(g1<g2){ sumM+=3; } else if(g1==g2) { sumM+=1; } } cout<<sumM;*/ sumM=0;kk=k;ll=l; for(i=0;i<n;i++){ g1=0;g2=0; if(kk!=ll&&ll>0&&i!=(n-1)){ g2=1;ll--; } else if(i==(n-1)){ g1=kk;g2=ll; //cout<<kk<<" "<<ll<<" "<<i<<endl; } if(g1>g2){ sumM+=3; } else if(g1==g2) { sumM+=1; } } cout<<sumM;
return 0; } Try test 40446 59850 50506, I think yr output is wrong are answers 131397 31102?thank! No, 131397 3 I think My AC program gives 131397 3 THANK!I THINK I HAD PROBLEMS WITH MINIMAL POINTS IN OUTPUT. Test: 40446 59850 50506 My solution: 131397 3 No, WA 17... ??? In my opinion, the tests for this problem are not good enough, because incorrect solutions pass system tests. For example, the solution that outputs "4 4" for test "1 1 3" is succesfully passing systests and have AC, but the correct answer is "4 3"!!! Sorry for my English :) Edited by author 05.03.2007 21:11 My program write "4 3" too... Thank you! Your test was added to the test set. If you have more tricky tests, you are welcome. Yes, I have. [Code deleted] :)
I have deleted these tests for other participants not to make solutions expressly for these tests. Edited by author 08.03.2007 04:59 Some more tests were added. 9 submits lost AC verdict. I don't know what i can say... My program lost status AC... Edited by author 09.03.2007 17:45 Edited by author 03.03.2007 15:26 what was yr problem with WA3 WA66 :) What's wrong? 0 0 3 : 3 3 0 1 3 : 2 2 0 2 3 : 2 1 0 3 3 : 2 0 0 4 3 : 2 0 0 5 3 : 2 0 1 0 3 : 5 5 1 1 3 : 4 3 1 2 3 : 4 2 1 3 3 : 4 1 1 4 3 : 4 0 1 5 3 : 4 0 2 0 3 : 7 5 2 1 3 : 6 4 2 2 3 : 6 3 2 3 3 : 6 2 2 4 3 : 6 1 2 5 3 : 6 0 3 0 3 : 9 5 3 1 3 : 7 4 3 2 3 : 6 3 3 3 3 : 6 3 3 4 3 : 6 3 3 5 3 : 6 3 4 0 3 : 9 5 4 1 3 : 9 4 4 2 3 : 7 3 4 3 3 : 6 3 4 4 3 : 6 3 4 5 3 : 6 3 5 0 3 : 9 5 5 1 3 : 9 4 5 2 3 : 9 3 5 3 3 : 7 3 5 4 3 : 6 3 5 5 3 : 6 3 on test 3 5 3 it should be 1 I think i think that 3 4 3: 6 2 3 5 3: 6 1 4 5 3: 6 2 And should be: 3 4 3 : 6 3 -> 6 2 4 5 3 : 6 3 -> 6 2 Why on 3 4 3 answer is 6 3? I think It must be 6 2! If you have WA3 try test with k=l. If you have WA10 try 10 0 100 If you had WA90 and passed it, help me) use int64 or long arithmetic Edited by author 03.03.2007 17:57 Thank U very much!! Damn, what a stupid mistake: not to check the test with maximum parameters! Thanks! > use int64 or long arithmetic do not use long arithmetic, use int64 (long long, __int64 - on your choice) :) It's better to use unsigned int (I had AC) but if you want to save results, you must use __int64 Edited by author 05.03.2007 22:07 |
|