Show all threads Hide all threads Show all messages Hide all messages |
WA 19?? | KibiBit[KhAI] >> Dima | 1777. Anindilyakwa | 4 Feb 2012 16:55 | 1 |
WA 19?? KibiBit[KhAI] >> Dima 4 Feb 2012 16:55 |
Could anyone send an analysis of this problem to me? I got AC but can't even proof that my solution is true... | MadPsyentist/Sam | 1106. Two Teams | 4 Feb 2012 14:04 | 4 |
I just use some sensing and guessing , and it happen to be got accepted... here is my e-mail iamloongsam@hotmail.com thank you It Is a little like bipartate graph analysis, a BFS gives a sollution.each level is colored by one of two different colors. Thankx, you give me a idea~ : ) It Is a little like bipartate graph analysis, a BFS gives a sollution.each level is colored by one of two different colors. Hi Could you kindly send me the code and explain what is the problem about. Thanks in advance. |
Very userful paper! Modified DFS to solve mathchig without flowers tree | RybKMU | 1099. Work Scheduling | 4 Feb 2012 04:58 | 5 |
What is file .Z? What prog I can use to viewed it! It is UNIX archive. Use 7-Zip This algo not easier than flowers tree... |
WA 1 | kvsmirnov | 1016. Cube on the Walk | 3 Feb 2012 20:36 | 1 |
WA 1 kvsmirnov 3 Feb 2012 20:36 Could you give me some tests? |
who solve this task, what answer for this test??? | Crash_access_violation | 1450. Russian Pipelines | 3 Feb 2012 16:21 | 4 |
what answer for this test : 6 7 1 3 5 1 4 10 2 1 5 3 2 5 5 1 1 6 1 2 6 5 2 6 4 13 or 27? thX You have a cycle! 1->3 3->2 2->1 right answer is 28` 6-5-1-3-2-1-4 Read Oleg's comment above... This test is incorrect |
Is there a bug in the checking system? | V@n0 | 1025. Democracy in Danger | 3 Feb 2012 11:18 | 4 |
1st variant: [code deleted] Result: WA My 2nd variant: [code deleted] Result: accepted. The difference is in "For" cycle which I separated with two blank lines. The rest part of code is the same in both variants. I can't understand why my 1st variant wasn't accepted. In my opinion there is no difference between these examples: a = b/2 + 1; and a = (b + 1)/2; if b > 0, is odd and has int type. Where is a mistake? Edited by author 01.02.2012 01:27 Edited by author 02.02.2012 00:24 Edited by moderator 20.11.2019 00:17 The first code gets AC too. Try to submit it. There was another code (with bug) in your submit № 4100318. You are right. Thanks. )) I hurried and was inattentive. But how can you see my submits? )) I tried to open someone's solutions but I couldn't. Why? Sandro is an administrator of this site. |
When answer will be "Impossible"? | tanas | 1571. Interpreters | 1 Feb 2012 22:02 | 10 |
In this test: 3 russian russian french In test: 3 russian russian french we can use new language, for example, "qwerty". The result must be: 3 russian-qwerty french-qwerty french-russian I am right? You aren't right. When crews "russian-2" and "french" want to communicate each other, another crew "russian-1" can understand their talk, because Russian is used in it! So, if there are two crews with the identical name, the answer will be "Impossible"? If, it's true, the problem becomes trivial. We create new language and connected it with each crews. ? input: 4 russian german russian german answer: 5 russian-eng russian-fra german-eng german-fra eng-fra it's true? or result will be "Impossible"? Edited by author 07.10.2007 21:58 Edited by author 07.10.2007 21:59 Thanks for all. AC. The problem is really trivial! Impossible input: 4 russian german russian german answer: 5 russian-eng russian-fra german-eng german-fra eng-fra it's true? or result will be "Impossible"? Edited by author 07.10.2007 21:58 Edited by author 07.10.2007 21:59 |
Please tell me.... | Sandello | 1571. Interpreters | 1 Feb 2012 22:01 | 3 |
what answer on the test input 5 eng ru ua ger ita output 5 eng-qwedfgjk ru-qwedfgjk ua-qwedfgjk ger-qwedfgjk ita-qwedfgjk is it correct???? input 2 a a output Impossible ???? For test 2 a a correct output is 0 of course. Edited by author 06.10.2007 23:07 |
How can I delete my page? | B | | 1 Feb 2012 17:39 | 1 |
|
a hint and a question | math404_3140 | 1242. Werewolf | 1 Feb 2012 07:46 | 2 |
I think this problem can be solved easily by using DFS algo. But there's sth I wantwd to ask. if our program is reading from the standard input, Can we use eof(f) in paskal? what should we do then? is it OK to use ASSIGN procedure for a file which has been made beore? I think it takes CRASH(ACCES VIOLATION) error. Is there anyone who can help me on the spot?!! I had the same problem, because I read char and if it was 'B', I go to next stage. It was always OK except this case: 100 BLOOD 1 2 I didn't eat the newline after 100, however I always did after numbers that went after it. Anyway - this is why test 4 is special. Hope that helps :-D |
Look here!!! | Flyer | 1137. Bus Routes | 31 Jan 2012 23:01 | 3 |
I know, that it's impossible to solve this problem using 250KB memory. We need at least to read all data into memory. Tell me, am I right? Well, my program used 140 KB. Nothing very special :) |
what is 11 Test? | Abbath1349 | 1083. Factorials!!! | 31 Jan 2012 21:37 | 2 |
I have error in 11 test anybody can say what is 11 test? k:=length(s)-1; if(n mod k)=0 then t:=k else t:=n mod k; p:=1; repeat p:=p*n; n:=n-k; until(n<t) |
WA#18 | dastan | 1777. Anindilyakwa | 31 Jan 2012 15:35 | 3 |
WA#18 dastan 30 Jan 2012 16:07 Edited by author 31.01.2012 15:35 Thanks! Sorry for my small intellegence)))) |
Can someone give me any tips for test #11 pls | HeypaBHoBeceH | 1621. Definite Integral | 31 Jan 2012 13:48 | 7 |
First I thought it was precision but now I don't know anymore. I thought i would never post a thread like this one but... this is a part of my code, f_x() is P(x): left1 = left2 = f_x(0); for(x = 1e-3 ; x < 6000 ; x += 1e-3) { y1 = f_x(+ x); y2 = f_x(- x); ans += ((((left1 + y1)/left1)/y1)) + ((((y2 + left2)/y2)/left2)); left1 = y1; left2 = y2; } ans *= 0.5*(1e-3); Try to use dx and limits which can be represented in binary form exactly (e.g. 1/1024.0 instead of 1e-3) appreciate the tip, but still WA11... Why are you using plus-minus 6000 as limits? 1/P(x) could have its maximum as far as x = 10^6 and a bit further. Edited by author 06.12.2008 22:36 nvm, Accepted! Edited by author 02.06.2009 14:16 Thank you a lot, I AC!!!!!!!!!!!!!! |
If input like this , what will output like ? | lyj_george | 1067. Disk Tree | 31 Jan 2012 06:30 | 7 |
INPUT: a\b d\a cc\e e\d OTHERWISE,does it have any special situations ? The output should be: a b cc e d a e d I don't think so. But you should take care not to repeat entries, like in this situation: input: a/b a output: a b and NOT: a b a type Ttree=^atree; atree=record name:string; son:Ttree; same:Ttree; end; var tree:Ttree; i,j,k,n:integer; p:Ttree; s:string; procedure create(s:string;var p:Ttree); var t,q:ttree; ss:string; begin if s='' then exit; new(q);q^.name:=''; q^.same:=nil; q^.son:=nil; ss:=copy(s,1,pos('\',s)-1); delete(s,1,pos('\',s)); if p=nil then begin q^.name:=ss; create(s,q^.son); p:=q; p^.same:=p; end else begin t:=p; while (p^.name<ss)and(p^.same<>t)and(p^.same^.name<=ss) do p:=p^.same; if p^.name=ss then create(s,p^.son) else begin q^.name:=ss; create(s,q^.son); q^.same:=p^.same; p^.same:=q; end; end; while p^.same^.name>p^.name do p:=p^.same; while p^.same^.name<p^.name do p:=p^.same; end; procedure print(i:integer;q:Ttree); var t:ttree; begin t:=q; repeat writeln(' ':i+1,q^.name); if q^.son<>nil then print(i+1,q^.son); q:=q^.same; until q=t; end; begin tree:=nil; readln(n); for i:=1 to n do begin readln(s); create(s+'\',tree); end; print(0,tree); end. Program disktree; const max=500; var a:array[1..max] of string[100]; n:integer; procedure init; var i,j:integer; begin readln(n); for i:=1 to n do begin readln(a[i]); for j:=1 to length(a[i]) do if a[i,j]='\' then a[i,j]:=#1; end; end; procedure mendheap(i,now:integer); var t:integer; st:string[80]; begin while i shl 1<=now do begin if i shl 1=now then t:=now else if a[i shl 1]>a[i shl 1+1] then t:=i shl 1 else t:=i shl 1+1; if a[i]<a[t] then begin st:=a[i]; a[i]:=a[t]; a[t]:=st; i:=t; end else i:=now; end; end; procedure dothing; var i:integer; st:string[80]; begin for i:=n shr 1 downto 1 do mendheap(i,n); for i:=n-1 downto 2 do begin st:=a[1]; a[1]:=a[i+1]; a[i+1]:=st; mendheap(1,i); end; st:=a[1]; a[1]:=a[2]; a[2]:=st; end; procedure print; var i,j,t,t1:integer; s,s1,s2,st:string; begin s:=#0#0; for i:=1 to n do begin st:=a[i]; if s=copy(st,1,length(s)) then begin t:=1; for j:=1 to length(s) do if s[j]=#1 then inc(t); end else begin j:=1; t:=0; while st[j]=s[j] do begin if st[j]=#1 then inc(t); inc(j); end; end; j:=1; t1:=t; while t1>0 do begin if st[j]=#1 then dec(t1); inc(j); end; s:=st; st:=st+#1; delete(st,1,j-1); while st>'' do begin if t>0 then write(' ':t); j:=pos(#1,st); writeln(copy(st,1,j-1)); inc(t); delete(st,1,j); end; end; end; Begin init; dothing; print; End. |
Who can help,Why I am always wrong | kkk | 1149. Sinus Dances | 30 Jan 2012 23:06 | 6 |
#include<stdio.h> void A(int i) { int n; for(n=1;n<i;n++) printf("sin(%d+",n); printf("sin(%d",i); for(n=1;n<=i;n++) printf(")"); } void S(int i) { int n; for(n=1;n<i;n++) printf("("); for(n=1;n<i;n++) { A(n); printf("+%d)",i-n+1); } A(i); printf("+1"); } main() { int n; scanf("%d",&n); S(n); } >Hei, it is OK your pogram, just have a look at the sample output - you have to change the sign "+" and "-" - your program outputs just sign "+" - you have to change the sign each time - that is it. I think, you will get accepted - TRY IT!!!!! Thank you for your information.But I still misunderstand your meaning Please explain more details Thanks Again!!! As I saw our program, you for n=3 your putput is: ((sin(1)+3)sin(1+sin(2))+2)sin(1+sin(2+sin(3)))+1 But have a look at the sample putput - it is: ((sin(1)+3)sin(1-sin(2))+2)sin(1-sin(2+sin(3)))+1 The signs "+" and "-" !!! Your program outputs just "+"!!!!!! TEst your program and the sample outout - you'l see! If you haven't anderstood me,write me again... Bye! > I am always wrong Sounds like a logical fallacy, lol :D "i'm lying" Just change 5th line from printf("sin(%d+",n); to printf("sin(%d%c", n, n & 1 ? '-' : '+'); |
The test data is not precise while some wrong programs can AC | keep_myself | 1009. K-based Numbers | 30 Jan 2012 18:27 | 2 |
for n = 1, k
the answer is : k while many programs give: k-1 but there is no such test data |
Problem 1277 "Cops and Thieves" has been rejudged | Vladimir Yakovlev (USU) | 1277. Cops and Thieves | 30 Jan 2012 14:57 | 1 |
New tests were added. After rejudge 26 authors lost AC. |
Help ! What's the meaning of this problem ??? | vongang | 1081. Binary Lexicographic Sequence | 27 Jan 2012 23:56 | 2 |
You should print lexicographically kth sequence for length n like for n=3 we have, 000 -- 1st 001 -- 2nd 010 -- 3rd 100 -- 4th 101 -- 5th and for n=4 0000 - 1 0001 - 2 0010 - 3 0100 - 4 and so on.. you find kth sequence for length n :) Hope it helps > :) |
help!!!! | Olim Nazarov | 1401. Gamers | 27 Jan 2012 23:54 | 2 |
|