| Show all threads Hide all threads Show all messages Hide all messages |
| Another Hint | Inacio Medeiros | 1893. A380 | 9 Jun 2013 08:58 | 1 |
Try to "draw" the organization of seats, it helps a lot in writing algorithm solution. |
| 1748 | Vilchevski Konstantin | 1748. The Most Complex Number | 9 Jun 2013 04:59 | 3 |
1748 Vilchevski Konstantin 26 Jan 2010 21:36 Wrong answer 3 test. Help! Re: 1748 Ivanov Alexander (HSE Mozgless Eagles) 22 Jul 2011 17:29 In my case it was problems with test 1 12 Correct answer 12 6 Edited by author 22.07.2011 18:01 Re: 1748 SamGTU7_Kareva Nadezhda Vladimirovna 9 Jun 2013 04:59 try 2 12 2 Second test number is smaller than the first |
| WA 6? what is test? | orcchg | 1823. Ideal Gas | 9 Jun 2013 01:54 | 3 |
No prob, i proceed to AC now. I guess, Test 6 is: T != 0.0 V != 0.0 p == 0.0 n - ? Ans: n = 0 (just 0, not 0.000000) T != 0.0 V != 0.0 n == 0.0 p - ? Ans: same here, p = 0 your answer is wrong . because it becomes T != 0 and V != 0 and n == 0 answer is error! i think answer is "error" when n != 0 and p == 0 or p != 0 and n == 0 ... |
| Wrong answer 4! Please help! | LSKR | 1131. Copying | 7 Jun 2013 15:02 | 1 |
|
| Hint: Brute force | RainbowDash | 1893. A380 | 7 Jun 2013 14:46 | 1 |
Brute force this question! There's really no reason to do anything else. |
| What a test 53? | SS123 | 1854. Negotiations with Parthians | 7 Jun 2013 11:39 | 1 |
All tests on this forum gave the correct results ... I do not know what the problem is. Please, help!!!! |
| For those with C/C++ WA on test#6 | Linas | 1017. Staircases | 7 Jun 2013 08:40 | 4 |
Check if you're not using printf to output long long integers, it will not work on the server. So instead of: printf("%lld\n", count); do: cout << count << endl; I got WA on test 6 due to this problem. I think for those who use C, %I64d is needed but not %lld, which only works on unix/linux. It's said that cout/cin in C++ is very very very slow when doing massive i/o work, especially for long long data. the same code gives WA on test#6 with G++ 4.7.2 AC on VC++ |
| a math solution | Nonagod | 1017. Staircases | 6 Jun 2013 20:42 | 4 |
the answer is the coefficient of y^n of A(n)=(1+y+y^2+y^3+...)(1+y^2+y^4+y^6+...) ...(1+y^n+y^2n+y^3n...) if y<1; A(n)=1/((1-y)(1-y^2)(1-y^3)....) Can you please explain the formula? It is an infinite formula, right? So, How would I apply it? Please give an example It's easy to apply this formula, first of all you should notice that only n brackets must be opened, then you simply count all coefficients, multiplying only terms with the power that is less than n (or equal). (there is also one way to multiply less terms) And of course, you eventually get an answer. < Edited by author 29.03.2011 00:37 I think it's wrong. The correct answear is the coefficient of A(n) = (1+y)(1+y^2)(1+y^3)...(1+y^n)... less 1, because the staircase with one step must not be counted. |
| Weird Situation | Inacio Medeiros | 1881. Long problem statement | 6 Jun 2013 19:18 | 1 |
Dear Colleagues, It's occurring a weird situation: on my notebook, compiling using this Online Judge way, my java code for this problem works fine and gives the correct answers. When i submit it, however, online judge accuses of "Runtime Error". It follows below my "java version": "java version "1.7.0_01" # At Ubuntu 11.10 Java(TM) SE Runtime Environment (build 1.7.0_01-b08) Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode)" Can anyone explain why "Runtime Error" in Online Judge? |
| Test 16 | Victor Barinov (TNU) | 1514. National Park | 6 Jun 2013 10:56 | 2 |
Test 16 Victor Barinov (TNU) 11 Jul 2008 02:11 If you have WA on 16 test than maybe you have error in calculation of (xi - xj)^2. See problem statement |xi| < 10^6 so (xi-xj)^2 may be 4*10^12 and it does not fit in int type. Thanks a lot indeed! This is just where I've been confused with and your tips are really helpful! |
| Use cin and cout instead of scanf and printf!! | Lynn Wong | 1519. Formula 1 | 5 Jun 2013 13:38 | 1 |
I got a WA while using scanf but got an Accepted when I used cin instead. |
| в чем может быть проблема? wrong answer | remark | 1068. Sum | 5 Jun 2013 12:23 | 1 |
using System; using System.Globalization; namespace a_b { public class Program { private static void Main() { int first = 0; int N = int.Parse(Console.ReadLine()); if (N <= System.Math.Abs(1000)) { if (N == 1) { first = 1; for (int i = 1; i <= N; i++) { first += i; } } if (N > 1) { first = 0; for (int i = 0; i <= N; i++) { first += i; } } if (N < 1) { first = 1; for (int i = 0; i >= N; i--) first += i; } Console.WriteLine(first); } } } } |
| Solution | Hakobyan Tigran (RAU) | 1204. Idempotents | 4 Jun 2013 17:29 | 2 |
Solution Hakobyan Tigran (RAU) 13 Dec 2010 22:44 0 and 1 is trivial solution. Let x solution it must satisfy for follow requirements: {x=0(mod p);x=1(mod q);} or {x=0(mod q);x=1(mod p);} We can find 2 solution for these equation let it be x1,x2; And all solution will satisyf for follow requirements (x1+lcm(p,q))mod n,(x2+lcm(p,q))mod n; but lcm(p,q)==n we have only for solutions 0 1 x1 x2; Sorry for bad English! |
| test 4 WA | Opportunity | 1934. Black Spot | 4 Jun 2013 13:41 | 2 |
who can give some tests like test 4, pls. test 4 is first big test n>90000. And another hint with probability. Calculate p[s]=1-p[s]/100. and p[t]=1-p[t]/100. and use the simple algo BFS . Try to calculate the best probability by formula p[qu->nod]=p[min] * qu->cost; where qu->nod the current node, and qu->cost the probability of this node. Dont forget that the answer is 1.-p[t]. The time of this algo is not good - 0,359, but it is very simple. Good luck!! P.S.qu->cost the same as p[s] and p[t] must be recalculate at the begining like this fscanf(in, "%d %d %d", &x, &y, &z); a[x]=new graf(y,1.-z/100.,a[x]); Sorry for my english!! Edited by author 04.06.2013 13:48 |
| Wrong Answer 1 | Zohab Ali Nawaz | 1002. Phone Numbers | 4 Jun 2013 12:52 | 1 |
I am having problem in 1. Plz tell me that what should i do to solve this? |
| что в 3 тесте | kostan3 | 1548. Sakura and Statistics | 3 Jun 2013 20:00 | 1 |
|
| WA#41 | NotImplemented | 1338. Automobiles | 3 Jun 2013 19:48 | 1 |
WA#41 NotImplemented 3 Jun 2013 19:48 Can you give me a hint with test #41? |
| Help!!!! № 1000 | Dimmell | 1000. A+B Problem | 3 Jun 2013 19:24 | 1 |
С хера он не принимает задачу?! Вот: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Dimmell { class Program { static void Main(string[] args) { int a = Convert.ToInt32(Console.ReadLine()); int b = Convert.ToInt32(Console.ReadLine()); Console.WriteLine(a + b); } } } Edited by author 03.06.2013 19:24 |
| WA2 or is it? | alpha900i | 1353. Milliard Vasya's Function | 3 Jun 2013 17:05 | 2 |
Ok, so my program gets WA2. And if I add code like int t2=45; if(n==2) cout << t2 << endl; I get WA3. Funny fact though - "45" is answer my program always gave for n==2. So we have two different "45", and only one of them is good as answer. Somehow cout << s(9,n) << endl; doesn't work well, even if s(9,n)=45. Someone had problems of this kind? Ok-key, my bad. Had some good little out-of-array code in my check function, so it spoiled everything. |
| cannot get the meaning, sigh. | hliu20 | 1776. Anniversary Firework | 3 Jun 2013 09:28 | 1 |
|