| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| WA#12 | soloviyova_ssau | 1679. Башня дядюшки Скруджа | 18 ноя 2013 12:06 | 8 |
WA#12 soloviyova_ssau 16 янв 2009 17:40 1 35 0 25 21 22 Answer YES Edited by author 12.04.2009 20:28 I think that the correct answer here is NO wtf Edited by author 12.04.2009 20:32 I'm sorry, I made mistake. Though my lying AC programm writes "YES" ((((. Test is changed. Maybe answer on test 1 35 0 25 22 21 is also "YES" ? Anybody, check it, plz. Hi, My program gives "YES", I got WA#12 also. Any ideas? AC program. answer is YES |
| WA12,,, please give me test... | Hoderu | 1930. Машина инженера Ивана | 17 ноя 2013 23:44 | 1 |
I use BFS, but WA12 :( Help me, pleas give me test |
| Who know where is my mistake | TUIT_MAD | 1048. Сверхдлинные суммы | 17 ноя 2013 15:14 | 3 |
var a,b:array[1..1000000] of integer; f:array[1..1000000]of integer; n,v,e,k,u:integer; begin k:=0; assign(input, 'input.txt'); reset(input); assign(output, 'output.txt'); rewrite(output); readln(n); for v:=1 to n do begin read(a[v]); read(b[v]); readln end; for e:=n downto 1 do begin f[e]:=a[e]+b[e]; f[e]:=f[e]+k; if f[e]>9 then begin f[e]:=f[e]-10; k:=1; end else k:=0; if((e=1)and(f[e]>9)) then f[e]:=f[e]+10; end; for u:=1 to n do write(f[u]); end. var a,b:array[1..1000000] of integer; f:array[1..1000000]of integer; n,v,e,k,u:integer; begin k:=0; readln(n); for v:=1 to n do begin read(a[v]); readln(b[v]); end; for e:=n downto 1 do begin f[e]:=a[e]+b[e]; f[e]:=f[e]+k; if f[e]>9 then begin f[e]:=f[e]-10; k:=1; end else k:=0; if((e=1)and(f[e]>9)) then f[e]:=f[e]+10; end; for u:=1 to n do write(f[u]); end. You shouldn't using input,output in your solution. But i can't find your mistake too... Edited by author 24.05.2011 23:51 Edited by author 24.05.2011 23:52 if((e=1)and(f[e]>9)) then f[e]:=f[e]+10; f[e]>9... Why do you plus 10? Sorry, I am Russian. |
| Problem 1383 "Average Common Prefix". Timelimit changed | Erop [USU] | 1393. Average Common Prefix | 17 ноя 2013 14:48 | 1 |
New timelimit is 1.5 seconds. All solutions were rejudged. |
| for admin: add new test | Sunnat | 1393. Average Common Prefix | 17 ноя 2013 14:45 | 2 |
I found a test that might be you don't have: input: 2 AA output: 2.000 my program accepted even it's not passed this test. plase add this test as a variant Your test was added. Thanks. |
| Some tests | NickC8 | 2010. Юный гроссмейстер Саша | 17 ноя 2013 01:38 | 4 |
I'm getting WA#4, can you give some tests? Re: Some tests Vedernikoff 'Goryinyich' Sergey (HSE: АОП) 16 ноя 2013 03:31 1 1 1 King: 0 Knight: 0 Bishop: 0 Rook: 0 Queen: 0 2 2 2 King: 3 Knight: 0 Bishop: 1 Rook: 2 Queen: 3 100000000 99999999 100000000 King: 5 Knight: 3 Bishop: 99999999 Rook: 199999998 Queen: 299999997 98765432 10987654 32109876 King: 8 Knight: 8 Bishop: 120740737 Rook: 197530862 Queen: 318271599 Thank you, remembered about cases when n<4 until your post. Got AC! Have you used predefined output for these (n<4) cases? Edited by author 16.11.2013 03:51 Re: Some tests Vedernikoff 'Goryinyich' Sergey (HSE: АОП) 17 ноя 2013 01:38 No, well designed algo equally works for all possible cases |
| I have a question | NickC8 | 2000. Grand Theft Array V | 17 ноя 2013 00:48 | 2 |
If they both start from the same position, who eats the number from that position? If somebody has the same question - the first one eats the number. |
| LOL | Rest0 | 1197. Один в поле воин | 16 ноя 2013 17:26 | 4 |
LOL Rest0 15 ноя 2013 19:04 #include "stdafx.h" #include "stdio.h" #include "locale.h" int main() { setlocale(LC_CTYPE, "rus"); int X, Z;
char Y; printf("Введите координаты клетки коня: "); scanf("%c%d", &Y, &Z); switch (Y) { case 'a': Y = 1; break; case 'b': Y = 2; break; case 'c': Y = 3; break; case 'd': Y = 4; break; case 'e': Y = 5; break; case 'f': Y = 6; break; case 'g': Y = 7; break; case 'h': Y = 8; break; default: break; }
if (Y == 1 && Z == 1 || Y == 1 && Z == 8 || Y == 8 && Z == 1 || Y == 8 && Z == 8) { printf("Клеток под боем: 2\n"); } else { if (Y == 1 && Z == 2 || Y == 1 && Z == 7 || Y == 2 && Z == 1 || Y == 2 && Z == 8 || Y == 7 && Z == 1 || Y == 7 && Z == 8 || Y == 8 && Z == 2 || Y == 8 && Z == 7) { printf("Клеток под боем: 3\n"); } else { if (Y == 1 && Z == 3 || Y == 1 && Z == 4 || Y == 1 && Z == 5 || Y == 1 && Z == 6 || Y == 8 && Z == 3 || Y == 8 && Z == 4 || Y == 8 && Z == 5 || Y == 8 && Z == 6 || Z == 1 && Y == 3 || Z == 1 && Y == 4 || Z == 1 && Y == 5 || Z == 1 && Y == 6 || Z == 8 && Y == 3 || Z == 8 && Y == 4 || Z == 8 && Y == 5 || Z == 8 && Y == 6 || Y == 2 && Z == 2 || Y == 2 && Z == 7 || Y == 7 && Z == 2 || Y == 7 && Z == 7) { printf("Клеток под боем: 4\n"); } else { if (Y == 2 && Z == 3 || Y == 2 && Z == 4 || Y == 2 && Z == 5 || Y == 2 && Z == 6 || Y == 7 && Z == 3 || Y == 7 && Z == 4 || Y == 7 && Z == 5 || Y == 7 && Z == 6 || Z == 2 && Y == 3 || Z == 2 && Y == 4 || Z == 2 && Y == 5 || Z == 2 && Y == 6 || Z == 7 && Y == 3 || Z == 7 && Y == 4 || Z == 7 && Y == 5 || Z == 7 && Y == 6) { printf("Клеток под боем: 6\n"); } else { if (Y == 3 && Z == 3 || Y == 3 && Z == 4 || Y == 3 && Z == 5 || Y == 3 && Z == 6 || Y == 4 && Z == 3 || Y == 4 && Z == 4 || Y == 4 && Z == 5 || Y == 4 && Z == 6 || Y == 5 && Z == 3 || Y == 5 && Z == 4 || Y == 5 && Z == 5 || Y == 5 && Z == 6 || Y == 6 && Z == 3 || Y == 6 && Z == 4 || Y == 6 && Z == 5 || Y == 6 && Z == 6) { printf("Клеток под боем: 8\n"); } else { printf("Где конь, парень? 0_о \n"); } } } } } return 0;
} what's wrong, guys? :D P.S.: WA 1 Hi, you shouldn't print out anything else than the requested number. Please remove the messages in russian from the printf. Re: LOL ძამაანთ [Tbilisi SU] 16 ноя 2013 15:41 Re: LOL Anton Malyuta 16 ноя 2013 17:26 Где конь, парень? 0_о WOW! :D |
| WA #5 | Anton Malyuta | 2000. Grand Theft Array V | 16 ноя 2013 17:01 | 3 |
WA #5 Anton Malyuta 16 ноя 2013 14:12 My algorithm finds the numbers on the left and right, and then compares them, and takes a step toward greater. But if the sum is equal, it compares to one until it finds one larger (and goes upwards). If comparing the results in one step, then goes in the direction of the enemy. What's wrong? Re: WA #5 Smilodon_am [Obninsk INPE] 16 ноя 2013 15:54 Try these tests first test: 10 0 0 1 10 5 100 5 1 0 0 3 8 answer: 16 106 second test 10 0 0 1 100 5 10 5 1 0 0 3 8 106 16 answer: 106 16 I am slowpock. I go AC. Edited by author 17.11.2013 02:14 |
| WA 1 but right answer!!! | Wasdek | 1452. Pascal против C++ | 16 ноя 2013 15:36 | 3 |
On #1 test my program output: 4 6 1 5 4 but get wrong answer. Why? Your progression is decreasing (9 7 5 3), which contravenes the problem statement: "You should take a maximal number of different elements from this sequence which are successive terms of some increasing arithmetical progression." Thank you, i'll correct my mistake |
| Runtime Error on First test, but OK in Eclipse | Roman Samokhin | 1197. Один в поле воин | 15 ноя 2013 21:08 | 1 |
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out); int n = in.nextInt(); String[] a = new String[n]; int[] result = new int[n]; for (int i = 0 ; i < n ; i++){ String tmp = in.next(); String x = tmp.substring(0,1); String y = tmp.substring(1,2); int xi=0; ArrayList<String> letters = new ArrayList<String>(); Collections.addAll(letters, "a", "b", "c", "d", "e", "f", "g", "h"); xi = letters.indexOf(x); int yi = Integer.parseInt(y)-1; int[][] desk = new int[8][8]; for (int[] tmp_array :desk){ Arrays.fill(tmp_array,1); } result[i]=0; result[i]=result[i] + check(desk,xi+1,yi+2)+ check(desk,xi+2,yi+1)+ check(desk,xi-1,yi+2)+ check(desk,xi-2,yi+1)+ check(desk,xi+1,yi-2)+ check(desk,xi+2,yi-1)+ check(desk,xi-1,yi-2)+ check(desk,xi-2,yi-1); } for (int j : result){ out.println(j); } out.flush(); } public static int check(int[][] desk, int x, int y){ int add = 0; try{ if (desk[x][y]==1){ add++; } }catch (Exception e){} return add; } } Why? |
| В чем проблема?( | DeDaRm | 1068. Сумма | 15 ноя 2013 18:47 | 3 |
#include <iostream> using namespace std; int main () { int x,y=0; cin >> x; if (x==1) { cout << x-1; return 0; system ("pause > void"); } if (x>1 && x<=10000) { for (int z=1;z<=x;++z) { y+=z; } } if (x<1 && x>=-10000) { for (int z=x;z<=1;++z) { y+=z; } } cout << y; system ("pause > void"); } Edited by author 10.11.2013 23:05 For x=1 your output is wrong; why do you print x-1? ok,THX)) if x=1,cout x or 1 Edited by author 15.11.2013 18:51 |
| Time Limit TEST 4 | Jhonny Monrroy | 1002. Телефонные номера | 15 ноя 2013 17:12 | 2 |
Cual es la entrada y salida del test 4? Hi there, test 4 is quite small actually, so take a look for possibilities that your code enters an infinite loop. |
| AC | Kornilenko Leonid (KHAI) | 1563. Баяны | 15 ноя 2013 12:17 | 2 |
AC Kornilenko Leonid (KHAI) 22 янв 2008 17:13 0.062s and 2125Kb I solve it on C#. With Hashtable it's very easy. p.s. GL & HF Edited by author 22.01.2008 17:18 Re: AC DaniilMcrose 15 ноя 2013 12:17 With Python's dicts it's easier :) |
| WA 6 | Faeton (Kyiv - Mohyla Academy) | 1580. Долги декана | 15 ноя 2013 12:16 | 4 |
WA 6 Faeton (Kyiv - Mohyla Academy) 21 окт 2007 21:36 Re: WA 6 Faeton (Kyiv - Mohyla Academy) 21 окт 2007 22:20 Edited by author 21.10.2007 22:20 Edited by author 21.10.2007 22:20 8 8 3 4 2 4 5 4 5 3 6 1 2 1 2 3 1 5 6 1 6 7 1 7 8 1 2.00 -1.00 2.00 0.00 4.00 -3.00 4.00 -3.00 |
| fail | Charm | 1021. Таинство суммы | 15 ноя 2013 12:04 | 6 |
fail Charm 5 фев 2011 21:26 В чём ошибка не пойму.? не проходит 1 тест var i,j,k,m,s,n:integer; a,b:array[1..100000] of integer; begin read(n); k:=0; for i:=1 to n do read(a[i]); read(m); for i:=1 to m do read(b[i]); for i:=1 to n do begin for j:=1 to m do begin if a[i]+b[j]=10000 then k:=1; end; end; if k=1 then write('yes'); if k=0 then write('no'); end. Edited by author 05.02.2011 21:26 Edited by author 05.02.2011 21:30 Re: fail Andrew Suhani 24 мар 2011 01:21 Try to use capital letters for the answer: YES and NO Re: fail ilya_romanenko 3 июн 2011 22:40 Исправь "yes" и "no" на "YES" and "NO". Однако после этого будет ТЛЕ на 4 тесте. Используй быструю сортировку и бинарный поиск. Удачи! Sorting not needed because input given in sorted order. Actually you even not need to binary-search, just line scan of both arrays. Think what way summ changed if you pick next item in array. IMHO sortirovka zdes ninado |
| AC 0.015s 180kb!!!!!!!!!!!!! | Hrayr | 1243. Развод семи гномов | 14 ноя 2013 05:40 | 4 |
And? As you can see from the problem statistics, many people did it in 0.001s and some of them - with 117 kb =) |
| Prim got AC,Kruskal TLE #6 | twocoldz | 1416. Для служебного пользования… | 13 ноя 2013 23:01 | 1 |
RT. I want to know what data is on test #6 |
| ADMINS!!! WRONG TEST!!! | Alexander Prudaev | 1452. Pascal против C++ | 13 ноя 2013 20:04 | 18 |
test #1 6 7 0 0 0 0 0 my program output "2\n1 2" but gets WA#1 yes, you are right my cheat program: var N; begin readln(N); readln(N); readln(N); if (N=0) then 10 div 0 else InfinityRecursion end. of course, read(N); i am in despair. it work! test it! at least once for sample input it write sample output. i don't use any random, but it gets WA1 //code deleted Edited by author 13.06.2006 23:27 ht[heap[hp].nexN&0x7FF]=hp++; //It's wrong! ht[heap[hp].nexN&0x7FF]=hp++; //It's wrong! why it's wrong? it's equivalent line: ht[heap[hp].nexN&0x7FF]=hp; hp++;
ht[heap[hp].nexN&0x7FF]=hp; hp++; //It's right! and after finding of all mistakes, you get the TLE#6... 6 1 2 3 4 5 6 3 1 1 2 3 1 2049 4097 Edited by author 11.06.2006 05:08 я извиняюсь, мне просто не сказать этого по английски :) я запостил не ту версию программы, в этой есть баги. да не в этом дело я написал программу которая даёт правильный ответ на sample#1 причём даже в той же последовательности выводит номера. моя программа даёт ответ: 4 4 5 1 6 но проверяющая система выносит вердикт: WA#1 я закомментировал вывод ответа и написал в конце printf("4\n4 5 1 6"); такая программа получает WA2 вопрос: как такое может быть, что одна программа получает WA2, а вторая WA1 я не однократно проверил что программы на этот sample выдают один и тот же ответ может быть причина в том, что я вывожу числа так: for (i=0;i<chetotam;i++) printf("%d ",int_ar[i]); мешает лишний пробел? это глупо, и маловероятно. перед выводом нет перевода строки. больше мне ничего в голову не приходит На всякий случай убери лишний пробел, моя АС прога не выводит его... Your solution is verified by a checker written by Ilya Grebnov, and no one still claimed it works wrong. I want you to send me both you WA(1) and WA(2) solutions for investigation. If some bug in the checker is found I will fix it. My e-mail for Russian-speaking programmers is dimanyes@mail.ru sent. I write a new program - WA12 :) I send. You forgot about? I have nothing to say. Everything is ok on my Borland C++ Builder compiler. You must contact with Vladimir Yakovlev to investigate this problem because he is C++ programmer. I have forwarded your mail to him. can you give me his e-mail? you know my, sent it. Your program works wrong on sample input. Test it with other compiler. For example, with Intel C++ Compiler 7.0 I have only Visual Studio 6 & 2005 in this IDE my program writes right answer I have same problem. On 1 test my program output: 4 6 1 5 4 but WA1. Why? |
| HELP ME PLEASE! | KOTMAKRUS | 1083. Факториалы!!! | 13 ноя 2013 16:51 | 1 |
I have 1 test runs but on the server WA test 1!!??? program pro; var n,k,t:byte; s:string; sum:integer; BEGIN read(n,s); t:=1; k:=length(s)-1; if n mod k=0 then begin sum:=n; while n-t*k>0 do begin sum:=sum*(n-t*k); t:=t+1; if sum*(n-t*k)<0 then break; end; sum:=sum*k; end else begin sum:=n; while n-t*k>0 do begin sum:=sum*(n-t*k); t:=t+1; if sum*(n-t*k)<0 then break; end; sum:=sum*(n mod k); end; write(sum); END. 9 !! My program write 945 and why WA 1?????? |