| Show all threads Hide all threads Show all messages Hide all messages |
| hint for WA 2 | alp | 1325. Dirt | 4 Nov 2013 22:00 | 1 |
point is equal. e.g. 3 3 1 1 1 1 111 111 111 answer:1 0 |
| why wa text#10? Help,thanks | wjt | 1101. Robot in the Field | 4 Nov 2013 21:25 | 4 |
|
| Test #11 Data | 1212187 | 1416. Confidential | 4 Nov 2013 16:10 | 3 |
Can someone give me data of test #11? I have test all data in discussion section and got right answer but my program just stuck in test #11.... 4 6 1 2 1 1 3 5 3 4 1 4 2 3 4 1 8 2 3 0 is this test #11? |
| To admins | Silent | 1991. The battle near the swamp | 4 Nov 2013 14:48 | 5 |
я знаю что она решается, у меня AC. я говорю про то, что на Go 1.1 простой способ считывания входных данных работает некорректно, и прошу разобраться - это бага fmt.Scanf или что-то с форматом test #3. Try to read integers in the first string using format "%v %v\n" instead of "%v %v". It's not evident, but... it works! If solution reads the first string using fmt.Scanf("%v %v\n",&n,&k) then it gets AC. Thanks, Sandro (USU)! |
| Problem 1052 "Rabbit Hunt" has been rejudged (+) | Sandro (USU) | 1052. Rabbit Hunt | 4 Nov 2013 03:22 | 9 |
Some new tests were added. 234 authors lost AC. Maybe we'll add more tests soon. Some more tests were added. 200 authors lost AC. Edited by author 14.12.2011 23:32 I think there is a problem here. My pascal solution has failed and WA 14 now, and it was accepted before. And my C++ solution is still AC and I have recently retyped the same Pascal solution that failed, into C++, and both codes are exactly the same, except one is C++ and the other one is Pascal. What could be the problem? As I see from the problem statement, this test is incorrect =) You are right, this test is incorrect. :) And there is no such test in the test set. But FreezingCool's Pascal and C++ solutions give different answers on this test. The answer to this test is 2, which my program correctly gives. I received WA12. Unless the geometric formula has changed in 5 years, then the new tests could be with boundary conditions. Thank you for taking the time to answer. I find out, that test 14 requires high accuracy of comparsion of two double(float) values. I used e=0.000000001 and i got AC. Do calculations in integer numbers - and won't have troubles with precision. |
| Каким должен быть факториал, если данные не валидны? | ranetka_st | 1083. Factorials!!! | 2 Nov 2013 20:33 | 3 |
Каким должен быть ответ ,если значения n или k не валидны? Например, если не указать k. Или ввести значения, не попадающие в диапазон? RTFM: http://acm.timus.ru/help.aspx?topic=judge "Input data in the test cases always satisfy the constraints described in the problem statement. You don’t need to verify these constraints in your solutions." |
| Can there be a negative number? | keivan | 1029. Ministry | 2 Nov 2013 18:05 | 5 |
I don't know why I get WA on test 4! Can there be a negative number? This is my code: #include<iostream> #include<cmath> using namespace std; long long dyn[110][510] , a[110][510] , big, sum[110][510] , p[110][510][2] , o , m, n; int main(){ cin>>m>>n; for(int i=0;i<m;i++) for(int j=0;j<n;j++) cin>>a[i][j]; for(int i=0;i<m;i++) { sum[i][0]=a[i][0]; dyn[i][0]=100000000000000000; for(int j=1;j<n;j++) { sum[i][j]=sum[i][j-1]+a[i][j]; dyn[i][j]=100000000000000000; } } if((m==1)&&(n==1)) { cout<<1<<endl; return 0; } dyn[m-1][0]=a[m-1][0]; for(int i=1;i<n;i++) { dyn[m-1][i]=a[m-1][i]; } for(int i=m-2;i>=0;i--) { for(int j=n-1;j>=0;j--) { for(int k=0;k<n;k++) { if(j>k) { if(dyn[i+1][k]+sum[i][j]-sum[i][k-1]<dyn[i][j]) { dyn[i][j]=dyn[i+1][k]+sum[i][j]-sum[i][k-1]; p[i][j][0]=j; p[i][j][1]=k; } } else { if(dyn[i+1][k]+sum[i][k]-sum[i][j-1]<dyn[i][j]) { dyn[i][j]=dyn[i+1][k]+sum[i][k]-sum[i][j-1]; p[i][j][0]=j; p[i][j][1]=k; } } } } } big=dyn[0][0]; o=0; for(int i=1;i<n;i++) { if(dyn[0][i]<big) { big=dyn[0][i]; o=i; } } cout<<o+1; for(int i=1;i<m-1;i++) { if(p[i][o][0]<=p[i][o][1]) { for(int j=p[i][o][0];j<=p[i][o][1];j++) cout<<" "<<j+1; } else { for(int j=p[i][o][0];j>=p[i][o][1];j--) cout<<" "<<j+1; } o=p[i][o][1]; } cout<<" "<<o+1<<endl; return 0; } No there can't be. My ac code. [code deleted] Edited by moderator 19.11.2019 23:27 Seems like your AC code fails at test: 5 5 10 1 10 10 10 1 1 10 10 10 1 10 1 1 1 1 1 1 10 1 10 10 10 10 1 I'm sorry. I should be more careful while reading the problem statement. The correct answer here is 2 2 1 1 1 1. Not 2 2 1 1 1 2 3 3 4 5 5 5. |
| TLE14 Пример теста? | Biplan | 1989. Subpalindromes | 1 Nov 2013 05:47 | 2 |
Хотелось бы пример теста #pragma comment(linker, "/STACK:16777216") #include <iostream> using namespace std; char str[100001]; bool isPalind(int start, int finish) { int fin = finish-1;//(int)finish-48 - 1; bool answer = true; for (int k=start-1; k<fin; k++) { if (str[k] != str[fin]) { return false; } fin--; } return true; } int main() { char c1, c2; int pos=0, m, fin; cin >> str; scanf("%d\n", &m); for (int i=0; i<m; i++) { scanf("%*[^? ]%c%d ", &c1, &pos); if (c1 == ' ') { scanf("%c", &c2); str[pos-1] = c2; } if (c1 == '?') { scanf("%d", &fin); if(isPalind(pos, fin)) { printf("Yes\n"); } else { printf("No\n"); } } } return 0; } Edited by author 01.11.2013 00:11 Асимптотика же O(nm) у вас. Пример теста: ааа..ааа (10^5 штук), и 10^5 запросов: ? 1 100000 |
| Test 14 | Sergey Naumenko | 1378. Artificial Intelligence | 1 Nov 2013 02:37 | 1 |
Test 14 Sergey Naumenko 1 Nov 2013 02:37 |
| How to solve this problem, plz (@_@) | [York] 3xian | 1757. Gold Bars | 1 Nov 2013 00:56 | 4 |
Binary Search can solve it. :) |
| Dynamic programming? | Alexey Dergunov [Samara SAU] | 1287. Mars Canals | 31 Oct 2013 23:19 | 2 |
I don't see any dynamic programming in this problem... |
| nothing | Ouch | 1319. Hotel | 31 Oct 2013 23:15 | 1 |
Edited by author 02.11.2013 13:47 |
| Unexpecded place to find an error | Vladislav | 1800. Murphy's Law | 31 Oct 2013 16:40 | 1 |
I was trying many times to get past first test and fixed a few mistakes in the algorithm to no avail. And the reason to fail was that the output was in brackets. |
| Ошибка WA #1 | Adam | 1837. Isenbaev's Number | 31 Oct 2013 16:35 | 1 |
У меня все работает с разными данными. Мне кажется я не правильно поток ввода установил. Здесь нужно использовать cin? |
| What is 0.001 solution? | OZone | 1023. Buttons | 31 Oct 2013 11:40 | 2 |
How it is posible to get AC in 0.001 s? What time do such ACs take to get L for K= 99999989? Could anyone give a hint to make it faster than O(sqrt(K))? I think one can get AC in 0.001 by giving solutions that have precalculated values for K = 3...10^8. |
| WA #2 | Felagund | 1948. The Robot on the Line | 31 Oct 2013 02:11 | 1 |
WA #2 Felagund 31 Oct 2013 02:11 Could you please give me some tests? Edited by author 31.10.2013 02:11 |
| Test 85 | EarthShaker | 1673. Admission to Exam | 30 Oct 2013 18:31 | 4 |
Test 85 EarthShaker 5 Apr 2009 13:35 How to pass this test? I got WA for several times. I had WA @ #85 for many times, too. Try this testcase: k = 144 The correct answer is n = 185, rather than n = 169. The same factor, 13, could NOT be used twice in different layers of search. Good luck. if k = 144 my program gives n = 185, but I got WA 85, Why ? if k = 144 my program gives n = 185, but I got WA 85, Why ? |
| WA42 | xiaoli | 1983. Nectar Gathering | 30 Oct 2013 14:23 | 1 |
WA42 xiaoli 30 Oct 2013 14:23 Why do I get wrong answer in the 42th case? |
| Numbers | Adhambek | 1352. Mersenne Primes | 30 Oct 2013 12:57 | 1 |
this problem is easy Edited by author 30.10.2013 13:06 |
| WA test 14! Help please | Den | 1021. Sacrament of the Sum | 30 Oct 2013 12:37 | 2 |
#include <stdio.h> int binsup(int key,int *mas,int n); int binsdown(int key,int *mas,int n); int main() { int mas[50100],mas1[50100],i,n,n1,f; scanf("%d",&n); for (i=0; i<n; i++) scanf("%d",&mas[i]); scanf("%d",&n1); for (i=0; i<n1; i++) scanf("%d",&mas1[i]); f=0; if (n>n1) for (i=0; i<n1 && f==0; i++) f=binsup(10000-mas1[i],mas,n); else for (i=0; i<n && f==0; i++) f=binsdown(10000-mas[i],mas1,n1); if (f==0) printf("NO"); else printf("YES"); return 0; } int binsup(int key,int *mas,int n) { int lg,pg,m; lg=0; pg=n; while (lg<=pg) { m=(lg+pg)/2; if (key>mas[m]) lg=m+1; else if (key<mas[m]) pg=m-1; else return 1; } return 0; } int binsdown(int key,int *mas,int n) { int lg,pg,m; lg=0; pg=n; while (lg<=pg) { m=(lg+pg)/2; if (key<mas[m]) lg=m+1; else if (key>mas[m]) pg=m-1; else return 1; } return 0; } //------------------------- what i do wrong? Did u find test #14? Give me this test pls... |