| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| To Admins. | Abdullajon | 1274. Fractional Arithmetic | 2 май 2015 12:38 | 1 |
My AC solution gives wrong answer for this test case: 1/2 - 1/3 my answer: -1/6 Add this test... |
| Сообщение для автора. Message for an author. | Sergey Medgaus | 1567. SMS-спам | 1 май 2015 22:53 | 5 |
Пример в задаче неправильный. Исправьте стоимость на 111. Example isn't correct. Change cost from 114 to 111. Oh, how clever you are! 5000+ authors ACed this very difficult problem, and only you noticed the incorrect example. Are you counted it? ahhaha you are very patient It is correct. The answer is 114. |
| Runtime error 4 | Nextatix | 2002. Тестовое задание | 1 май 2015 19:59 | 1 |
switch(in.sval) { case "register": { in.nextToken(); log=in.sval; if(log==null) log=Integer.toString((int)in.nval); in.nextToken(); pas=in.sval; if(pas==null) pas=Integer.toString((int)in.nval); if(m.containsKey(log)) out.println("fail: user already exists"); else { m.put(log,pas); out.println("success: new user added"); } } break; case "login": { in.nextToken(); log=in.sval; if(log==null) log=Integer.toString((int)in.nval); in.nextToken(); pas=in.sval; if(pas==null) pas=Integer.toString((int)in.nval); if(!m.containsKey(log)) out.println("fail: no such user"); else if(!m.get(log).equals(pas)) out.println("fail: incorrect password"); else if(a.contains(log)) out.println("fail: already logged in"); else { a.add(log); //out.println(m.get(log) + " " + pas); out.println("success: user logged in"); } } break; case "logout": { in.nextToken(); log=in.sval; if(log==null) log=Integer.toString((int)in.nval); if(!m.containsKey(log)) out.println("fail: no such user"); else if(!a.contains(log)) out.println("fail: already logged out"); else { a.remove(log); out.println("success: user logged out"); } } break;
} |
| WA16 | Penguin | 1104. Не спрашивай даму о возрасте | 1 май 2015 11:11 | 1 |
WA16 Penguin 1 май 2015 11:11 Got WA on test 16. I've read previos posts about test "123", i have base 4 for this test. |
| Wrong answer 7. help please. pascal | Lena | 1496. Спамер | 1 май 2015 10:47 | 1 |
var a:array[1..101] of string; b:array[1..101] of integer; k,n,i,j,t,max,p:integer; x:string; begin k:=1; readln(n); readln(x); a[1]:=x; for i:=2 to n do begin readln(x); for j:=1 to k do if x=a[j] then b[j]:=b[j]+1; for j:=1 to k do if x<>a[j] then a[k+1]:=x; k:=k+1; end; for t:=1 to n do if b[t]>=max then max:=b[t]; for p:=1 to n do if b[p]=max then writeln(a[p]); end. |
| whats wrong????? | shubham | 1409. Два бандита | 1 май 2015 10:39 | 2 |
#include<stdio.h> void main() { int harry, larry; int sum; int harryleft, larryleft; scanf("%d%d", harry, larry); sum = (harry + larry)-1; harryleft = sum - harry; larryleft = sum - larry; printf("%d%d", harryleft, larryleft); return 0; } Here's the necessary changes: int main() scanf("%d%d", &harry, &larry); |
| WA #48 What it can be? | BinaryMind [RAU] | 1875. Angry Birds | 30 апр 2015 22:30 | 1 |
I passed it, there was an defect in my algo :-) Edited by author 30.04.2015 23:51 |
| there is a solution with almost O(n) | maxi | 1146. Maximum Sum | 29 апр 2015 20:50 | 2 |
#include <iostream> using namespace std; int n,A[1002],i,maxi,S[1002],st,dr,rez; int main() { cin>>n; for(i=1;i<=n;i++) cin>>A[i]; S[1]=A[1]; for(i=1;i<=n;i++) if(S[i-1]<=0) S[i]=A[i]; else S[i]=A[i]+S[i-1]; rez=-1000000; for(i=1;i<=n;i++) if(S[i]>rez) rez=S[i]; cout<<rez; return 0; } it's just a joke, isn't it? |
| WA7 in C# | ₰ҟᾷ®ßὂνṑγ (ONPU) | 1067. Структура папок | 28 апр 2015 22:35 | 4 |
You have to use StringComparer with parameter StringComparison.Ordinal to pass WA7 in CSharp. I've got AC in this way. |
| WA8? | Илья | 1280. Topological Sorting | 28 апр 2015 16:16 | 1 |
WA8? Илья 28 апр 2015 16:16 I dont understand why i get WA # 8 |
| How i can enter input. | Valery | 1006. Квадратные рамки | 28 апр 2015 07:05 | 7 |
please help me. I write program,but I can not test it, because I dont know how to enter a test. for i := 1 to n do readln(s[i]); use standart windows notepad when you press CTRL you can can use numpad to enter ASCII Codes of symbols open notepad: press ALT press 2 on numpad (digit keyboard on rigth side of keyboard) press 1 press 8 release ALT and you see Edited by author 15.09.2007 00:29 This is the sample input:(just copy it and look it in DOS) .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. ...........谀哪哪?............................... ...........?....?............................... ....谀哪哪某.....?.........谀?.................. ....?.....?....?.........??.................. ....?.....?....?.........滥?.................. ....?.....?...诔哪哪?............谀?.......... ....?.....滥哪哪?...?............??.......... ....?.....?...?....?............滥?.......... ....?.....?...?....?........谀目.............. ....滥哪哪馁....?....?........?.?............. ................?....?........?.?............. ................滥哪哪?........滥馁.............. .................................................. .................................................. Edited by author 08.12.2007 17:30 Edited by author 08.12.2007 17:30 by the way you can use font "lucida console" or "terminal" I use #ifndef ONLINE_JUDGE in C and read the input in the same format as the output should look like, then draw the squares with C code in my program - makes testing much easier. Set you console encoding 1252 before input(c++ : system("chcp 1252");) Copy past below. Do not change encoding of browser (it should be UTF-8), other way it convert to 2 byte sequence. You can try to copy this to standard windows notepad. If using Notepad++, set encoding to UTF8 before paste. Should work. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. ...........ÚÄÄÄÄÄ¿................................ ...........³.....³................................ ....ÚÄÄÄÄÄij.....³..........ÚÄ¿................... ....³......³.....³..........³.³................... ....³......³.....³..........ÀÄÙ................... ....³......³....Ú³ÄÄÄÄ¿.............ÚÄ¿........... ....³......ÀÄÄÄÄÄÙ....³.............³.³........... ....³......³....³.....³.............ÀÄÙ........... ....³......³....³.....³.........ÚÄÄ¿.............. ....ÀÄÄÄÄÄÄÙ....³.....³.........³..³.............. ................³.....³.........³..³.............. ................ÀÄÄÄÄÄÙ.........ÀÄÄÙ.............. .................................................. .................................................. Additional input: .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. ...........ÚÄÄÄÄÄ¿................................ ...........³.....³................................ ....ÚÄÄÄÄÄij.....³......ÚÄ¿ÄÚÄ¿................... ....³......³.....³......³.³.³.³................... ....³......³.....³......ÀÄÙÄÀÄÙ................... ....³......³....Ú³ÄÄÄÄ¿.............ÚÄ¿........... ....³......ÀÄÄÄÄÄÙ....³.............³.³........... ....³......³....³.....³.............ÀÄÙ........... ....³......³....³.....³.........ÚÄÄ¿.............. ....ÀÄÄÄÄÄÄÙ....³.....³.........³..³.............. ................³.....³.........³..³.............. ................ÀÄÄÄÄÄÙ.........ÀÄÄÙ.............. .................................................. .................................................. Edited by author 28.04.2015 07:40 |
| Tip | Mihail | 1488. Покер-АСМ | 28 апр 2015 01:19 | 1 |
Tip Mihail 28 апр 2015 01:19 Be careful to check if the two cards in Dima's sleeve are the same! |
| C# programming language is supported now (+) | Vladimir Yakovlev (USU) | | 27 апр 2015 21:04 | 8 |
The compiler is Microsoft ® Visual C# 2005 Compiler version 8.00.50727.42 (.NET Framework 2.0). The most of problems can be solved using C#, except for those that can't be solved with Java (1220, 1275, 1306). Edited by author 31.12.2006 01:31 using System; public class Sum { public static void Main() { string[] tokens = Console.ReadLine().Split(' '); Console.WriteLine(int.Parse(tokens[0]) + int.Parse(tokens[1])); } } If you need to read or write double in your program, do not forget set culture to InvariantCulture: Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; In some problems numbers are not necessarily separated with single space. Use Console.ReadLine().Split(new char[] {' ', '\t'}, StringSplitOptions.RemoveEmptyEntries) instread of Console.ReadLine().Trim().Split(' ') C# compiler has been updated to Microsoft Visual C# 2008 version 3.5.30729.1 (.NET Framework 3.5) The default decimal separator is now set to “.” All C# submissions to problems with floating-point numbers in input or output were rejudged. The verticts of about 800 submissions of 100 authors were changed. I have try to make some optimisation of input-output, but native read of stream does not bring some significant effect, and try of use Win32 api functions faults with runtime error on test 1 of task 1000. Where is the way to looking for? |
| error answer at test 10 -- how to find out what is wrong? | organmusic | 1842. Локальные корни | 26 апр 2015 17:56 | 1 |
All of my home-made tests have been passed succesfully but what is the test 10 which gives an error? How to get the test and what result should be for it? Edited by author 26.04.2015 18:07 |
| Test 1 | lex_t | 1106. Две команды | 26 апр 2015 15:08 | 1 |
Test 1 lex_t 26 апр 2015 15:08 Hi, I have a solution which seems correct. For the first test it gives me the following answer: 4 1 4 5 6 I consider, it fits to the problem statement. Could anyone clarify, what is going wrong? My algorithm is based on BFS and I always mark start vertex in a connected component as a first team vertex. |
| wrong!!! | _harun | 1068. Сумма | 25 апр 2015 15:46 | 1 |
int main() { // ios_base::sync_with_stdio(false); int n,sum; while(cin>>n) { sum=0; if(n<0) for(int i=1; i>=n; i--) sum+=i; else sum=(n*(n+1))/2; cout<<sum<<endl; } return 0; } |
| If you have WA14 | [RISE] Levon Oganesyan [RAU] | 1891. Язык Ocean | 25 апр 2015 03:34 | 1 |
3 a() : int a(int) : real a(real) : int 3 int x = a() auto y = a(x) auto z = a(y) WA14 program says Error on line 3: No such function But right answer is y : real z : int |
| What is 5 test | test | 1984. Охранник компота | 24 апр 2015 14:28 | 4 |
please write the 5 test. I got wrong answer It must be N=10; But i dont know answer for N=10 Epsilon... Precision... Who cares, huh? Edited by author 19.10.2013 21:33 Thanks Leonid I should learn to pay attention! |
| Can someone give me some detailed explanations about his solutions to this problem? | aclsh | 1791. Дядя Стёпа и автобусы | 23 апр 2015 22:25 | 1 |
My email is 843539450@qq.com,Thank you very much~ |
| Can you give me some test | Nujarin | 1353. Миллиардная Функция Васи | 23 апр 2015 17:54 | 5 |
Cos My English is Bad I don't Understand this Problem PS. Thank you Here is tests 1 _ 10 2 _ 45 3 _ 165 5 _ 1287 6 _ 3003 11 -> 75501 15 -> 478731 20 -> 2714319 45 -> 40051495 Please provide some more tests who have passed the problem 30 - 22505751 40 - 45433800 50 - 25614639 |