|
|
Show all threads Hide all threads Show all messages Hide all messages | 2 lines programm, lol. It's not difficult at all | D4nick | 1582. Bookmakers | 24 Mar 2023 00:33 | 2 | It can be at least 3 lines of code if you write one statement per line (in plain C) double k1, k2, k3; scanf("%lf %lf %lf", &k1, &k2, &k3); printf("%.0lf", /* The Expression */); Edited by author 24.03.2023 00:40 | k1 k2 k3 range from 0.01 to 100?? | Mickkie | 1582. Bookmakers | 12 Jan 2013 09:59 | 1 | from the betting coefficient k is (m + n) / n I think k must be greater than 1. Don't you think so? | To Admins - TLE 5. Wrong input data | SKYDOS [Vladimir SU] | 1582. Bookmakers | 10 Aug 2010 21:22 | 3 | First I used my own method for reading data, this function: http://paste.ubuntu.com/475799/ GOT TLE 5... Then used this method: double[] data = Console.ReadLine().Split().Select(s => double.Parse(s)).ToArray(); GOT AC... Whats the 5 test? is it bug in my reading function or what? Need help. PS Check last @Crash@: http://acm.timus.ru/status.aspx?space=1&num=1582&author=73720 Code: if (data[0].IndexOf('.') == -1 || data[1].IndexOf('.')==-1 || data[2].IndexOf('.')==-1) throw new System.DivideByZeroException(); Some of numbers are NOT with floating point. From problem statement: В единственной строке через пробел записаны 3 числа с плавающей точкой k1, k2 и k3. Edited by author 10.08.2010 14:02100 - is the floating point number too. I think it should be "100.0" 100 - is the floating point number too. | Can I solve this problem for time 0.001??Sory for bad english. | Narek X | 1582. Bookmakers | 6 Sep 2009 21:33 | 4 | Edited by author 06.09.2009 21:29 Equation Edited by author 06.09.2009 21:26 Algorithm for this problem is O(1). You should to think a little. My algorithm is O(1) and it is AC, but in 0.015 why??? | I am the greatest :) | Tural Neymanov | 1582. Bookmakers | 18 Sep 2008 19:52 | 2 | Yes I did it! This problem wasn't solved by me, first, but after a few lists of paper i saw how stupid this problem is! and of course i feel honored because of my own solution! | I didn't understand... | Yashar Abbasov | 1582. Bookmakers | 12 Feb 2008 18:33 | 5 | Hi. Sorry can you explain me the second sample test. 1.25 10.0 5.75 ? How much money has he put for each of coefficients. Just solve this system: k1*x1==k2*x2==k3*x3 x1+x2+x3==1000 Man interested why so. Simply if examply k1*x1>max(k2*x2,k3*x3) we will lost in case of mistake with first result. Edited by author 27.10.2007 22:22 Edited by author 27.10.2007 22:23 but isn't it to print k1*x1? |
|
|
|