| Show all threads Hide all threads Show all messages Hide all messages |
| AC | Jamshid Akhmedov | 1832. Arirang Show | 31 Jan 2013 21:46 | 1 |
AC Jamshid Akhmedov 31 Jan 2013 21:46 /* * Created by SharpDevelop. * User: Жамшидбек * Date: 31.01.2013 * Time: 20:02 * * To change this template use Tools | Options | Coding | Edit Standard Headers. */ using namespace System; int main(array<System::String ^> ^args) { Console::WriteLine(L"Hello World"); return 0; } |
| AC using C# | Jamshid Akhmedov | 1545. Hieroglyphs | 31 Jan 2013 21:41 | 1 |
using System;namespace jama{class Program{static void Main(string[] args){ushort n = ushort.Parse(Console .ReadLine());string[] a = new string[n];for (ushort i = 0; i <= n - 1; i++){a[i] = Console.ReadLine();}string b = Console.ReadLine();foreach (string d in a){if (d.Substring(1,1) == b)Console.WriteLine(d);}Console.ReadLine();}}} |
| Russian translation. | Tolstobrov Anatoliy[Ivanovo SPU] | 1917. Titan Ruins: Deadly Accuracy | 31 Jan 2013 12:36 | 1 |
Incorrect: "которую могут маги ещё могут пережить" Correct: "которую маги ещё могут пережить" |
| Scala support | Nikolay Ulyanov | | 30 Jan 2013 06:05 | 2 |
Hello, is it possible to add support for this beautiful language? Thanks. and I hope Python is the next language to add. Of course, more languages offer more choices. |
| Hint? | nistaman | 1239. Ghost Busters | 30 Jan 2013 00:56 | 4 |
Hint? nistaman 15 Oct 2006 03:38 Can someone give me a hint for this task? Thanks! Project everything onto sphere R=1, now you have 2D problem because Z can be evaluated from X and Y. Projections' countours will be circles. Then find limiting Y - i.e. Y values for which some particular projection has only one point on that R=1 sphere. Then find all Y values for which two projections start/stop intersecting. For every pair of projections there will be at most 2 such Y values, so we will have at most O(N^2) control Y points. Now, for each particular Y value each projection will constitute some [X1;X2] interval and it becomes a classic point-in-max-number-of-segments problem (O(N*log(N)). So, the overall complexity is O(N^3*log(N)). And a lot of math about square equations. Edited by author 05.08.2008 19:02 Edited by author 05.08.2008 19:57 Edited by author 05.08.2008 20:00 Edited by author 05.08.2008 19:49 overall complexity is O(N^3) |
| Punctuation error in russian version of problem condition | underminer | 1402. Cocktails | 30 Jan 2013 00:12 | 2 |
In the fourth sentence they should insert a comma after the third word. Edited by author 30.01.2013 00:12 |
| What is the test 2??? | Dark Cleaner | 1515. Cashmaster | 29 Jan 2013 23:44 | 1 |
My first program gives right answers for all the extremal tests, that I think out for my AC program, but it can not pass this test with diagnosis "Crash (access violation)". Why? What checks this test? Edited by author 30.01.2013 01:45 |
| Still dont see why i get "Crash" | Andrey | 1910. Titan Ruins: Hidden Entrance | 29 Jan 2013 21:18 | 1 |
Guys, i run program and it works. Why does it crash? Could you point me to the problem in my code? public static void main(String[] args) throws IOException { int sum=0; Scanner s = new Scanner (System.in); int a = s.nextInt (); BufferedReader br = new BufferedReader (new InputStreamReader (System.in)); String s1 = br.readLine (); for (int i = 0; i<a-2; i++) { if (s1.charAt (i)==s1.charAt (i+1) && s1.charAt (i) == s1.charAt (i+2)) { String s2 = Character.toString (s1.charAt (i)); sum = Integer.parseInt (s2); System.out.print (sum*3 + " "); } } for (int i = 0; i<a-2; i++) { if (s1.charAt (i)==s1.charAt (i+1) && s1.charAt (i) == s1.charAt (i+2)) { System.out.print (s1.indexOf(s1.charAt (i))+2); } |
| No subject | Andrey | 1910. Titan Ruins: Hidden Entrance | 29 Jan 2013 16:20 | 3 |
Is input always made in given range or your tests may input not allowed numbers (like -1) and i must write code to handle this input error? Must this numbers 1 4 4 4 1 1 be randomly generated or what? Must numbers other than 4 (in this case) be always 1? Or be the same? Edited by author 25.01.2013 20:56 Edited by author 25.01.2013 20:56 The input data is in the given range. As you can see from the problem statement, instead of the 1 and 4 there could be any number in range [1, 1000000]. Guys, I get 'Crash' message but cant undrestand why. I run programm and it does what it has to do. Could u please look look at the code ant point me to the problem? This is JAVA public static void main(String[] args) throws IOException { int sum=0; Scanner s = new Scanner (System.in); int a = s.nextInt ();
BufferedReader br = new BufferedReader (new InputStreamReader (System.in)); String s1 = br.readLine ();
for (int i = 0; i<a-2; i++) { if (s1.charAt (i)==s1.charAt (i+1) && s1.charAt (i) == s1.charAt (i+2)) { String s2 = Character.toString (s1.charAt (i)); sum = Integer.parseInt (s2); System.out.print (sum*3 + " ");
} }
for (int i = 0; i<a-2; i++) { if (s1.charAt (i)==s1.charAt (i+1) && s1.charAt (i) == s1.charAt (i+2)) {
System.out.print (s1.indexOf(s1.charAt (i))+2);
}
|
| WA2 | Majo | 1777. Anindilyakwa | 29 Jan 2013 16:02 | 3 |
WA2 Majo 20 Jan 2013 13:09 My program is right for this test. |
| WA -8 ! | Iacob Vlad | 1786. Sandro's Biography | 29 Jan 2013 13:11 | 2 |
WA -8 ! Iacob Vlad 27 Nov 2011 20:45 first 7 tests are all strings of length 6. so if you wa 8, your program may not handle string of length > 6. |
| My succesfull C# code!!! | Jamshid Akhmedov | 1910. Titan Ruins: Hidden Entrance | 28 Jan 2013 23:25 | 1 |
using System; static class Module1 { public static void Main() { short n = short.Parse(Console.ReadLine()); string[] a = Console.ReadLine().Split(); int i = 0; int temp = 0; int max = 0; int numb = 0; while (i + 3 <= n) { temp = int.Parse(a[i]) + int.Parse(a[i + 1]) + int.Parse(a[i + 2]); if (temp > max) { max = temp; numb = i + 2; } i += 1; } Console.WriteLine(max + " " + numb); } } |
| Use of SIMD intrinsics (SSE2 etc) in C/C++ solutions | Grigor Nasenbaer | | 28 Jan 2013 18:46 | 1 |
Does the MSVC++ compiler used on the judging machine come with the relevant headers (emmintrinsics.h etc) for using SSE, SSE2, etc? If so, which instruction sets are supported? |
| How to avoid to use int64 | Vlad | 1029. Ministry | 27 Jan 2013 23:58 | 1 |
The result isn't greater than 1 000 000 000. So everytime you make "element = something" you should do "element = min(something, 1 000 000 000)" , min(a, b) returns a if a < b of b if a > b. |
| Online Javascript PIBAS Interpreter here | Doctor Lai | 1230. Introspective Program | 27 Jan 2013 22:48 | 1 |
|
| For WA10 | gautamvs | 1629. Trip | 27 Jan 2013 20:23 | 1 |
Try getting next day flight if no flight is available after delay by adding 24*60 to flight timings. |
| WA TEST #10 PLEASE! | hisp | 1629. Trip | 27 Jan 2013 20:22 | 2 |
if no suitable flight available after delay, you can try getting next day flight by adding 24*60 to flight timings. |
| wa #7 | Лукьянчиков Владимир Игоревич | 1699. Turning Turtles | 27 Jan 2013 18:40 | 3 |
wa #7 Лукьянчиков Владимир Игоревич 5 Nov 2010 19:40 Who had problems with test #7, tell me WTF? Please,anybody,post here some tricky tests! This test helped me to avoid WA#7: 6 6 ###### #.#.#. #.#.## #..... ###### #.#..# 1 3 6 6 6 ans: 6 Right answer is 5, isn't it? Edited by author 27.01.2013 18:40 |
| test | Radi Muhammad Reza | 1885. Passenger Comfort | 26 Jan 2013 22:31 | 12 |
test Radi Muhammad Reza 30 Oct 2011 09:34 10000 500 50 40 best of luck Re: test IgorKoval [PskovSU] 30 Oct 2011 23:40 What is answer on this test? =) Re: test IgorKoval [PskovSU] 31 Oct 2011 03:34 So....., how get this answer? Explain, please. =) If the plane flies at speed 40, it will reach required height in 250 seconds, i.e. it will do it in time (less, than 500), and there are no time when it exceeded the speed limit (when passengers have their ears blocked). So, mintime = 0. Maxtime is 250, because the plane can fly all the way at speed = 40 + EPS :) Edited by author 31.10.2011 13:02 Re: test IgorKoval [PskovSU] 31 Oct 2011 18:08 Thank you very mutch!!! AC! =) And just for fun tests: Test #1 h == 10000 && t2 == 500 && Vm == 50 && x == 10 Test #2 h == 10000 && t2 == 500 && Vm == 50 && x == 9 Test #3 h == 10000 && t2 == 500 && Vm == 50 && x == 11 Test #4 h == 10000 && t2 == 500 && Vm == 50 && x == 20 Test #5 h == 10000 && t2 == 500 && Vm == 50 && x == 19 Test #6 h == 10000 && t2 == 500 && Vm == 50 && x == 21 ans: 0.000000000000000 476.190476190476200 Re: test Kartik Andalam 9 Apr 2012 04:33 Hey there, Is it possible for you to explain the last one. why is it 476..19....? Thanks Answers for tests IgorKoval(from Pskov) 125.00000 500.000000 134.146341 500.0000000 115.384615 500.0000000 0.000000 500.000000 16.129032 500.000000 0.0000000 476.190476 Edited by author 26.01.2013 22:32 What does the EPS mean? How much it must be? EPS is very small positive number. For example, you may assume EPS = 10^-2011 Thank you very much! But I didn't think that it must be SO small. |
| To Admin | Vladislav Antoshkin | 1915. Titan Ruins: Reconstruction of Bygones | 26 Jan 2013 03:26 | 3 |
To Admin Vladislav Antoshkin 24 Jan 2013 22:48 where the number 8 in the output test? 4 3 8 4 3 8 out: 4 3 8 4 out: 4 3 4 3 is correct? 8 is not on the stack, it is the # of input values. I see. Can you delete it topic? |