Show all threads Hide all threads Show all messages Hide all messages |
Be careful. Test 2 and Test 3 | Adhambek | 1019. Line Painting | 11 Dec 2014 08:00 | 1 |
input ai bi C it means that -> line [ai, bi) is colored by C. |
WA on Test Case 11 | ultimatemaster | 1060. Flip Game | 10 Dec 2014 02:09 | 2 |
Can anyone please provide test case #11? I am getting WA on that. try this one: wwww wwww bwwb bbbb answer: 2 |
wrong answer 3 | wuqingxin | 1119. Metro | 10 Dec 2014 00:37 | 2 |
Could I get the data of the test 3 something like this 1000 1000 0 |
hint | Briana Banks | 1716. Alternative Solution | 9 Dec 2014 20:45 | 1 |
hint Briana Banks 9 Dec 2014 20:45 i've been thinking at this problem for 2 weeks. can somebody give me a hint ? |
Test case 1 | Ankit Tripathi | 1203. Scientific Conference | 9 Dec 2014 14:39 | 1 |
My code is : #include<iostream> #include<stdio.h> #include<algorithm> using namespace std; struct slot{ int start; int stop; }; bool order1(const slot &lhs,const slot & rhs) { return lhs.stop<rhs.stop; } bool order2(const slot &lhs,const slot & rhs) { return lhs.start<rhs.start; } int main() { int timemax,timemin; long n,i,j,temp,dp[30002],max; slot a[100001]; dp[0]=0; scanf("%ld",&n); for(i=0;i<n;i++) scanf("%d%d",&a[i].start,&a[i].stop); sort(a,a+n,order2); timemin=a[0].start; stable_sort(a,a+n,order1); timemax=a[n-1].stop; for(i=0;i<=timemin;i++) dp[i]=0; for(i=timemin+1;i<=timemax;i++) { max=dp[i-1]; while(a[j].stop<i && j<n) j++; while(a[j].stop==i) { if(a[j].start-1>=0) temp=1+dp[a[j].start-1]; else temp=1; if(temp>max) max=temp; j++; if(j==n) break; } dp[i]=max; }
printf("%ld\n",dp[timemax]); } I dont know why I am getting wrong answer on test case 1 and runtime error on Ideone.com |
Ошибка в условии? Лучший путь для Теста 1 = 1->4->1 | zzox3 | 1004. Sightseeing Trip | 9 Dec 2014 01:06 | 6 |
Условия: > найти для экскурсии кратчайший маршрут, начинающийся и заканчивающийся в одном и том же месте. > Ваша программа должна найти маршрут наименьшей длины > и M двусторонних дорог, В ТЗ не сказано что нужно обойти максимум перекрестков, не сказано что нельзя ехать назад. А значит путь: 1 -> 4 -> 1 подходит. В условии сказано "Все числа x1, …, xk должны быть различны.". я пол дня пытаюсь сдать задачу. в НЕТБИНС работают все примеры у вас постоянно РАНТАЙМ ЕРОР. начинаю сомневаться в корректности вашей проверки. и второе - задача некорректна. пишите что маршрут должен начинаться и кончаться в одном месте а в след. абзаце пишите что все Хк должны быть различны. вы уж определитесь. А вы не пробовали прочитать: 1) условие 2) формат вывода 3) пример ??? Из первого ясно, что маршрут должен состоять как минимум из трех РАЗЛИЧНЫХ вершин, последние два поясняют. > В условии сказано "Все числа x1, …, xk должны быть различны.". Ну дак в "1 4" нет повторения перекрестков. Про повторение дорог ничего не сказано. There is state that k > 2. In your example k == 2. |
No subject | Nodirbek Islomov (TUIT) | 1274. Fractional Arithmetic | 8 Dec 2014 22:43 | 1 |
No subject Nodirbek Islomov (TUIT) 8 Dec 2014 22:43 |
number of test cases ? | m313 | | 8 Dec 2014 21:25 | 1 |
hi what is the total number of test cases for each problem ? |
Stuck at WA#3 | begi | 1098. Questions | 8 Dec 2014 20:13 | 2 |
Can someone provide more tests? I am using scanner.nextLine() to read line.charAt(pos) == '?' to compare in java and also Josephus allgorithm: jos[1] = 1; for (int i = 2; i < max_n; i++) { jos[i] = (jos[i - 1] + 1998) % i + 1; } My code is so small that I don't even know where is the bug Ok, the thing is I misunderstood the problem. You read ALL the input ignoring new lines, and then do the 'process'. I was reading line by line and doing 'process' for each line. Hope it will help the others. |
what is test N14? | Rati | 1276. Train | 7 Dec 2014 21:52 | 1 |
|
13th test | Popovici Mircea | 2011. Long Statement | 7 Dec 2014 15:16 | 8 |
I'm wondering if anyone knows the 13th test... i think it's some kind of special case. These are 3 test i suppose cause, it doesn't specificate that we have multiple test cases in one input. Am I right? No, you are not right. There is just one test case in every input, multiple tests were written just for you. Test: 7 1 1 1 1 1 1 2 YES Test: 4 1 1 2 2 Ans: Yes Edited by author 11.11.2013 15:19 4 1 1 2 2 Yes cause: 1122 1212 1221 2121 2211 2112 Edited by author 16.12.2013 23:57 i thinks these tests are not suitable for 13th s. 'casue i passed these ,but get 13th wrong. Two-Eight-Nine.Thanks...!!! |
Wrong Answer C ! Help please! | Pedro | 1001. Reverse Root | 6 Dec 2014 21:43 | 2 |
#include <stdio.h> #include <math.h> int main(){ double num1,num2,num3,num4; scanf("%lf %lf %lf %lf",&num1,&num2,&num3,&num4); printf("%.4lf\n%.4lf\n%.4lf\n%.4lf",sqrt(num4),sqrt(num3),sqrt(num2),sqrt(num1)); return 0; } why is it wrong? I think it's not necessarily exactly 4 numbers. Judging from my result, I think there are many numbers in the test case. So you need a list or something to store the integers first then print the sqrt in reversed order. (also, the integer is very big, so int type might not work) |
wa3 | Ade [FDU] | 1317. Hail | 6 Dec 2014 16:07 | 1 |
wa3 Ade [FDU] 6 Dec 2014 16:07 check the cases when you shoot hail over fence's westmost edge. |
acos(min(1, angle)) | Ade [FDU] | 1331. Vladislava | 6 Dec 2014 13:46 | 1 |
|
good test for WA#4 | hoan | 1247. Check a Sequence | 5 Dec 2014 22:33 | 2 |
input: 6 10 2 2 2 0 10 1 output: NO |
for wa5 | Ade [FDU] | 1130. Nikifor's Walk | 5 Dec 2014 21:05 | 1 |
9 9 0 9 9 0 5 4 4 5 0 9 9 0 -5 4 -4 5 9 0 |
Why i got WA?Can anybody tell me? Thanks! | TaoZhang | 1131. Copying | 5 Dec 2014 20:33 | 3 |
Here is my program var n,k,i,time:longint; begin readln(n,k); if k=1 then writeln(n-1) else begin i:=0;time:=0;n:=n-1; while n>0 do begin if i<k then i:=i+1; n:=n-i;time:=time+1; end; writeln(time); end; end. > Here is my program > var > n,k,i,time:longint; > > begin > readln(n,k); > if k=1 then writeln(n-1) > else > begin > i:=0;time:=0;n:=n-1; > while n>0 do > begin >(***) if i<k then i:=i+1; > n:=n-i;time:=time+1; > end; > writeln(time); > end; > end. Have a look at the iteraton..as I understand i is the number of used cables... But on each iteration you should not add only one cable (***) but as much as possible, I mean if you have used i cables by now, next time you could use 2*i cables, if you have so much, NOT i:=i+1! Sample input: 12 6 Sample output: 4 1 sec. 1-2 2 sec. 1-3, 2-4 3 sec. 1-5,2-6,3-7,4-8 4 sec. 1-9,2-10,3-11,4-12 Bye! and Have a luck :) |
Easy | Nodir NAZAROV Komilijonovich [TUIT-Karshi] | 2031. Overturned Numbers | 5 Dec 2014 19:28 | 1 |
Easy Nodir NAZAROV Komilijonovich [TUIT-Karshi] 5 Dec 2014 19:28 only 4 cases Edited by author 05.12.2014 19:38 Edited by author 05.12.2014 19:39 |
Mistake | Nodir NAZAROV Komilijonovich [TUIT-Karshi] | 2035. Another Dress Rehearsal | 5 Dec 2014 18:55 | 1 |
Mistake Nodir NAZAROV Komilijonovich [TUIT-Karshi] 5 Dec 2014 18:55 found my mistake. sorry for this post. Edited by author 05.12.2014 22:16 Edited by author 05.12.2014 22:16 |
сколько всего тестов в этой задаче? | СУНЦ УрФУ petrov nikita | 1415. Mobile Life | 5 Dec 2014 13:37 | 2 |
You will not solve this problem ((( Edited by author 05.12.2014 13:37 Edited by author 05.12.2014 13:37 |