| Show all threads Hide all threads Show all messages Hide all messages |
| May I ask, what is 11 test?! I can't get it!!! for million times!!! | AndrKonin | 1353. Milliard Vasya's Function | 8 Jul 2012 19:20 | 4 |
can you give me your answer for 11th?? :( VF_1000000000(11) = 75501 |
| Whats wrong.Help with test 8!! | Серовиков Андрей | 1156. Two Rounds | 8 Jul 2012 18:21 | 3 |
I had WA#8 and miraculously found a bug in my backtracking&memorization with the following test: > 50 2 > 99 100 > 98 99 The problem was in printing a solution, when N tasks for the first round are prepared properly, but the other N are contradictory (because I quit from backtracking too soon). We probably wouldn't have experienced this if we had written a proper DP solution instead. :-) Edited by author 08.07.2012 18:21 |
| Data structures? | Alexey Dergunov [Samara SAU] | 1494. Monobilliards | 8 Jul 2012 16:49 | 2 |
Why is it tagged as 'data structures'? I used only one array to store the input. Edited by author 08.07.2012 15:47 |
| WA#10 | sty110112 | 1837. Isenbaev's Number | 8 Jul 2012 04:20 | 2 |
WA#10 sty110112 8 May 2011 10:59 same here. u seem have a correction for it. Can you tell me what's it ? :D |
| How to solve this problem? | Saturn | 1218. Episode N-th: The Jedi Tournament | 8 Jul 2012 03:35 | 6 |
BFS (-) Dmitry 'Diman_YES' Kovalioff 28 Jul 2004 09:27 My solution is based on the concept of strong connectivity. I find connected components of the graph, then I print those jedis, that belong to the non-dominated component. It is npt very quick, but it works. I don't know, how BFS can help with this problem. Any explanation will be very much appreciated. (de bene esse: my e-mail is akhmed[at]astranet[dot]ru). for each start among knights mark all that can be reached from start thru winning if all are marked then print start's name To test your speed, you can use the following perl script to generate input: $n = 200; print "$n\n"; for(1..$n){ print "J$_"; print ' ', int(rand()*100000) for 1..3; print "\n" } O(N*log(N)) solution exists :) |
| Some Tests | Lev_Sky | 1456. Jedi Riddle 2 | 7 Jul 2012 22:30 | 1 |
Give some some tests ,please Edited by author 07.07.2012 22:30 |
| Dont work test №5 | Sega_As | 1005. Stone Pile | 7 Jul 2012 18:36 | 4 |
program kamni; var n, i, k, min, v,a,b: integer; m: array[1..1000] of int64; begin readln(n); for i := 1 to n do begin read (m[i]); end; for i := 1 to n - 1 do begin min := i; for k := i + 1 to n do if m[min] < m[k] then min := k; v := m[min]; m[min] := m[i]; m[i] := v; end; a:=0; b:=0; for i:=1 to n do if a-b<=0 then a:=a+m[i] else b:=b+m[i]; begin writeln(a-b); end; end. 6 1 4 5 6 7 9 why 2? 9+7=16 и 1+4+5+6=16 o, senk you!) Edited by author 02.03.2012 01:01 |
| help on #11 | 侑子小姐 | 1812. The Island of Bad Luck 2 | 6 Jul 2012 21:38 | 2 |
I got about 20 WAs on #11, can anyone tell me any trick on this test? I didn't use biginteger, I checked every * operator, and I'm sure it wasn't overflow. All right...I make a mistake....-_____- |
| WA7 | imereli | 1081. Binary Lexicographic Sequence | 6 Jul 2012 00:23 | 1 |
WA7 imereli 6 Jul 2012 00:23 do you have any idea about this test? |
| Неверный ответ... Почему? | Alex | 1820. Ural Steaks | 5 Jul 2012 23:53 | 5 |
import java.util.*; public class main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); int a = n / k; // Считаем колличество ПОЛНЫХ партий int b = n % k; // Определяем наличие НЕ ПОЛНОЙ партии if (b > 0) { a += 1; // В случае наличия НЕ ПОЛНОЙ партии увеличиваем общее число партий на 1 } System.out.println(2 * a); // Умножаем колличество партий на 2 минуты } } potomu chto mozhno i mensh i bolshe sdelat! A etot code ne raboteat! Ya sam vpervye tak napisal В самом примере неверный ответ. В примере 3 бифштекса, к-во бифштексов на сковороде 2. Ответ: 3. Полный бред! Ответ не может быть непарное число, так как 1 заход жарки = 2 минуты. При умножении на 2 всегда будет парное число. А верный ответ в примере должен быть 4. I заход. 2 бифштекса за 2 минуты; II заход. 1 бифштекс за 2 минуты. Не будем же мы есть бифштекс, прожареный с одной стороны? Результат 2минуты + 2 минуты = 4. FilEV, you are not right. It is a right answer in sample. You just not understand, how to do it in 3 minutes :) А теперь по-русски, потому как не знаю как это сказать по-английски :) Рассмотрим пример. Требуется прожарить 3 бифштекса на сковородке, которая вмещает 2 бифштекса. Ложим сначала 2 бифштекса и жарим их одну минуту. Один бифштекс переворачиваем, другой убираем, ложим третий, жарим одну минуту. Теперь убираем первый, уже прожарившийся, переворачиваем третий, и возвращаем на сковородку второй и жарим ещё минуту. Итого 3 минуты, все бифштексы готовы. Вопрос в том, как использовать ресурсы сковородки. В моём объяснении сковородка постоянно была полностью заполнена. Если сначала полностью прожарить два бифштекса,убрать их и положить третий, то сковородка будет наполовину пуста, т.е. будет работать не в полную мощность - получится, что мы тратим её ресурсы зря. Только и всего. А вообще, раз 3 бифштекса, то значит требуется 6 бифштексо-минут; сковородка за минуту выдаёт 2 бифштексо-минуты, а значит, ответ 3 минуты. Andrew Sboev, действительно. Чувствую себя бараном. Нешироко взглянул на ситуацию, впрочем это моя распространенная проблема. Теперь раз 20 подумаю, прежде писать что-либо. |
| wrong answer (but works correctly on my computer) | crash94 | 1001. Reverse Root | 5 Jul 2012 23:05 | 2 |
uses SysUtils; var a,numb,prov:string; i:integer; begin //a:='1427 0'+#13+#10+' '+'876652098643267843'+#13+'5276538'+#10+' '; readln(a); for i := length(a) downto 1 do begin prov:=copy(a,i,1); if (prov=#13) or (prov=#10) or (prov=#32) then begin if numb<>'' then writeln(FormatFloat('0.0000',(sqrt(strtofloat(numb))))); numb:=''; end else numb:=prov+numb; end; writeln(FormatFloat('0.0000',(sqrt(strtofloat(numb))))); readln; end. Edited by author 05.07.2012 21:19 How this can work on your computer??? When you do readln(a), the only thing you get in string a is the first line of input. So, you don't process anything behind that. Also, if the last line of input ends with line break, I presume your code will print additional rubbish at the end of output. Read the FAQ and study how to input data in different formats (in this problem it is better to use extended or how long real is called in Pascal?) Edited by author 05.07.2012 23:06 |
| If you have WA 26 | Alexey Dergunov [Samara SAU] | 1075. Thread in a Space | 5 Jul 2012 16:31 | 2 |
Try to increase your EPS, I got AC with EPS = 1e-7 Somehow I managed to get AC without EPS. That's pretty weird since I was using acos. %) |
| Correct answer for test | _-Re@l-_ | 1685. Orthography | 5 Jul 2012 15:09 | 2 |
Test : abcdefgh Answer : dbacfeg Is this answer correct? no, correct answer is "cbdafegh" |
| Question | Andrew Sboev | 1795. Husband in a Shop | 5 Jul 2012 14:41 | 2 |
May answer be a floating point number? "телефонный разговор с женой длится полминуты." Or I should to round answer? Sorry, I understand what does this statement mean. Edited by author 23.05.2012 16:33 Too easy and fun problem :) deque + map = Accepted. |
| Admin | YSYMYTH | 1307. Archiver | 5 Jul 2012 12:57 | 1 |
Admin YSYMYTH 5 Jul 2012 12:57 I got WA at #1, but I've tested for thousands of kbs of files and I don't know why I'm wrong at all. Would you please show me why I got WA,please!! |
| What's wrong? | Eugene | 1293. Eniya | 5 Jul 2012 11:05 | 4 |
Help. What's wrong in this code? using System; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { int N, A, B; do { Console.Write("ВВедите N: "); N = int.Parse(Console.ReadLine()); } while (N < 1 || N > 100); do { A = int.Parse(Console.ReadLine()); } while (A < 1 || A > 100); do { B = int.Parse(Console.ReadLine()); } while (B < 1 || B > 100);
int R = ((A*B) * 2)*N; Console.WriteLine(R); } } } > Console.Write("ВВедите N: "); Delete this line. You should not output anything except the answer. Just think how the system can check it otherwise? I deleted that line, but I still get the Crash on the first test((( All three numbers are given in the same line. So, when you try to parse it as a single number, it crashes. |
| Any idea why I could get WA 4 ? | Mircea Dima | 1177. Like Comparisons | 4 Jul 2012 20:50 | 4 |
Any idea why I could get WA 4 ? All the tests I gave were ok. Edited by author 16.04.2010 23:25 try this '-' like '[a-b]' maybe it should be no. I got ac just modified it. |
| help on wa test 7 | YSYMYTH | 1675. Lunar Code 2 | 4 Jul 2012 16:41 | 1 |
somebody show some tests to me plz |
| Who knows about java? | YSYMYTH | 1108. Heritage | 4 Jul 2012 09:30 | 3 |
I know how to solve this problem,but I want to use the BigInteger of Java,could someone help me deal with it? email : ysymyth@gmail.com What kind of help do you need? BigIntegers' usage is very simple, I think. Just remember they are immutable, so if you need something like a += b use a = a.add(b) and not just a.add(b). could you send me a sample of using java bignumber? I'm new to java. |
| Need your help!!! | <<--Falcon-->> | 1033. Labyrinth | 3 Jul 2012 21:19 | 4 |
Hi,guys. This problem is quite interesting for me and I'd like to solve it, but, truth to tell, I don't know how... :( I know that the problem relates to the graph theory, but I can't figure out what the problem of the graph theory this problem represents and what algorithms can be applied here. So, could you give me some little hint how to solve the problem?... Please..... Thank you very much for the info. Finally, I've got AC :)(It turned out to be a very easy problem). However, I still don't understand why this problem relates to the graph theory... Edited by author 25.11.2011 15:35 Hmm. I used BFS to solve this problem, for example |