| Show all threads Hide all threads Show all messages Hide all messages |
| Weak tests | Fyodor Menshikov | 1297. Palindrome | 10 Nov 2009 14:04 | 4 |
Please add test aa I know AC solution that answers to this test 'a'. why right answer 'a' and not 'aa'? |
| I know how to do it now! | Зане | 1627. Join | 10 Nov 2009 12:58 | 1 |
We can use Matrix-Tree theoremd(生成树计数) to solve it! O(N^3) |
| !!! use "seekeof" instead of "eof" | cqyzzzl | 1001. Reverse Root | 10 Nov 2009 12:38 | 1 |
have a try. { while not seekeof begin end; } |
| Does the order in which you print the word matters? | Prabhjot Singh | 1002. Phone Numbers | 10 Nov 2009 02:35 | 2 |
Does the order in which you print the word matters? |
| Help me with 5th test. | Basmus | 1200. Horns and Hoofs | 10 Nov 2009 00:19 | 5 |
I cannot pass thru 5th test. Edited by author 06.10.2004 20:05 TEST #5 Vlad Veselov [PMG17, Vinnitsa - KNU, Kiev] 6 Oct 2004 20:05 input--> 5434.87 -4567 300 correct output--> 1540461.00 300 0 Re: TEST #5 Иксанов Семён Александрович 8 Oct 2004 18:10 where do you get an input tests? |
| About Test #11 | PPLoveTT | 1315. MDPAR and MIIAR | 9 Nov 2009 21:36 | 3 |
What's the trick on Test #11?.. Help me ... I also need some help... It seems to me, that my program is correct. Got AC finally. In 11 test N=1000; M=1000; D=1998; X=1000; Y=1; Rescue operation required; start position in water. My mistake was, that I didn't fill with water start position of bfs. |
| I don't know why I got ac. | 衣衣是我的全部,我爱衣衣 | 1226. esreveR redrO | 9 Nov 2009 19:20 | 5 |
I have writen the program if many similar ways. I don't know why I got ac with this program: const u : set of char = ['A'..'Z','a'..'z']; var s : string; i : integer; ch : char; begin s := ''; while not (eof) do begin read(ch); if ch in u then s := ch+s else begin write(s); write(ch); s := ''; end; end; if ch in u then write(s); end. by the way, the pascal program should use "read(char)" instead "readln(string)" or you will get crash! Yeah, I don't know, either. I think it sure will be WA. may be all the words are palindromes:) All right. Because s +'abc' will give "sabc", and 'abc' + s will give "abcs". |
| connected iff sharing point | Koala | 1281. River Basin | 9 Nov 2009 10:22 | 1 |
two rivers are considered to be connected iff they share at least one vertex (no matter inner vertex or end vertex) example 1: 2 2 -1 0 1 0 2 0 1 0 -1 not connected, because their intersection (0, 0) is not a vertex of river 1 or river 2 example 2: 2 2 -1 0 1 0 3 0 1 0 0 0 -1 not connected, because (0, 0) is not a vertex of River 1 example 3: 2 3 0 1 0 0 0 -1 3 -1 0 0 0 1 0 connected, because (0, 0) appears on both rivers |
| Tricks are! | svr | 1730. ManBearPig | 9 Nov 2009 09:04 | 3 |
After 3 test use a/b=>(a/nod(a,b))/(b/nod(a,b)) To the English reader it will be not clear. It is necessary to write GCD. |
| Two dimensional interval tree | typedef | | 9 Nov 2009 05:24 | 3 |
Hello. I have an array of numbers from 1 to N. The order is random. I have to answer a lot(M) of questions like: how many numbers from interval [x, y] bigger than k. I tried to build two-dimensional interval tree: each edge of interval tree has an internal tree. But that tree was too large. 1 <= N, M <= 100000 Memory limit = 64 Mb Also I tried to build Fenwick tree. But it also needs too much memory: O(N^2). Please, can you help me to compress an interval tree or Fenwick tree? Or, maybe, there is another way to solve this problem? Thank you. You can store in each node of interval tree sorted list of numbers in corresponding interval. It requires O(n log n) memory and can be built in O(n log n) time (you can merge two sorted lists in linear time). With this tree you can answer queries in O(log^2 n) time using binary search Edited by author 10.11.2009 02:42 Thank you! It really works :) |
| WA 18 | Sergiy_PMI_31 [Lviv NU] | 1730. ManBearPig | 9 Nov 2009 03:52 | 1 |
WA 18 Sergiy_PMI_31 [Lviv NU] 9 Nov 2009 03:52 I still have WA on test 18 after many efforts. Does anyone know some tricks about this test? My program gives right answers on all my tests. Can anyone give me more tests? |
| Sample | Oracle[Lviv NU] | 1308. Dean's Pyramid | 9 Nov 2009 02:14 | 1 |
Sample Oracle[Lviv NU] 9 Nov 2009 02:14 Shouldn't the answer to the sample be 0.3660? I've solved this problem assuming, that pyramid lies on triangular edge. It seems to me that it is wrong suggestion, nevertheless it got AC. It seems to me, that pyramid should be firstly rotated to lay on one of the triangular face - then the answer is 0.3660. Am I wrong? Edited by author 09.11.2009 02:17 |
| who can tell me how many integer numbers shoud I input each time? | hengxin | 1001. Reverse Root | 9 Nov 2009 01:47 | 5 |
from the statements of the problem ,I don't know how to end my input .Is there anyone can help me? Thank you very much Edited by author 13.01.2009 17:38 I really don't know how to end my input file... Should I write while not eof do??? If you data type is double or float or something like that, to end the input you can simply type a letter (a-z , A-Z).But bare in mind that in the example input there is no such letter so I don't have a clue how to end it according ot the judge criteria. :P :D |
| Just to make shure I understood right ^_^ | Fokysnik | 1017. Staircases | 9 Nov 2009 01:21 | 4 |
N=5 Q=2 N=6 Q=3 N=7 Q=4 N=8 Q=5 N=11 Q=11 N=17 Q=36 Right? Wrong: N=17 Q=36 Right: N=17 Q=37 kuso! >_____<" Edited by author 09.11.2009 01:23 |
| Why dose my program get WC? | mikegreen7892003 | 1149. Sinus Dances | 8 Nov 2009 23:35 | 3 |
var n:byte; procedure a(now,step:byte); begin if now=step then write('sin(',now,')') else begin write('sin(',now); if now mod 2=1 then write('-') else write('+'); a(now+1,step); write(')'); end; end; procedure s(step:byte); begin if step=1 then begin write('('); a(1,step); write('+',n-step+1,')'); end else begin if step<>n then write('('); s(step-1); a(1,step); write('+',n-step+1); if step<>n then write(')'); end; end; begin readln(n); s(n); writeln; end. var n:byte; procedure a(now,step:byte); begin if now=step then write('sin(',now,')') else begin write('sin(',now); if now mod 2=1 then write('-') else write('+'); a(now+1,step); write(')'); end; end; procedure s(step:byte); begin if step=1 then begin if step<>n then write('('); a(1,step); write('+',n-step+1); if step<>n then write(')'); end else begin if step<>n then write('('); s(step-1); a(1,step); write('+',n-step+1); if step<>n then write(')'); end; end; begin readln(n); s(n); writeln; end. in 5 out ((((sin(1)+5)sin(1-sin(2))+4)sin(1-sin(2+sin(3)))+3)sin(1-sin(2+sin(3-sin(4))))+2)sin(1-sin(2+sin(3-sin(4+sin(5)))))+1 Edited by author 08.11.2009 23:59 |
| 1021 wrong answer | GulfStream | 1021. Sacrament of the Sum | 8 Nov 2009 21:23 | 3 |
Somebody can respond why incorrectly? On turbo pascal all tests passes. var a:array[1..1000] of integer; b:array[1..1000] of integer; i,j,n,m,r: integer; s1,s2,s: string; begin read(n); for i:=1 to n do readln(a[i]); for i:=1 to n-1 do if a[i]>a[i+1] then begin r:=a[i]; a[i]:=a[i+1]; a[i+1]:=r; end; read(m); for j:=1 to m do readln(b[j]); for j:=1 to m-1 do if a[j]<a[j+1] then begin r:=a[j+1]; a[j+1]:=a[j]; a[j]:=r; end; for i:=1 to n do for j:=1 to m do begin if ((a[i]+b[j])=10000)and((a[i]+b[j])<>10000) then s:='yes' else if (a[i]+b[j])=10000 then s1:='yes' else if (a[i]+b[j])<>10000 then s2:='no'; end; if s='yes' then writeln(s) else if s1='yes' then writeln(s1) else if s2='no' then writeln(s2); end. Edited by author 08.11.2009 20:44 You should output capital letters ("YES", "NO"). Time limit exceeded How to correct?=) How time depends? Edited by author 08.11.2009 21:27 |
| Wa on the test #3,who could tell me what's it?Thx!! | zhangfan | 1078. Segments | 8 Nov 2009 18:24 | 5 |
Me too. Who can come to give a hand? 尝试这个例子: 2 2 7 2 5 正确的结果是 1 1 or 1 2 翻译有错误 线段必须完全包含 Thank you for your test case. I got AC. kiitos! 如果有两个答案。 就想你这个例子。 应该输出什么? 都输出?还是? |
| WA8!!! | Dimaphil | 1617. Flat Spots | 8 Nov 2009 13:42 | 1 |
WA8!!! Dimaphil 8 Nov 2009 13:42 var a : array[1..150] of integer; n, i, j, k, m, t, l : integer; begin readln(n); for i := 1 to n do begin readln(a[i]); end; for i := 1 to n do begin for j := 1 to n - i do begin if a[j] < a[j + 1] then begin t := a[j]; a[j] := a[j + 1]; a[j + 1] := t; end; end; end; i := 2; k := 1; while i <= n do begin if a[i] = a[i - 1] then begin inc(k); end else begin inc(m); if k >= 4 then begin inc(l); end; k := 1; end; inc(i); end; l := l + (k div 4); writeln(l); end. Why is WA? |
| Wrong answer test#5 | GulfStream | 1502. Domino Dots | 8 Nov 2009 03:46 | 5 |
Here my solution: --- end. I can not understand that incorrectly. Help somebody))))))) Edited by author 08.11.2009 03:46 The answer for 10000 is as large as 500150010000 The answer for 10000 is as large as 500150010000 What type to use? The biggest it longInt. 500150010000 does not enter there. |
| И все-таки он существует! | Vladimir Half-tech.RW | 1612. Tram Forum | 8 Nov 2009 00:32 | 4 |
Я сначала подумал, что это выдумка, и предствавьте себе мое удивление, когда я и впрямь его обнаружил! Подумать только - настоящий трамвайный форум!.. (Ссылка дана в тексте задачи - forum.tr.ru) о_О там действительно форум! х_х Хм я не один такой! Я туда тоже зашёл Эх... и я тоже... ^ ^ Edited by author 08.11.2009 00:34 |