| Show all threads Hide all threads Show all messages Hide all messages |
| read please | ghostfreak | 1001. Reverse Root | 23 Jul 2010 21:28 | 3 |
cannot i use strtoint or inttostr???:( no ,you needn't. just use longint |
| Hints | Fyodor Menshikov | 1704. Demodulation | 23 Jul 2010 19:55 | 6 |
Hints Fyodor Menshikov 21 Apr 2009 21:30 1. Minimize sum of squares of differences, not sum of absolute values of differences. 2. It is important, that constant AMP (amplitude) is the same for all bits. 3. There is no test with negative amplitude. Hint should be: notion of appropriate statistical processing: extracting a and b in a+b*k from noise Or MNK Or sequental analysis Or maching learning Or optimal decision theory What artical in Wikpedia should read? Re: Hints Alipov Vyacheslav [Tomsk PU] 22 Jul 2010 01:48 Would you be so kind to give the slightly more detailed description of your solution? I tried to used DFT but it seems to be too sensitive to noise. I heard of Arctan-Differentiated Demodulator, but I can't find the literature on this theme. Does anybody know, is it applicable here? Re: Hints Vedernikoff Sergey (HSE: АОП) 23 Jul 2010 02:29 Use OLS (ordinary least squares) estimator for this problem Re: Hints Alipov Vyacheslav [Tomsk PU] 23 Jul 2010 19:55 Thanks a lot. I've never used this method before. But it's worth keeping in mind :) |
| Why wrong answer5?????? See my code. | Programmer | 1067. Disk Tree | 23 Jul 2010 16:55 | 3 |
type pver=^tver; pe=^te; te=record e:pe; ver:pver; end; tver=record s:string; e:pe; end; type trec=record s:string; ver:pver; end; var i,n:word; s:string; pb,ver:pver; fir:boolean; procedure add(s:string;ver:pver); var e:pe; vt:pver; begin if s='' then exit; e:=ver^.e; while e<>nil do begin if copy(s,1,pos('\',s)-1)=e^.ver^.s then begin delete(s,1,pos('\',s)); add(s,e^.ver); exit; end; e:=e^.e; end; new(vt); vt^.e:=nil; if pos('\',s)>0 then vt^.s:=copy(s,1,pos('\',s)-1) else vt^.s:=s; new(e); e^.ver:=vt; e^.e:=ver^.e; ver^.e:=e; if pos('\',s)>0 then begin delete(s,1,pos('\',s)); add(s,vt); end; end; procedure writ(ver:pver;ur:word); var a:array [1..600] of trec; t:trec; kol,u,i:word; e:pe; begin kol:=0; e:=ver^.e; while e<>nil do begin inc(kol); a[kol].s:=e^.ver^.s; a[kol].ver:=e^.ver; e:=e^.e; end; if kol=0 then exit; for u:=1 to kol-1 do for i:=1 to kol-u do if a[i].s>a[i+1].s then begin t:=a[i]; a[i]:=a[i+1]; a[i+1]:=t; end; for i:=1 to kol do begin { if not fir then writeln; fir:=false;} for u:=1 to ur do write(' '); writeln(a[i].s); writ(a[i].ver,ur+1); end; end; begin new(pb); pb^.e:=nil; readln(n); for i:=1 to n do begin readln(s); add(s,pb); end; fir:=true; writ(pb,0); end. This test help me. 2 GAMES\GGG GAMES |
| MLE #13 or TLE #13 | Alexander Samal | 1269. Obscene Words Filter | 23 Jul 2010 03:53 | 3 |
Aho-Corasic I think will make AC :) Accepted:) Edited by author 23.07.2010 21:41 |
| Wrong answer 6 | DNS | 1070. Local Time | 23 Jul 2010 02:17 | 1 |
Double post. Wrong! please delete this post. Edited by author 23.07.2010 02:19 Edited by author 23.07.2010 02:19 |
| Hmf. Error in test #10 | Yegor Suvorov | 1116. Piecewise Constant Function | 23 Jul 2010 00:57 | 3 |
Try this: 2 1 2 2 2 3 3 0 Right answer: 2 1 2 2 2 3 3 I had WA, and now I have AC! Edited by author 01.10.2007 20:17 Edited by author 01.10.2007 20:17 my program passed this test but WA #10! |
| to admins | Vasilenko Oleg (South Ural State University) | 1524. Men in Black | 22 Jul 2010 20:33 | 1 |
to admins Vasilenko Oleg (South Ural State University) 22 Jul 2010 20:33 Please, help me with test 2. Can you say me, how much my answer differs from correct answer? |
| Is 1,2,4,6,5,3 also right?????????? | bobchennan | 1040. Airline Company | 22 Jul 2010 09:52 | 3 |
Who can tell me? I have WA1. Thanks a lot. Edited by author 03.05.2009 09:55 Edited by author 03.05.2009 09:56 Edited by moderator 13.05.2009 01:51 "If there are several flights that depart from one airport then the greatest common divisor of their flight numbers should be equal to 1." input 6 6 1 2 2 3 2 4 4 3 5 6 4 5 output 1 2 4 6 5 3 This output isn't correct because for second flight (2, 3) gcd is equal to 2 != 1. Edited by moderator 13.05.2009 01:52 O_o "If there are several FLIGHTS that depart from one AIRPORT then the greatest common divisor of their flight numbers should be equal to 1." Why did you calculate gcd for the second flight? Output is a numbers of flights, not numbers of flights. May be you should do this for the second airport. However gcd of the flight numbers of the second airport is gcd(1,2,4) = 1. P.S. I think output is not right because gcd of the flight numbers from the airport #3 is equal to 2. Edited by author 22.07.2010 10:00 |
| What's the point of this problem...(+) | 2rf [Perm School #9] | 1510. Order | 22 Jul 2010 05:35 | 1 |
|
| No subject | muhammad | 1484. Film Rating | 22 Jul 2010 00:44 | 1 |
Edited by author 25.04.2012 19:42 |
| Method | SerailHydra | 1272. Non-Yekaterinburg Subway | 22 Jul 2010 00:00 | 3 |
Method SerailHydra 10 Nov 2007 17:57 You can consider that the cost of the tunnel is 1, and the bridge is 24000. Then it becomes a MST problem. would be better to make weight tunnel 0, the weight of the bridge 1, and the answer is weight of minimal spanning tree Your idea is interesting, but weird a bit. :) It can be solved with DFS easily. Moreover, you even don't need to know anything about bridges. |
| hint for test 5 | kyo_key | 1269. Obscene Words Filter | 21 Jul 2010 22:48 | 4 |
use while (getchar()!='\n'); don't use scanf("\n"); scanf("\n") not just wait for \n ,it will skip all blank char Edited by author 11.05.2009 10:57 useful hint!&&now i TLE 13.. I passed this test using getline(cin, str, '\n'); Now I have MLE #13 :( |
| After Queen 2 it's easy =) | quick(YarSU) | 1453. Queen | 21 Jul 2010 19:09 | 1 |
|
| Sort and Output element n/2 | ░▒ Nguyễn Kim Vỹ ▒░ | 1510. Order | 21 Jul 2010 16:10 | 2 |
this algo with O(n*log(n)) but i don't know why WA on Test21, please help me! [code deleted] Edited by moderator 24.11.2019 13:39 Your mistakes: a[100001] must be a[500001] a[(n-1)/2] must be a[(n+1)/2] qsort(a,n,sizeof(int),compare) must be qsort(a,n+1,sizeof(int),compare). So AC is here: [code deleted] Edited by moderator 24.11.2019 13:38 |
| Suffix trees/arrays | Andrew Shmig aka SKYDOS [Vladimir SU] | | 21 Jul 2010 03:32 | 4 |
Which problems on Timus I can solve using suffix trees/arrays? Thx. May be 1393 is suffix array problem, but i'm not sure. Also 1297 has simple KMP solution O(N^2), but I red in discussion of that problem about suffix tree O(N)solution. Also 1354 has simple O(N) solution via KMP but you can apply suffix tree here as I a red in discussion. Edited by author 18.07.2010 10:22 Thx! I will try to solve these problems! May be 1393 is suffix array problem, but i'm not sure. Also 1297 has simple KMP solution O(N^2), but I red in discussion of that problem about suffix tree O(N)solution. Also 1354 has simple O(N) solution via KMP but you can apply suffix tree here as I a red in discussion. Edited by author 18.07.2010 10:22 |
| I think i am correct ! But why wa14? pls help.(fw: code) | muhammad | 1287. Mars Canals | 20 Jul 2010 17:45 | 1 |
[code deleted] sorry.stupid mistake.AC Edited by author 20.07.2010 18:09 |
| Question | SKYDOS | 1414. Astronomical Database | 19 Jul 2010 22:38 | 3 |
Is it possible to solve this problem using suffix tree? or it will get MLE? I solved it with std::set. Just use lower_bound() and upper_bound() functions. Applying lower_bound() is quite straightforwardly(yourSetObject.lower_bound(string)), but upper_bound() requires additinal {max_word_len-string.len} 'z' symbols. Read documentation and you will understand why. That's all! I am using C# and dont really know if there is something like lower_bound(), thats why I am asking about suffix tree/array :) |
| If two squares don't intersect | Mato_No1 | 1006. Square Frames | 19 Jul 2010 17:23 | 2 |
For example, xxx┌────┐xxxxx xxx│xxxxxx│x┌──┐ xxx│xxxxxx│x│xxx│ xxx│xxxxxx│x│xxx│ xxx│xxxxxx│x└──┘ xxx└────┘xxxxx Should I output the left first, or the right first? Edited by author 19.07.2010 15:39 |
| Why I got WA?Help me! | Z H Pascal | 1324. Extra Spaces | 19 Jul 2010 01:42 | 2 |
Here is my program:program Space; var L, R, I, J, K : longint; s : array [1.. 1000] of longint; begin readln (L); if L < 2 then R := 0; for I := 1 to 1000 do s [I] := 0; if L > 1 then begin I := 2; J := 2; s [1] := 2; R := 1; repeat if L > J then begin inc (R); s [R] := I; if R > 3 then inc (s [R]); I := J + 1; J := (I + 2 - s [R]) * s [R] - 2; end; until L <= J; end; writeln (R); for I := R downto 1 do writeln (s [I]); end. As for me - I don't try to create solution by "jumps". I go from 2 to N and some times add i/2+1 to answer. |
| Oh! There are more than one tests. | Mato_No1 | 1004. Sightseeing Trip | 18 Jul 2010 20:51 | 1 |
|