| Show all threads Hide all threads Show all messages Hide all messages |
| what`s the meaning of segment? | 95487701 | 1019. Line Painting | 1 Aug 2013 18:11 | 2 |
what`s the meaning of segment? [a,b],(a,b),(a,b],or [a,b)? Edited by author 18.04.2013 21:33 Segment is [a,b] (for painting). But you must output interval (a,b) Edited by author 01.08.2013 18:13 Edited by author 01.08.2013 18:13 |
| why WA#19 | Levin9 | 1959. GOV-internship 3 | 1 Aug 2013 13:37 | 2 |
|
| Help pleased . My Suffix Array wa on test # 3 ??? | Eazy jobb | 1517. Freedom of Choice | 1 Aug 2013 13:09 | 3 |
[code deleted] ------------------------------------------------------------------------------------- I've got AC. If you wa on test#3 , you should wirte your OWN suffix array base on your UNDERSTANDING cause it's too easy . If you want my help , just send me an e-mail . adress : ngziming@gmail.com . ------------------------------------------------------------------------------------- pleased try this data input: 5 CCCCC CCCCC output: CCCCC ------------------------------------------------------------------------------------- hint: remeber to add a no-use char at the last of the string . ------------------------------------------------------------------------------------- Edited by author 16.08.2012 09:29 |
| Shortest solution (Pascal) | Andrew | 1068. Sum | 31 Jul 2013 23:35 | 1 |
var a: integer; b: longint; begin readln(a); b := (a + 1) * (abs(a - 1) + 1) div 2; writeln(b); end. |
| sqrt-decomposition TLE | ivailo chernev | 1846. GCD 2010 | 31 Jul 2013 13:01 | 3 |
can you tell me how to avoid using a STL map in my sqrt-decomposition No problem. My solution gets no TLE but I also use sqrt-decomposition. Perhaps problem is in other matter. sqrt-decomposition - AC in 0.421 and 7 177 memory :) |
| Runtime error #10 in Java BigInteger | jyysc | 1133. Fibonacci Sequence | 31 Jul 2013 11:23 | 1 |
It’s Runtime error in case#10 who can tell me Why? 第10组Re为什么? |
| WA2 | RASTA | 1470. UFOs | 31 Jul 2013 07:21 | 3 |
WA2 RASTA 22 Apr 2009 19:06 why my progam get it??? I think its correct z wrote many tests and all of them my program pass corectly but in test 2 some strange... I know that N in 2 test = 2 if it test from statement? please give me some tests like test #2 here is my code(Fenvick Tree 3D) //code deleted some tests for WA2 3 1 1 1 0 2 1 0 0 0 3 1 0 0 1 3 2 1 1 0 2 2 2 3 answer 2 2 1 0 0 0 10 1 0 0 1 10000 1 0 1 0 50 1 0 1 1 1000 1 1 0 0 5 1 1 0 1 100 1 1 1 0 1 1 1 1 1 127 2 1 1 1 1 1 1 3 answer 127 this tests useful for fenvick tree solution! Edited by author 22.04.2009 20:19 Re: WA2 Vitalii Arbuzov 17 Apr 2011 14:35 Thanks, second test helped a lot. I've got AC using java in 1 sec with 3D Fenwick tree. Solution can be improved in constant factor if search is done more effectively to avoid duplicate searches while subtracting and adding peaces. Edited by author 17.04.2011 14:39 |
| Tip | Sirko | 1075. Thread in a Space | 30 Jul 2013 22:55 | 1 |
Tip Sirko 30 Jul 2013 22:55 First, Anatoly's tip helped me (see "WA#4 - I don't know why" thread). Another one tip for those receiving WA with "swear correct algo": I've multiplyed whole input data to some koef (tried 500, 800) and divided result by this koef before printing — got AC while without it got WA on 8-th test. It's all about error of calculations. And, of course, I've used double, not float. |
| WA#4 - I don't know why | Leonid (SLenik) Andrievskiy | 1075. Thread in a Space | 30 Jul 2013 22:44 | 3 |
AB, AC, BC - Vectors. r - Radius. Arctangent(y, x) - Coprocessor function FPATAN, calculates an angle between vectors A(x, y) and X(1, 0)(using y and x coordinates of the A point). My algorithm: d = Abs(VectorMultiply(AC, BC)) / AB if (d >= r) then Write(Length(AB)) else begin s1 = Sqrt(Length(AC) * Length(AC) - r * r) angle1 = Arctangent(Sqrt(Length(AC) * Length(AC) - d * d), d) - Arctangent(s1, r); s2 = Sqrt(Length(BC) * Length(BC) - r * r) angle2 = Arctangent(Sqrt(Length(BC) * Length(BC) - d * d), d) - Arctangent(s2, r); s = r * (angle1 + angle2) Write(s1 + s + s2) end ----- Am I wrong? I think if you'll get following test, then you'll get 4th. 1 2 0 3 3 0 0 0 0 2 The answer is 2.24 (not 2.30) Thank's Anatoly, that helped me. Don't know, how I've missed this :) |
| Test#10 OR Can it be solved with monte carlo alogrithm? | Alex Svetkin [OrelSTU] | 1333. Genie Bomber 2 | 30 Jul 2013 20:24 | 6 |
Can it be solved with monte carlo alogrithm? I used 10^6 points for checking and got WA at test #10. Then changed number of points to 10^5 and still get WA#10. Edited by author 19.10.2004 02:09 I cut the square into 10^5 stripes and WA #10. Then I magnified the picture by 10^4 times and changed real into extended, WA #10 still. Wrong test, or wrong algo? I used 10^6 points checking and I got AC=) Try to post your code I'm sure the problem there I've solved it with monte carlo alogrithm. So, i can say that it is possible |
| Test | Zeva [USU] | 1502. Domino Dots | 30 Jul 2013 17:55 | 18 |
Test Zeva [USU] 28 Oct 2006 17:07 1000 => 501501000 500 => 62875500 333 => 18629685 1 => 3 3 => 30 4 => 60 But Wa#5 Edited by author 28.10.2006 17:09 The same with me: WA#5 can anybody tell me why Re: Test emotional blind 28 Oct 2006 17:30 Re: Test emotional blind 28 Oct 2006 17:31 Re: Test Madiyar Tursunbayev 29 Oct 2006 12:11 Just use int64 instead of longint; Re: Test Todor Tsonkov 30 Oct 2006 16:02 My solution is very short and I also get WA5, my answers are the same as those posted, can anyone give some hint ? Re: Test USTU-FTF KOIBAS Team 30 Oct 2006 16:30 I got Accepted using BrutForce!!! Re: Test Todor Tsonkov 30 Oct 2006 17:02 Already solved this problem, read the hint below :) Edited by author 30.10.2006 21:20 Re: Test N.M.Hieu ( DHSP ) 30 Oct 2006 18:28 Yes , me , too . WA#5 but AC now , you should change "int n" into "long long n" . Re: Test Todor Tsonkov 30 Oct 2006 21:20 Yup, 10x pal, you saved me from reading again and again this task and to wonder where I was wrong :) WA on 5 Alexander Prokazyuk (TKTL) 2 Nov 2006 07:17 Who can find my mistake? [code deleted] it passes all my tests, but it can't pass 5 Edited by moderator 29.12.2006 09:16 This is my formula for (int i = 0; i <= n; ++i) res += (i + n) * (n - i + 1) / 2 + i * (n - i + 1); This one is mine: n*-~n*-~-~n>>1 Have fun! Re: WA on 5 Mihran Hovsepyan <<RAU>><<1 kurs>> 8 Nov 2007 16:00 Re: Test Petromil Petkov 10 Nov 2006 01:00 Thanks for the advice. Could you tell me what brings this change? n=10000 fits in an int, doesn't it? Ha! Got accepted only with __int64 and not with long long... my djgpp returns a compilation error on such a line... could anybody explain me what should that be? Edited by author 10.11.2006 01:16 Edited by author 02.03.2008 12:54 Edited by author 02.03.2008 12:53 |
| WA 25 | Al.Cash | 1378. Artificial Intelligence | 30 Jul 2013 11:41 | 3 |
WA 25 Al.Cash 20 Jun 2009 15:06 Can somebody tell me the possible reason of this WA? Or at least what figure is in that test? I would be very thankful! |
| #2 | Domacles | 1071. Nikifor 2 | 30 Jul 2013 10:43 | 1 |
#2 Domacles 30 Jul 2013 10:43 |
| WA on 6 test | R. Dubinin | 1210. Kind Spirits | 29 Jul 2013 23:51 | 1 |
please, give me some tests. |
| WA # 3. please help | R. Dubinin | 1306. Sequence Median | 29 Jul 2013 16:56 | 1 |
|
| WA 8 | Yagudin Ruslan | 1339. Babies | 29 Jul 2013 15:48 | 1 |
WA 8 Yagudin Ruslan 29 Jul 2013 15:48 |
| can this problem solved with dp. | runtime_error | 1517. Freedom of Choice | 29 Jul 2013 15:07 | 1 |
i tried to solve this problem with dp. O(N*2) time and O(N) memory: here is my code #include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int n; string s,t; string Longest_common_substr(void) { int place; int longest=0; vector<int> m(n); for(int i=0;i<n;i++) { for(int j=n-1;j>=0;j--) { if(s[j]==t[i]) { if(j!=0)m[j]=m[j-1]+1; else m[j]=1; } else m[j]=0; if(m[j]>longest) { longest=m[j]; place=j-longest+1; } if(longest==n)return s.substr(place,longest); } } if(longest==0)return ""; else return s.substr(place,longest); } int main() { ios::sync_with_stdio(0); cin.tie(); cin>>n; cin>>s; cin>>t; cout<<Longest_common_substr()<<endl; return 0; } can you please suggest any modifications? |
| help me!!! WA 32 | zzyzzy12 | 1912. Titan Ruins: Passing through Walls | 28 Jul 2013 20:20 | 1 |
|
| WA#1 | Stolyarov Artyom | 1228. Array | 28 Jul 2013 19:11 | 1 |
WA#1 Stolyarov Artyom 28 Jul 2013 19:11 I have WA 1 but on my computer all ok. Is first test not like in statement? |
| AC Python 3.3 | lomobit | 1319. Hotel | 28 Jul 2013 00:16 | 1 |
num = int(input()) arr = [] for i in range(num): arr.append([]) for j in range(num): arr[i].append([])
check = 1 for i in range(num-1,-1,-1): x = 0 y = i while y != num: arr[x][y] = check check += 1 y += 1 x += 1 for i in range(1,num,1): x = i y = 0 while x != num: arr[x][y] = check check += 1 y += 1 x += 1 string = '' for i in range(num): for j in range(num): string += (str(arr[i][j]) + ' ') print(string) string = '' |