| Show all threads Hide all threads Show all messages Hide all messages |
| English and Russian are different! | xurshid_n | 1843. Cutting a Parallelepiped | 4 Apr 2012 14:32 | 1 |
|
| I did not think that it is so easy! | JAVATAR | 1496. Spammer | 4 Apr 2012 02:30 | 1 |
|
| I have WA7, can you give me some tests please. | mohamed | 1788. On the Benefits of Umbrellas | 4 Apr 2012 00:59 | 2 |
|
| All tests here | Ezio - Altair | 1070. Local Time | 3 Apr 2012 20:10 | 3 |
01.01 21.59 04.23 11.22 Answer: 5 12.00 15.00 20.00 21.00 Answer: 1 23.58 00.43 22.27 03.10 Answer: 2 12.00 15.00 01.02 03.07 Answer: 0 01.01 10.59 04.23 04.22 Answer: 5 23.42 01.14 08.10 17.51 Answer: 4 On 4th your test my AC programm returns 143165577 O_o So this test is incorrect :) my AC program gives 0 did you use unsigned?? |
| help wrong answer test #8 | jxhuzs | 1014. Product of Digits | 3 Apr 2012 14:38 | 1 |
I use long long int with MinGW and have right answer for the input of 1000000000.Why it is still wrong? Here is my C code. #include<stdio.h> #include<math.h> #include<stdlib.h> int sum(int a); int main() { int count[10],i,j,base=0; //use count[2] to count [9] to store the number of digits long long int n,product=0; for(i=0;i<10;i++) count[i]=0; scanf("%lld",&n); if(n==1) printf("%d\n",1); else if(n==0) printf("%d\n",10); else{ for(i=9;i>1;i--){ while(n%i==0){ n/=i; count[i]++; } } if(n==1){ /* for(i=2;i<=9;i++){ for(j=0;j<count[i];j++){ printf("%d",i); } } */ for(i=9;i>=2;i--){ product=product+i*sum(count[i])*pow(10,base); base=base+count[i]; } printf("%lld",product); } else printf("%d",-1); printf("\n"); } system("pause"); return 0; } int sum(int a) { int term=1,i,result=0; for(i=0;i<a;i++){ result+=term; term*=10; } return result; }
|
| What is the answer to 1A | SpartakusMd | 1893. A380 | 3 Apr 2012 14:24 | 2 |
Hi. What is the answer to 1A "window" or "aisle"? |
| C# What is wrong? | AC_Cobra | 1068. Sum | 3 Apr 2012 12:33 | 3 |
I have checked all known numbers - result is right. When I submit code, system writes: Wrong answer. Where is error? Thank You! using System; class Program { static void Main() { int a = int.Parse(Console.ReadLine()); int r = 0; if (a <= System.Math.Abs(10000)) { if (a > 1) { for (int i = 1; i <= a; i++) { r += i; } } if (a < 1) { for (int i = 1; i >= a; i--) { r += i; } } Console.WriteLine(r); } else throw new Exception("Wrong number"); } } Hi, how about the case when a = 1 ? It seems like you'll output 0 which is incorrect. Thank you! That was an error. |
| Clarify | Radi Muhammad Reza | 1894. Non-Flying Weather | 2 Apr 2012 23:52 | 4 |
Clarify Radi Muhammad Reza 30 Mar 2012 23:36 please, someone explain the test case. i don't get how it is 540.0 Look at this sentence attentively: "One of the passengers has found on the Internet a satellite image of the airport territory taken EXACTLY ONE MINUTE AGO" In worst case the trundercloud will hang out of airport after 600 seconds the passenger has taken the image. After a minute this value = 540. Edited by author 02.04.2012 23:53 |
| Admins! | unlucky [Vologda SPU] | 1740. Deer is Better! | 2 Apr 2012 22:31 | 4 |
Admins! unlucky [Vologda SPU] 1 Nov 2009 15:22 Statement of problem is incorrect! I think, that many users agree with me. Fix it or "fix" author of this problem. He is very crazy man(IMHO) The statement is correct, you are making an incorrect additional assumption that the statement implies that the Chukcha's speed must be constant. This is false. (Also, please stop insulting the author.) The statement is correct, you are making an incorrect additional assumption that the statement implies that the Chukcha's speed must be constant. As for finding maximum of time - it is right. But how he can achive point B with time, that is littler,then his animals could run? Edited by author 03.11.2009 15:28Speed of animals is not constant! |
| WA 33 | George_Aloyan[PTS Obninsk] | 1507. Difficult Decision | 2 Apr 2012 11:51 | 2 |
WA 33 George_Aloyan[PTS Obninsk] 1 Apr 2012 19:32 Just "norm" matrix after every calculating (a[i][j] make 1 if it was positive) or you will have overflow Re: WA 33 Smilodon_am [Obninsk INPE] 2 Apr 2012 11:51 You can only use matrix with boolean values, it looks more efficient and spectacular. |
| Why I WA 6 | Zachary | 1654. Cipher Message | 1 Apr 2012 19:10 | 1 |
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int N = 250009; char s[N]; int main() { scanf("%s", s); int len, i, j; len = strlen(s); for (i = 1, j = 0; i < len; ++i) { if (s[i] == s[j]) { s[i] = 96; s[j] = 96; i++; while (s[j] == 96) j--; while (j>=0 && i<len && s[i] == s[j]) { s[j] = 96; s[i] = 96; j--; i++; } j = i; } else j = i; } for (i = 0; i < len; ++i) if (s[i] != 96) printf("%c", s[i]); printf("\n"); return 0; } |
| Problem 1311 is renamed (+) | Sandro (USU) | 1311. Stable Construction | 1 Apr 2012 13:55 | 1 |
There were two problem "Bricks" (1234 and 1311). New name of problem 1311 is "Stable Construction". |
| To ADMINS: there are again two tasks have the same name in Timus | bsu.mmf.team | 1434. Buses in Vasyuki | 1 Apr 2012 13:44 | 4 |
1434 = Bus Routes = Автобусные маршруты = 1137 :-D Yes, also we have two problems "Labyrinth" and two problems "Bricks". :) Can you suggest good (and different!) names for these problems? Well, one of variations of my fantasy is: Very good name for the problem #1311 is "Brick House". The problem #1137 can be named "Fishburg Buses" as well as the problem #1434 can be named "Students and Buses" And the best name for #1145 is "Labyrinth 2" I think =) But I still don't understand why did you ask me to do it. I think it's not so difficult to change the name of any problem. Problem is renamed. New name is "Buses in Vasyuki". |
| Crash | HSTU_hacker | 1493. One Step from Happiness | 1 Apr 2012 13:39 | 3 |
Crash HSTU_hacker 27 Feb 2012 02:10 Check your program can handle inputs with leading 0's |
| Problem 1191 is renamed (+) | Sandro (USU) | 1191. Catch the thief! | 1 Apr 2012 13:24 | 1 |
Old name "Cops and Robbers" could be confusing because of problem 1277 "Cops and Thieves". New name is "Catch the thief!" |
| Java vs C++ | skhalus | 1893. A380 | 31 Mar 2012 21:51 | 2 |
It seems Java tests have problems. C++ is OK. Thanks Java solution is very simple too. |
| Can you give me the test? | faustov | 1068. Sum | 31 Mar 2012 21:15 | 3 |
-2 -> -2 -1 -> 0 0 -> 1 1 -> 1 2 -> 3 -10000 -> -50004999 10000 -> 50005000 |
| How to solve this problem? (-) | Krayev Alexey (PSU) | 1256. Cemetery Guard | 31 Mar 2012 10:43 | 10 |
Yes, you can solve this problem using 2 binary searches. Or, applying advanced geometry, this problem can be solved with 1 binary search... to use binary search function must be monotonic. why will the function be monotonic ? And what advanced :) geometry do u mean? Edited by author 24.08.2006 22:55 to use binary search function must be monotonic. why will the function be monotonic ? And what advanced :) geometry do u mean? Edited by author 24.08.2006 22:55 To use binary search to find minimum/maximum function is not obliged to be monotonic. And it will not be monotonic, really. I got Ac very very easy without binary search. I used sequentul optimization on rectangle [0,2*pi][0,2*pi] by angle variables s,t . At beggining dt=pi - size of window for search,s0=pi,t0=pi-it's centre. Use N=100 steps by each variable. Let sRec,tRec- point of Record on first step. For next step we do: s0=sRec;t0=tRex,dt=dt/10- moving and diminishing search-window. And so on while dt>0.000001. Edited by author 30.06.2007 11:32 Binary search is applicable only to monotonic functions and functions having one minimum. Otherwise you are not protected against falling into local minimum pit. Same stands for gradient slide. Yes, you can protected yourself with a lot of small ranges (up to TL), but that's a "lucky way". Thanks to svr very lot. AC!!!! Edited by author 31.03.2012 10:44 Edited by author 31.03.2012 10:44 I tried to use 2 binary searches, but WA :( Comment from my source: /* * Using the law of cosines set to point O, A, B * any valid coords on the plane. Build circle C1 around * point A and C2 - around B. Consider all points from C1 * with a some small step. For each such point A' find * corresponding point B' on C2 that minimize distance * OA' + A'B' + B'O. For finding it we can also iterate * all points from C2 with certain step and compute * final distance for such pair (A', B'). But if we set * enough precision (a very small step) to attain a correct * answet - then obviously would earn "time limit". * We can avoid it e.g. in next way: * Instead of making only one pass with very small step * throug both circles we can make several passes recursively - * first will be over all points with big step, second - over * some small range near the local minimum obtained on previous * pass and so one... */ Maybe this will help to anyone... P.S.: in test 7 OA = 0, in test 8 - OB = 0. Or vise versa. On test >= 10 problems with precision can appear everywhere :) |
| [To Admin] Spelling errors in the description | __Emiapwil__ | 1011. Conductors | 31 Mar 2012 10:27 | 2 |
There should be 'than' in the statement 'more then P%' and 'less then Q%'~~ |
| Problem set | Coding Challenge | | 30 Mar 2012 12:16 | 1 |
How to set up a new problem (test with more problems) in your page. |