| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| Numbers | Adhambek | 1352. Простые числа Мерсенна | 30 окт 2013 12:57 | 1 |
this problem is easy Edited by author 30.10.2013 13:06 |
| WA test 14! Help please | Den | 1021. Таинство суммы | 30 окт 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... |
| byte - > integer | Sasori | 1313. К вопросу о спорте | 30 окт 2013 06:10 | 1 |
i don't understand / numbers which are in this problem 1 .. 100, and i used byte = wrong #4 / then i replace byte -> integer and obtained accepted / why |
| why is my python code TLE? anybody give me some advice | tryPython | 1048. Сверхдлинные суммы | 29 окт 2013 19:33 | 3 |
my code : n = input() num = [0 for i in xrange(n) ] for i in xrange(n): x, y = map(int, raw_input().split()) num[i] = x+y cnt = 0 for i in xrange(n-1, -1, -1): num[i] += cnt cnt = 0 if num[i] > 9 and i > 0: num[i] -= 10; cnt = 1 print ''.join( map(str, num) ) As explained in another post, for the following set of data: 4 9 0 5 4 5 4 5 5 the program has to return: 0000 Your code is wrong since it returns: 10000 The answer to 4 9 0 5 4 5 4 5 5 is 10000. |
| Stuck at WA1. Can you give me some hints? | mikroz | 1007. Кодовые слова | 29 окт 2013 02:33 | 1 |
Tried several times with different variations of input processing. Can you please give me some hints? Here is my code: http://pastebin.com/beh0mtGh |
| Падает на 6-м тесте, кто-нибудь знает, что там? | Vlad Isayko [SSAU_6107] | 1133. Последовательность Фибоначчи | 29 окт 2013 01:29 | 1 |
|
| Wrong Tests | MaxOverflow | 1984. Охранник компота | 29 окт 2013 00:10 | 6 |
For n = 7 We can solve it only with circle of radius 3. However, we send the solution, which prints more than 3. Link to the picture - https://www.dropbox.com/s/s2hqzmyo47la0zd/Clar.pngPlease, correct the tests, or provide the reason this solution is wrong. Re: Wrong Tests Vedernikoff 'Goryinyich' Sergey (HSE: АОП) 19 окт 2013 17:41 Have you READ the problem before submitting it? Statement is more than clear: "At first you want to draw a circle and place all your bottles inside it so that *each* of the bottle bottoms *touches* the circle" I fully agree with you, with 7 and 6 bottles the answer should be 3 and my program give me more than 3 for 7 bottles but the judge accept it, that's wrong or why not? Oh yea! I also solved a circle packing problem at the beginning :) But the problem is much more easier. This cost me a lot of contest time... Edited by author 29.10.2013 00:21 |
| Problem 1965. Pear Trees has been rejudged | Kurpilyansky Eugene (USU) | 1965. Саженцы груши | 28 окт 2013 19:22 | 2 |
New tests have been added. 13 authors have lost AC after rejudge. Edited by author 05.08.2013 10:00 |
| Just test | 2rf [Perm School #9] | 1029. Министерство | 28 окт 2013 15:36 | 5 |
Just test 2rf [Perm School #9] 6 авг 2009 17:19 This test helped me to get AC, though I think it's good only against my solution: 3 4 1 100 1000 0 1 1 1000 0 100 0 1000 100 //answer 1 1 2 2 it helps me a lot! appreciate you in chinese :谢谢你 The fee is a POSITIVE integer. |
| %lld >> %I64d | twocoldz | 1995. Запрещённые специи | 28 окт 2013 12:05 | 1 |
i use the greedy,but wa on #5! the faq say "use %lld to output the long long" but it's should be %I64d.. F**K waste my two days. the server use windows instand of linux??? Edited by author 29.10.2013 13:14 |
| getting wa15 | Ilya Shakirov [Perm SU] | 1998. Старый падаван | 27 окт 2013 16:46 | 1 |
|
| wrong test #1 | snakeand1 | 1601. АнтиКАПС | 27 окт 2013 16:14 | 1 |
Hello everybody! System said: "wrong answer" Here is code: a = str(input()).split('\n') x = 0 while x < len(a): a[x] = a[x].capitalize() x += 1 print('\n'.join(a)) |
| Hint that helped me to get AC | Chitanda Eru | 1992. CVS | 27 окт 2013 14:35 | 3 |
1. *deleted* 2. It's possible for the input file size to exceed 6 MB. In C++, reading it from cin is out of the question, and scanf() is apparently slow too. getchar() is faster. Edited by author 27.10.2013 14:02 Your test is incorrect, "If a clone learn (not relearn) a program, all cancellation record history of this clone is deleted". So we can't do "relearn" in last line. First test is test from statment, and it is correct Your first solution has a bug, so it falls with runtime Oh, found it. Using a buffer of 8 chars to read the command's name was a terrible idea (one more is needed for '\0'), but it worked fine on my local machine. Is there a way to track such access violations locally? Deleted the first "hint" to avoid causing confusion. |
| Задача 1123. Зарплата | BrainBreaker | | 27 окт 2013 03:43 | 2 |
I got AC (Problem 1123, 24.04.2013), but after new tests added - rejudged and WA15. Old version: 2433 --> 2552 24332552 --> 24344342 New version: 2433 --> 2442 24332552 --> 24333342 0 --> 0 9 --> 9 10 --> 11 100003 --> 101101 10003 --> 10101 150006203700 --> 150006600051 1500329999 --> 1500330051 My program returned correct answer for all forum's tests and my tests. But now, I got WA7! Help me, please. (Real test #7) Edited by author 27.10.2013 03:30 Edited by author 27.10.2013 03:33 Edited by author 27.10.2013 03:34 I got AC (Problem 1123, 24.04.2013), but after new tests added - rejudged and WA15. Old version: 2433 --> 2552 24332552 --> 24344342 New version: 2433 --> 2442 24332552 --> 24333342 0 --> 0 9 --> 9 10 --> 11 100003 --> 101101 10003 --> 10101 150006203700 --> 150006600051 1500329999 --> 1500330051 My program returned correct answer for all forum's tests and my tests. But now, I got WA7! Help me, please. (Real test #7) Edited by author 27.10.2013 03:45 |
| WA#8 - Time limit C++ | vladi | 1196. Экзамен по истории | 27 окт 2013 03:39 | 2 |
#include <iostream> using namespace std; int main() { int i, j, k = 0, n, m, stud; scanf("%d", &n); int *prepod = new int[n]; for (i = 1; i<=n; i++) { scanf("%d", &prepod[i]); if (i>=2) { if (prepod[i] == prepod[i-1]) prepod[i-1] = -1; } } scanf("%d", &m); for (i = 1; i<=m; i++) { scanf("%d", &stud); for (j=1; j<=n; j++) { if (stud == prepod[j]) k++; }
} printf("%d", k); return 0; } Edited by author 20.10.2013 06:07 Edited by author 20.10.2013 06:08 Edited by author 20.10.2013 06:08 #include <iostream> using namespace std; int main() { int i, j, k = 0, n, m, stud, first = 0, last, temp = 0; scanf("%d", &n); int *prepod = new int[n]; for (i = 1; i<=n; i++) { scanf("%d", &last); if (first != last) { first = last; temp++; prepod[temp] = last; } } scanf("%d", &m); for (i = 1; i<=m; i++) { scanf("%d", &stud); for (j=1; j<=temp; j++) { if (stud == prepod[j]) { k++; break; } }
} printf("%d", k); system("pause"); return 0; } |
| Test #6 | Vedernikoff 'Goryinyich' Sergey (HSE: АОП) | 1990. Гонки на карах | 27 окт 2013 01:36 | 3 |
Test #6 Vedernikoff 'Goryinyich' Sergey (HSE: АОП) 26 окт 2013 16:47 Is it correct? almost linear algo gets TL! ID: 5285869, line: 108: what happens if statment under "if" will be true? :) Re: Test #6 Vedernikoff 'Goryinyich' Sergey (HSE: АОП) 27 окт 2013 01:36 Sh..t, thanks, added 2 lines and AC =( +1 to stupid mistakes that spoiled the whole contest =( BTW, the contest was cool, thanks! Edited by author 27.10.2013 01:41 |
| Fixed | ranetka_st | 1001. Обратный корень | 27 окт 2013 00:28 | 1 |
Fixed ranetka_st 27 окт 2013 00:28 Edited by author 27.10.2013 00:36 |
| Team login | Yermak | | 26 окт 2013 23:33 | 2 |
Let's say my team participated in some Timus contest and tasks of this contest went into the main problem set. And now I'd like to submit problems (that were solved by Me) under my login. Is it OK for two logins (mine and my team) to have the identical submissions? What if I'd like to submit the code of my teammates? And if both questions have "it's OK" answer where is this thin boundary that delimits "OK" and "not OK"? Edited by author 26.10.2013 18:44 Edited by author 26.10.2013 18:45 In our team was are rule: if you write some code, you can submit it under your own login (but there was no accounts on Timus with this code, becouse it was writed on onsite). I think it's OK to resubmit your own solution. |
| Can't get all the line | alexander minayev | 1567. SMS-спам | 26 окт 2013 21:29 | 1 |
I've started learning C++ two weeks ago. And I can't read all the line with spaces. I include <istream>, but can't use "getline". Visual studio 2012 express. |
| test 4 | Aditya Rai | 1880. Собственные числа Psych Up | 26 окт 2013 19:26 | 2 |
test 4 Aditya Rai 25 мар 2013 21:55 can anybody tell me what is test 4 with 0 and not with 1=))) |