Show all threads Hide all threads Show all messages Hide all messages |
TEST | buyolitsez | 1156. Two Rounds | 3 Sep 2019 09:22 | 1 |
TEST buyolitsez 3 Sep 2019 09:22 3 4 1 2 1 3 4 5 4 6 ans: 1 5 6 2 3 4 Edited by author 03.09.2019 09:23 |
no impossible case | sonamon | 1106. Two Teams | 28 Aug 2019 23:42 | 2 |
There cannot be any impossible case as is suggested by the very first line of the problem statement yes , no impossible cases are present. |
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. |