| Show all threads Hide all threads Show all messages Hide all messages |
| The main task is 10^250 | Михаил | 1180. Stone Game | 26 Aug 2019 16:18 | 1 |
|
| Can anyone translate the statement? | PrankMaN | 1053. Pinocchio | 25 Aug 2019 00:22 | 2 |
My Endlish is not that good, could anyone translate it into Russian, pls? Так с гугл-переводчиком понятно |
| WA3 | dickbooster | 1881. Long problem statement | 24 Aug 2019 22:56 | 11 |
WA3 dickbooster 22 Oct 2011 15:17 inputs of the third test? Re: WA3 dickbooster 22 Oct 2011 15:38 try this: 3 5 9 aa aa aaa aa aa aa aaa aa aaa i have passed the test you give, but i still got WA3....help //i found a silly mistake and now passed test3... but still WA for the next Edited by author 26.03.2012 11:13 Edited by author 26.03.2012 11:14 //i found a mistake again.....and then i got AC Edited by author 26.03.2012 11:20 Re: WA3 ramon93i7 16 Apr 2012 12:30 What was your second mistake? answer: 3 для первого теста для второго 2 Edited by author 21.10.2012 12:43 You can try this test case: 3 2 6 aa a a aa aa a Correct answer: 2 Isn't corect answer 6? aa a a (not a a = 3 symbols) aa aa a Re: WA3 RandyWaterhouse 15 Jun 2019 10:41 Deleted Edited by author 24.08.2019 23:00 Re: WA3 Chuk.Charles 25 Sep 2015 16:24 Try this test: 1 5 2 to be answer: 1 Edited by author 25.09.2015 16:26 |
| Some helpful test !!!!!!!!!! | Noname | 1406. Next Number | 24 Aug 2019 12:19 | 10 |
Try this test inp 901000 ans 910000 And this input: 091 output: 109 and 092 119 0920 1019 Edited by author 22.12.2006 19:08 My program "give AC" on your tests, but give WA#19. Somebody, give me more tests please. Try this 39910000 -> 40000099 99 -> -1 00 -> -1 1 -> -1 011 -> 020 Good Luck!) Edited by author 06.06.2009 23:08 Edited by author 06.06.2009 23:08 Try this and look for the time 010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Should give 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Edited by author 18.07.2007 05:06 My program give AC on your tests, but give WA#4. Please give me tests #4 or more tests. Thank. Test 59 look like: 1000000000000000000000000 Answer: -1 |
| WA5, any tests? | motoras | 1050. Preparing an Article | 23 Aug 2019 04:47 | 2 |
I run out of ideas, trying to pass test #5. Does anyone can tell me how this test looks like? Thank you, There seem to be some non-ASCII characters in the test cases. If the input is loaded byte by byte, then the result should be output byte by byte as well. I used Rust and handled the bytes as chars, which were stored as 4-byte unicode, but mistakenly output the result by chars instead of bytes. |
| Tests | Vlasov_Sergey | 1955. Boss, I Can See You! | 22 Aug 2019 12:38 | 1 |
Tests Vlasov_Sergey 22 Aug 2019 12:38 Good test: 16 0 0 3 0 3 1 4 1 4 0 7 0 7 2 6 2 6 1 5 1 5 2 2 2 2 1 1 1 1 2 0 2 My AC program prints 7.000000 Another test: 13 1 1 3 1 3 3 5 3 5 5 3 5 4 4 2 4 2 2 1 3 0 3 0 0 1 0 Answer: 7.071068 If your program has O(n^2*log(n)) time complexity or faster try the following tests: 10 4 10 0 0 5 0 5 3 13 3 10 8 5 8 7 5 2 1 5 10 Answer: 12.276044 24 13 10 11 17 7 20 1 20 1 11 13 0 23 7 23 19 14 22 20 18 18 11 13 6 5 15 13 4 20 8 13 3 8 7 3 14 3 17 6 17 13 8 17 17 11 20 14 17 Answer: 20.645581 29 17 13 11 12 10 10 12 6 22 6 23 13 12 18 0 14 12 1 14 2 7 12 12 15 20 13 18 10 12 10 19 8 21 13 12 16 5 13 12 3 2 14 12 17 22 13 21 7 12 7 11 10 19 13 13 14 10 13 Answer: 18.193976 Edited by author 25.08.2019 17:28 |
| Is it really needed? | maslowmw | 1249. Ancient Necropolis | 21 Aug 2019 18:33 | 1 |
Is it really needed to set 4mb memory limit? I really must to remember pascal for this task, because the same solution have TL (not a Scanner) or ML on java. May be it's possible to up memory limit to 8mb? |
| Why i am getting WA at test 1 | Tazma | 1209. 1, 10, 100, 1000... | 21 Aug 2019 01:36 | 1 |
#include<bits/stdc++.h> using namespace std; const long long size=65535; long long ara[size]; long long b[size]; Find() { long long i, sum=1, j; for(i=0, j=1; i<=size; i++, j++) { sum=sum+i; ara[j]=sum; } } int main() { long long i, n, a, r, j; Find(); cin>>a; for(i=1; i<=a; i++) { cin>>b[i]; } for(i=1; i<=a; i++) { r=0; for(j=1; j<=size; j++) { if(b[i]==ara[j]) { r=1; break; } } if(r==1) { printf("1 "); } else { printf("0 "); } } printf("\n"); return 0; } |
| wrong ans in case #3 | Mushfiq Talha | 1209. 1, 10, 100, 1000... | 20 Aug 2019 21:12 | 6 |
Code removed Edited by author 20.08.2019 21:12 8*n-7 <--- integer overflow Integer overflow. But why? And How? Edited by author 17.08.2019 19:12 [code deleted] This code gets wrong answer in case #3. Edited by author 18.08.2019 20:49 Edited by author 18.08.2019 20:49 Edited by moderator 17.11.2019 18:48 On timus 'long int' is equal to 'int', to use 64-bit integers you need to write 'long long'. Also, there is a precision error in your 'per_sq' function. This line: return ((x-floor(x))?0:1); must be written as return (abs(x-floor(x)) > 1e-8 ? 0 : 1); Thanks. I didn't know about the bit size of long in Timus. And what you said about the function. I had problem in the argument. I used double instead of int then it got accepted. |
| Is it possible to solve the problem with Python? | Edmonton | 1146. Maximum Sum | 20 Aug 2019 00:25 | 1 |
I can't understand how to solve the problem with Python and meet time limitations. I implemented solution with creating 3-D list of subsumes[column][row_start][row_offset] using accumulate from itertools and list comprehension. After that I used Kadane's algorithm. I expect that it works with O(N^3). But it isn't enough... Are there some tricks in the problem for Python? Except for stdin of course. |
| AC on python 3.6 | ivan pasechnik`~ | 2025. Line Fighting | 19 Aug 2019 22:05 | 2 |
t = int(input()) for i in range(t): m = [] kv = 0 n,k = map(int,input().split()) ok =k for i in range (k): if i == 0: m.append(n//ok) kv += m[i] n-=n//ok ok-=1 else: if i == k-1: m.append(n) else: m.append(n//ok) kv+=m[i] n-=n//ok ok-=1 otr,ans = 0,0 l,l1 = 0,0 m.sort() m.reverse() ss = sum(m) for i in range(k-1): l += m[i] l1 = m[i] ans += (ss-l)*l1 print(ans) t = int(input()) for i in range(t): n, k = [int(i) for i in input().split()] m = n // k q = n % k s = (m * (n - m) * (k - q) + (m + 1) * (n - m - 1) * q) // 2 print(s) #распределяем максимально равномерно и "деремся" команда из m против всех оставшихся + команда из m + 1 против всех оставшихся и, поскольку учли каждый бой по два раза (для обоих участников), делим пополам =) |
| AC, no problem ;-) | Ilya Mitin (2) | 1111. Squares | 18 Aug 2019 11:48 | 3 |
my code passed yours test but shows WA1 #include <bits/stdc++.h> using namespace std; int main() { int N,a[55],b[55],i,c[55],j,d[55],t,e[55],m,n; unsigned long long x,y,p,arr[55]; cin>>N; for(i=0;i<N;i++){ cin>>a[i]>>b[i]>>c[i]>>d[i]; e[i]=i; } cin>>m>>n; for(i=0;i<N;i++){ x=max(a[i]-m,m-c[i]); if(x<0){ x=0; } y=max(b[i]-n,n-d[i]); if(y<0){ y=0; } arr[i]=x*x+y*y; } for(i=0;i<N;i++){ for(j=i+1;j<N;j++){ if(arr[i]>a[j]){ p=arr[i]; arr[i]=arr[j]; arr[j]=p; t=e[i]; e[i]=e[j]; e[j]=t; } } } for(i=0;i<N;i++){ cout<<e[i]+1<<" "; } return 0; } |
| WA on #test 1 | abid1729 | 1111. Squares | 18 Aug 2019 01:04 | 1 |
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <bits/stdc++.h> using namespace std; int main() { int N,a[55],b[55],i,c[55],j,d[55],e[55],m,n; unsigned long long x,y,arr[55]; cin>>N; for(i=0;i<N;i++){ cin>>a[i]>>b[i]>>c[i]>>d[i]; e[i]=i; } cin>>m>>n; for(i=0;i<N;i++){ x=max(a[i]-m,m-c[i]); if(x<0){ x=0; } y=max(b[i]-n,n-d[i]); if(y<0){ y=0; } arr[i]=x*x+y*y; } for(i=0;i<N;i++){ for(j=i+1;j<N;j++){ if(arr[i]>a[j]){ arr[i]=arr[j]; e[i]=e[j]; } } } for(i=0;i<N;i++){ cout<<e[i]+1<<endl; } return 0; } |
| AC Visual C | Ntstharen | 2025. Line Fighting | 17 Aug 2019 21:01 | 1 |
#include<stdio.h> int main(){ int N, n, k, i, a, b, x, res; scanf("%d\n", &N); for(i=0; i<N; i++){ scanf("%d %d", &n, &k); if(n%k==0){ x=n/k; res=n*(n-x)/2; printf("%d\n", res); } else { x=n/k; b=n-k*x; a=k-b; res=((n-x)*a*x+(n-x-1)*(x+1)*b)/2; printf("%d\n", res); } } return 0; } |
| Why this solution get WA1? | Buzmakov Dmitriy | 2031. Overturned Numbers | 17 Aug 2019 00:31 | 2 |
#include <bits/stdc++.h> string c[4] = {"88", "68", "06", "16"}; int main() { cin >> n; if (n > 4) { cout << "Glupenky Pierre" << endl; return 0; } for (int i = n - 1; i >= 0; i--) cout << c[i] << " "; } "68 88" is good, isn't? There are many more combinations. You also forgot 9 |
| Python 3, wrong on test 2 | Krasheninnikova | 1263. Elections | 16 Aug 2019 21:55 | 2 |
n, m = map(int,input().split(' ')) voices = [] p = ['p'] h = 0 for i in range(m): voices.append(int(input()))
for i in range(n): p.append(0) for i in voices: for c in range(n+1): if i == c: p[c] += 1
for i in range(1, len(p)): h = p[i] / m * 100 p[i] = str(round(h, 2)) if len(p[i]) == 4: p[i] += '0' print(p[i] + '%') Help. what's wrong n, m = map(int,input().split(' ')) voices = [] p = ['p'] h = 0 for i in range(m): voices.append(int(input())) for i in range(n): p.append(0) for i in voices: for c in range(n+1): if i == c: p[c] += 1 for i in range(1, len(p)): h = p[i] / m * 100 print(f'{h:.2f}%') This is your code that prints the right answer. Python 3 uses BANKER'S rounding while the problem asks you to the MATHEMATICAL rounding. I used 'f-string' to perform MATHEMATICAL rounding. Anyways, the solution is not fast enough - try to come up with some speed-ups. |
| To administrator | Loky | 1075. Thread in a Space | 16 Aug 2019 13:54 | 3 |
You should add some test. So my AC programm give wrong answer on this test 20 0 0 -20 0 0 0 0 0 10 --- Write answer is 51.42; and my answer is 45.11 Please do something!!! Sorry! I understood my mistake. 45.11 is the correct answer |
| what is there in test 6 ?? Can anyone please provide some test cases | anupam ghosh | 1123. Salary | 16 Aug 2019 09:01 | 1 |
what is there in test 6 ?? Can anyone please provide some test cases. I have tried all test cases provided in earlier discussions, all of these pass. Still getting WA6. Want to jump off some cliff now, if that might solve this WA6. |
| This is pretty simple task | Skeef79 | 2112. Battle log | 15 Aug 2019 23:45 | 1 |
just use DSU to check teams, and then build answer |
| Why WA 2? | AndrewSt(ArcSTU) | 1123. Salary | 15 Aug 2019 20:13 | 19 |
My programm write this Answers: Test 1 1999 2002 Test 2 1250025 1251521 Test 3 100003 101101 Test 4 1000003 1001001 Test 4 11111 11111 Give me please some tests? Edited by author 04.12.2006 03:35 Ans for your test 1 is 2002 :) I'm Sorry is my bags. My programm write 2002 All other tests right I'll give you some test.. just 10 min I think that it will help you:) 18 22 36313404080 36313531363 3373687313428241827948801150507677526 3373687313428241828281428243137863733 669262074855963079771197586206281259112 669262074855963079787970369558470262966 242167700017836474388100 242167700018810007761242 16252383 16266261 469342775745586144105609869 469342775745595547577243964 37461293193018561603953493340 37461293193018681039139216473 9194184285169534216966507128749 9194184285169535359615824814919 21 22 1330454685235862 1330454774540331 78336742687917227491028 78336742688088624763387 47923802054017335212073765802860114 47923802054017335353371045020832974 505752 506605 940 949 428540910018912794058956977 428540910018929810019045824 9770330728908946347636591906356869449214 9770330728908946347777436498098270330779 7068416097840258049887921681085 7068416097840259520487906148607 517805724457730620 517805725527508715 506833497 506848605 5820 5885 484243646784563247619038458645194136 484243646784563248842365487646342484 91413688117232096060 91413688122188631419 771886477139587251334596 771886477140041774688177 8304292305552149553379655920949280409378 8304292305552149553443559412555032924038 9628134090110628 9628134114318269 2445193927845273449357413443 2445193927845335487293915442 519 525 6885428526826048829 6885428527258245886 72924386042452563577194755578 72924386042452625424068342927 36313404080 Why Answer 36313531363? True Answer 36313431363. I think new tests should be added :)))) My AC prog also returns 123012 124421 36408 36563 .... WHY???? IF TRUE 123012 123321 36408 36463 I testing tests.My programm write : 1999 2002 1250025 1250521 100003 101101 1000003 1001001 11111 11111 18 22 36313404080 36313431363 3373687313428241827948801150507677526 3373687313428241828281428243137863733 669262074855963079771197586206281259112 669262074855963079777970369558470262966 242167700017836474388100 242167700018810007761242 16252383 16255261 469342775745586144105609869 469342775745595547577243964 37461293193018561603953493340 37461293193018581039139216473 9194184285169534216966507128749 9194184285169534359615824814919 21 22 1330454685235862 1330454774540331 78336742687917227491028 78336742687978624763387 47923802054017335212073765802860114 47923802054017335253371045020832974 505752 506605 940 949 428540910018912794058956977 428540910018919810019045824 9770330728908946347636591906356869449214 9770330728908946347667436498098270330779 7068416097840258049887921681085 7068416097840258520487906148607 517805724457730620 517805725527508715 506833497 506838605 5820 5885 484243646784563247619038458645194136 484243646784563247742365487646342484 91413688117232096060 91413688122188631419 771886477139587251334596 771886477139931774688177 8304292305552149553379655920949280409378 8304292305552149553443559412555032924038 9628134090110628 9628134114318269 2445193927845273449357413443 2445193927845335487293915442 519 525 6885428526826048829 6885428527258245886 72924386042452563577194755578 72924386042452625424068342927 Some of your answers <KIRILL(ArcSTU)> are wrong!!! 16252383, 9770330728908946347636591906356869449214 and some other It is amazingly if you got AC WA 2 Ilya Mitin (2) 22 Jun 2008 18:15 If you get WA2 test: 123 right aswer 131 but not 222 Thanks, Ilya Mitin, you helped me))) KIRILL(ArcSTU) : did you get an AC? because of below result is correct 16252383 16255261 TEST2 why not be 1250521? I think testing program is incorrect if AC programs give wrong answers :( My program gives correct answers to all test and still WA6 :(( Re: Why WA 2? Phan Hoài Nam - Đại học Ngoại ngữ Tin Học TP.HCM 13 Feb 2009 10:28 your test 2 is wrong ! true answer : 1250521 In test 1250025 answer must be 1250521. |