Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения | Help please, WA 14 | Grigor Gevorgian | 1085. Встреча | 13 сен 2010 21:53 | 3 | My solution uses simple Floyd algo.It passed all tests on this board, but still gets WA. Edited by author 02.04.2009 12:58 ahh .. i used BFS .. and .. i get first WA 14 .. but i saw there .. "if the money to to bus station <= the friends money .." its just < :-) i saw oin other thread ;-) good luck | Wa Test #3 help Me | Quyon | 1085. Встреча | 1 авг 2010 05:15 | 2 | Try test 4 2 2 1 2 2 2 3 2 0 3 1 0 2 1 answer 1 0 | Test 1. Why answer is 12? | ilyamit | 1085. Встреча | 3 июл 2010 01:12 | 2 | Test 1. Need three tickets -> 3 * 4 = 12 And need money (two tickets) for first pessenger for distance from 1 to 4. All sum = 12 + 2 * 4 = 20. Please, tell me, what I dont understand. Sorry, I bad speak english. this not test 1, example test!!! From 1 to 4: 3 ticket Two people in 4 don't need! 3*4=12 | Can the serial number of the busstop be greater than 100? | Dont be shy | 1085. Встреча | 3 июл 2010 01:09 | 5 | i mean like this: 4 3 3 1 2 150 <----this stop is greater than 100 2 2 3 2 3 4 3 27 1 0 15 4 0 45 4 0
4 3 3 1 2 4 2 2 3 2 3 4 3 27 1 0 15 4 0 45 4 0 The answer is 4 4. Am right)? | Weak tests | Alex Tolstov | 1085. Встреча | 8 авг 2009 17:51 | 5 | One of my solutions can't pass this test, but gets AC. Test: 3 2 2 1 2 2 3 2 2 4 1 0 4 3 0 Wrong Answer: 0 Correct Answer: 2 8 Answer 0 is correct, because all freind's money is spent to tickets!!! And they have not money for a party! And they even will not buy alcohol and cigaretes! Boring party, isn't so? I quote the text... ...Unfortunately, because of the tickets rise in price there is a problem: all of them live in different parts of the city, and they are to choose a place of meeting so that they wouldn't pay too much for the tickets (SOME MONEY IS TO BE LEFT FOR THE PARTY)..... The problem text is ambiguous... rewrite please, or add old tests to this example. | WA4 | Nikita Artyushov (SPb SU, mat-meh) | 1085. Встреча | 30 июн 2009 18:15 | 2 | WA4 Nikita Artyushov (SPb SU, mat-meh) 30 июн 2009 17:04 Could somebody tell me, what can be the mistake, if I get WA4? Re: WA4 Nikita Artyushov (SPb SU, mat-meh) 30 июн 2009 18:15 | Time Limit on test #16 | penartur | 1085. Встреча | 12 окт 2008 23:36 | 2 | Anybody knows what in this test? I've optimized my algorithm after first time limit and now it runs really very fast; on my example file with 100 trains, 100 stations and 100 friends it takes only 145 milliseconds to calculate the answer - even in debug build. I just cannot imagine why it could calculate answer on some test for more than 2 seconds... UPD: 129ms in release build... Edited by author 12.10.2008 04:15 btw, i have changed DFS to BFS in my code (i had to define abstract tasks processor and implement stack and queue processor), and, although on my large tests it takes equal time independent of the engine used (stack or queue), stack engine have failed one more time on test #16 and queue engine have passed it. | Are there tests based on a wrong input? | _k0dErr | 1085. Встреча | 24 окт 2007 15:08 | 1 | Are there tests like this? 3 4 2 2 1 3 1 7 2 2 1 4 | WA 15 | And IV | 1085. Встреча | 28 июн 2007 00:52 | 1 | WA 15 And IV 28 июн 2007 00:52 #include<iostream>; #include<algorithm>; using namespace std; //ofstream cout("out.txt"); //ifstream cin("in.txt"); int n,m,i,o,ii,k,l,pp[101],z,a,b,c,ad,kk,nn,mnn=999999999; int och[101]; bool be[101],bb[101],b1=false; int bi[101]; bool gr[101][101]; int main() { cin>>n>>m; for(i=1;i<=m;i++) { cin>>pp[0]; for(o=1;o<=pp[0];o++) cin>>pp[o]; for(o=1;o<=pp[0];o++) { be[pp[o]]=true; for(ii=1;ii<=pp[0];ii++) { if(pp[ii]!=pp[o]) gr[pp[o]][pp[ii]]=true; } } } cin>>k; for(i=1;i<=k;i++) { fill(&bb[1],&bb[100],false); fill(&pp[1],&pp[100],0); cin>>a>>b>>c; och[0]=1;kk=0; bb[b]=true; pp[b]=0; och[1]=b; z=0; ad=4; if (c==1) ad=0; while(och[0]>z) { z+=1;
for(o=1;o<=n;o++) if(gr[och[z]][o] &&(!bb[o])&&(pp[och[z]]+ad<=a)) { bb[o]=true; och[0]++; och[och[0]]=o; pp[o]=pp[och[z]]+ad; bi[o]+=pp[o]; } } for(o=1;o<=n;o++) be[o]=be[o]&&bb[o]; } for(o=1;o<=n;o++) { b1=b1||be[o]; if((be[o])&&(bi[o]<mnn)) { nn=o; mnn=bi[o]; } } if(!b1) cout<<"0"; else cout<<nn<<" "<<mnn; return 0; | wats wrong | vitalok | 1085. Встреча | 26 мар 2007 15:05 | 2 | [code deleted] Edited by moderator 27.03.2007 09:45 Don't use maxint, you have overflow here, I think: a[i,k]+a[k,j] In 32-bit compilers integer = longint, so maxint = 2147483647, like Delphi. You can use something like this: const ...inf = 1000000; .......... for i:=1 to n do ...for j:=1 to n do ......a[i,j]:=inf; | why wa17 | Valery | 1085. Встреча | 9 фев 2007 16:21 | 1 | my program work not bad but get WA17. W H Y ??? | Why wa on test #5 | visitor | 1085. Встреча | 5 фев 2007 12:45 | 1 | | Why Wrong Answer on test#3 | Филиппов Илья (УЛ) | 1085. Встреча | 22 янв 2007 16:49 | 1 | var a:array[1..100,1..100] of integer; b,c,r,money:array[1..100] of integer; n,m,k,i,j,t,min,p,w:integer; begin readln(n,m); fillchar(a,sizeof(a),$FF); for i:=1 to m do begin read(t); for j:=1 to t do read(c[j]); for j:=1 to t-1 do for w:=j+1 to t do a[c[j],c[w]]:=1; end; readln(k); for j:=1 to k do readln(money[j],b[j],r[j]); for t:=1 to n do for i:=1 to n do for j:=1 to n do if ((a[i,j]>a[i,t]+a[t,j])or(a[i,j]=-1))and(a[i,t]<>-1)and(a[t,j]<>-1) then a[i,j]:=a[i,t]+a[t,j]; for i:=1 to n do a[i,i]:=0; min:=1000000;p:=0; for i:=1 to n do begin t:=0; for j:=1 to k do if (money[j]<a[b[j],i]*4)or(a[b[j],i]=-1) then begin t:=1000000; break; end else if r[j]=0 then t:=t+(a[b[j],i])*4; if t<min then begin min:=t; p:=i; end; end; if p=0 then writeln('0') else writeln(p,' ',min); end. | a little question | raxtinhac | 1085. Встреча | 5 дек 2006 19:47 | 4 | if the route is 3 2 3 1 Can i go from stop 1 to stop 2 ? > if the route is > 3 2 3 1 > Can i go from stop 1 to stop 2 ? Yes. Can I move from stop 3 to stop 2? You can move from stop A to stop B if there exist some route that contains both stops. Edited by author 05.12.2006 19:48 | What's test 1 | chinats4 | 1085. Встреча | 17 авг 2006 15:34 | 1 | I want to know what the test 1 is. thanks. Edited by author 17.08.2006 15:34 | Help, WA3... Use BFS | Neo Nomaly | 1085. Встреча | 23 фев 2006 21:51 | 2 | [code deleted] Edited by moderator 23.02.2006 23:30 | Help!!!!!!Who can give me the program in c++ now | sese | 1085. Встреча | 28 апр 2005 21:46 | 3 | Please give me the program now!! yo baby i'm sexy alinutza y can give you something show me what you got, baby! | whats up????? | sese | 1085. Встреча | 28 апр 2005 21:31 | 1 | | what the answer for this test | TestT | 1085. Встреча | 15 фев 2005 16:02 | 5 | 6 3 3 1 2 3 3 4 5 6 3 3 4 6 3 198 1 1 6 3 0 7 3 0 (Test 5) and why ??? I have the same question: Why? Is this a special rule of Russian? Help me, please... Test #5 Input 6 3 3 1 2 3 3 4 5 6 2 3 4 3 198 1 1 6 3 0 7 4 0 Correct output 3 4 ...and everything is ok | Help! Please. I don't know what is wrong. Can anybody give me some tests or hints? PLEASE(-) | Aleksey Meshnikovsky | 1085. Встреча | 23 окт 2004 21:05 | 11 | Congratulations! Month tickets is a main tricky of this problem. BFS : Breadth-first search. Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest "Introduction to algorithms" MIT Press Edited by author 23.10.2004 19:13 Now I have guessed what is it BFS, but it seems to me, that easier and faster to solve this problem by Floyd algorithm. Edited by author 23.10.2004 19:17 I don't now. Edited by author 23.10.2004 19:22 Please I am on contest in my country I am solving this probs. help help help Stop it! Roman Lipovsky 23 окт 2004 21:05 |
|
|