| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| Easy :D | mr_sinjster | 1352. Простые числа Мерсенна | 20 окт 2015 02:02 | 1 |
Easy :D mr_sinjster 20 окт 2015 02:02 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Numerics; using System.Threading.Tasks; namespace T1 { class Program { static void Main(string[] args) { int n = int.Parse (Console.ReadLine ()); int[] data = new int[]{2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917, 20996011, 24036583, 25964951, 30402457, 32582657, 37156667, 42643801, 43112609, 57885161}; int[] result = new int[n]; for (int i = 0; i < n; ++i) result [i] = data [int.Parse (Console.ReadLine ()) - 1]; for (int i = 0; i < n; ++i) Console.WriteLine (result [i]); } } } |
| Wrong answer test 3 in Java 1.7 please help me | Axmadjon | 1496. Спамер | 19 окт 2015 21:43 | 2 |
import java.util.Arrays; import java.util.Scanner; public class _1496 { public static void main(String[] args) { Scanner s = new Scanner(System.in); int amount = s.nextInt(); if (amount == 0) System.out.println("0"); else { String[] source = new String[amount]; String[] uniT = new String[amount]; int j = 0; int count = 0; for (int i = 0; i < amount; i++) { source[i] = s.nextLine(); } Arrays.sort(source); uniT[0] = source[0]; for (int i = 0; i < amount; i++) { if (source[i].equals(uniT[j]) != true) { j++; uniT[j] = source[i]; } } for (int i = 0; i <= j; i++) { count = 0; for (int k = 0; k < amount; k++) { if (source[k].equals(uniT[i])) { count++; } } if (count > 1) { System.out.println(uniT[i]); } } } } } You have to change Output in case of empty solution from "0" to Empty string. It will solve your problem |
| 出题人严重脱离现实生活 | gaoshangbo | 1753. Книжная полка | 19 окт 2015 16:47 | 4 |
It's hard to dispute with you! :)))) |
| Some useful tests | yeziqing10 | 1216. Two Pawns and One King | 19 окт 2015 11:55 | 1 |
8 a2 b3 h1 WHITE WINS 8 a2 b3 g2 BLACK WINS 8 d6 e7 e6 BLACK WINS (if you use DP as me, the following tests are useful) 8 a6 h2 g2 WHITE WINS 8 a2 b3 g3 BLACK WINS 8 a2 b4 h1 BLACK WINS 8 a2 b3 h1 WHITE WINS The problem is really good. It makes me more considerate and ..trains my patience... |
| Test 9 | Agabek | 2008. Артамончик | 19 окт 2015 02:57 | 3 |
Test 9 Agabek 10 ноя 2013 00:11 Re: Test 9 Vedernikoff 'Goryinyich' Sergey (HSE: АОП) 10 ноя 2013 15:41 Don't know what kind of test it is, but precision troubles are quite likely in this problem. So, solve problem in integers to avoid them. I had WA on test 9 with a wrong formula for the movement equations, that worked on the samples, but was too weak to solve these tests (it would say "yes" to both): 14 0 20 0 10 0 0 Yes 14 0 20 0 9 0 0 No |
| If you have JAVA ML | Muravjev Slava [Samara SAU] | 2064. Гусеницы | 19 окт 2015 01:15 | 1 |
I had java ML 12. It was solved by replacing BufferedReader/StringTokenizer -> manual integers reading by in.read(). |
| WA#5 | kitxuli | 1563. Баяны | 18 окт 2015 19:56 | 2 |
WA#5 kitxuli 18 окт 2015 18:13 can you give me 5th test, please input contains strings which size is 30. |
| Some tests (+) | Orfest (Novosibirsk SU) | 2007. Мутанты против машин | 18 окт 2015 18:32 | 1 |
I had WA 29, these tests helped me: abaaa aab Answer: aa baaba abb Answer: aa bcbbc abcc Answer: abb Edited by author 18.10.2015 22:56 |
| 2 ADMINS: ban the following user(s) for multiple accounts and flooding testing queue | Vedernikoff 'Goryinyich' Sergey (HSE: АОП) | 1462. Золото дядюшки Скруджа | 18 окт 2015 14:20 | 2 |
Kolega FrigATE Mister IPRIT Jogn Doe Jogn Doe2 Jogn Doe3 John Doe 4 John Doe 5 Flooding submissions were cleaned out Edited by author 18.10.2015 14:20 |
| test6 | DeadLine | 2069. Тяжёлый рок | 18 окт 2015 09:47 | 2 |
test6 DeadLine 18 окт 2015 00:10 |
| COOL contest - almost all probs. are solvable in Python! Many thanks to authors!!! (-) | Vedernikoff 'Goryinyich' Sergey (HSE: АОП) | 2070. Интересные числа | 18 окт 2015 04:01 | 1 |
|
| 1st test | BARNAUL1710_4 | 2069. Тяжёлый рок | 17 окт 2015 16:31 | 3 |
1st test BARNAUL1710_4 17 окт 2015 15:15 Why the "coolest" rout is 4? 4 + 7 + 8 = 19, isn't it? "Определим крутость маршрута как минимальную популярность группы среди всех улиц, по которым рокеры проедут". |
| The first sample | saodem74 | 2069. Тяжёлый рок | 17 окт 2015 14:41 | 1 |
<deleted> Edited by author 17.10.2015 14:47 |
| Test 2 W.A. C++ | Alex Stolbovoi | 1880. Собственные числа Psych Up | 17 окт 2015 11:31 | 1 |
What is "Wrong answer - test 2", and how can i fix it? Edited by author 17.10.2015 11:58 Edited by author 17.10.2015 11:58 |
| I have WA#5! is this Input is correct? | {AESC USU} Evgeny Kurpilyanskij | 1438. Time Limit Exceeded | 16 окт 2015 17:54 | 3 |
input x= 5 print x In 1st line('x = 5') delete one space Test 5: you should output the list of _initialized_to_this_moment_ variables and their values Pheeew, finally AC! After WA #3, which had a test like print 5 end , i added 4 lines to fix that, and immediately got WA5. Thanks to Fyodor, i immediately understood what i missed, in case like a = 1 goto x b = 2 x: goto x i initially printed Program terminated. Variables state: a: 1 b: 0 So, i fixed that too, and only printed out a: 1, but still was having WA5! Curiously enough, after a fix, which i didn't think would help, i finally got AC. In my program, i had this chunk of code: writeln('Program terminated. Variables state:'); { for i:=1 to vsz do if initialized[i] = 1 then writeln(vnames[i], ': ', vars[i]); } for i:=1 to vsz do begin val(vnames[i], j, xcode); if xcode <> 0 then begin if initialized[i] = 1 then writeln(vnames[i], ': ', vars[i]); end; end; The thing is, i threw everything into variable array, both constants and variables, like if i met A = 4 + -3, i throw A, 4, -3 into that array. Then, i go through every variable "name" and use standard val procedure to attempt to convert string into integer. "A" isn't a number, so it remains 0 initially, but "4" and "-3" successfully convert into numbers, so i give them values of 4 and -3 initially. But if i write in my program 4 = 100, then later on something like "A = A + 4" would actually add 100 to A. Soooo... Using that lower uncommented chunk, i go through variable names again, and convert them into numbers, to see, if they're supposed to be constants. If they are, i ignore them, and if they aren't, i check if they're initialized, and if they are, i print them. That gave me WA5. Test like 4 = 5 x: goto x would give Program terminated. Variables state: Then, i commented that lower chunk, and uncommented the upper chunk, so that no matter if "variable"'s name can be converted to number or not, i print it out anyway if it's initialized. So for test like 4 = 5 x: goto x it now gives Program terminated. Variables state: 4: 5 And that fix got me AC! Either stuff like 4 = 5 is present in 5th test, or i'm missing anything else... Well, that was fun to discover, haha~ I also implemented support for variable names equal to keywords, so things like "not = not not" or "not: not = not or not" or "print: print print" would be parsed adequately, but seems it wasn't really needed. P. S. In the end, it turned out that the Val function converts not only decimal, but also hexadecimal numbers, which is why i encountered this problem. Edited by author 22.10.2015 15:12 |
| Even more clearing statement(also if you get WA in test case 8) | competitivecoder | 2056. Стипендия | 16 окт 2015 12:09 | 1 |
1)If a person has got satisfactory marks in any subject than answer will be "None". 2)If he has got marks greater than 5 in all sub than answer is "Named"; 3)If average score greater 4.5 than High; 4)Else common. I am not trying to spoil the question but I found statement little bit unclear.Hope thhis will help |
| Я решал эту задачу за O(N) | yura | 1135. Новобранцы | 16 окт 2015 10:59 | 1 |
Есть кто нибудь которой решил с подсчётом количество инверсии. Edited by author 16.10.2015 11:01 |
| who knows test3? | YSYMYTH | 1438. Time Limit Exceeded | 16 окт 2015 05:55 | 2 |
After hours and hours of struggle, i finally found out that test 3 is as simple as something like print 5 end No variables, no operations, just printing a number. Also, it was actually runtime error (out of bounds) for me, it's a sad thing it gave me WA instead... Edited by author 16.10.2015 06:43 |
| wa 10 why? | DJPonnYash | 1343. 12 месяцев | 15 окт 2015 18:01 | 1 |
|
| I don't pass test 6 | Kseniya5if | 1123. Зарплата | 14 окт 2015 21:33 | 1 |
|