| Show all threads Hide all threads Show all messages Hide all messages |
| I've got AC without precalculating array ... 0.046 sec | Tolstiy_BSU | 1268. Little Chu | 12 Oct 2013 08:53 | 11 |
Please, send me your solution or algorithm! my email: xujand000@rambler.ru Please, send me your solution or algorithm! my email: cpp_student@163.com Please, send me your solution or algorithm! my email: ttxxli@163.com Heh, I solved without precalc too, but my solution got time near 0.234 sec (( Please, send me your solution or algorithm! my email: k13795263@126.com Я на java решил за 0.25 без масива .На С++ было бы намного быстрее.Вообще основная идея - первообразный корень по примарному модулю. (Извините за русский но английский я не знаю ) Thank you... Edited by author 12.10.2013 08:56 |
| Precalc? | Arseniy | 1260. Nudnik Photographer | 12 Oct 2013 00:28 | 1 |
|
| wrong answer 6? | Minh Tri | 1119. Metro | 11 Oct 2013 21:02 | 4 |
who know this error please explain for me please ^^! Fixed Edited by author 26.04.2013 09:41 Edited by author 26.04.2013 09:41 test input 4 3 3 4 3 3 2 2 1 ans is 524 result = 524 but wrong answer 6 test input 4 3 3 4 3 3 2 2 1 |
| what is test#1 - - | tqti | 1079. Maximum | 11 Oct 2013 20:58 | 1 |
|
| 1068. Sum - Java | Alex | 1068. Sum | 11 Oct 2013 15:41 | 4 |
Dear, sirs Could you help to find out the reason of WA ? // thank you import java.util.*; public class sumN { public static void main(String[] args) { Scanner in = new Scanner(System.in); int k = 1; int sum = 0; int N = in.nextInt(); int M = Math.abs(N); if (M<=10000) { int arr[] = new int[M-1];
for (int i=0; i<(M-1); i++) { k++; arr[i]=k; } for (int i=0; i<(M-1); i++) sum += arr[i]; System.out.print(sum); } } } also I tried import java.util.*; public class sumM { public static void main(String[] args) { Scanner in = new Scanner(System.in); int sum = 0; int N = in.nextInt(); int M = Math.abs(N); if (M<=10000) {
for (int i=1; i<=(M); i++) sum += i; System.out.print(sum-1);
} } } Edited by author 02.10.2013 10:19 solved import java.util.*; public class sumM { public static void main(String[] args) { Scanner in = new Scanner(System.in); int sum = 0; int N = in.nextInt(); if ((N>0) & (Math.abs(N)<=10000)) {
for (int i=1; i<=N; i++) sum += i;
} else if ((N<=0) & (Math.abs(N)<=10000)) {
for (int i=N; i<=1; i++) sum += i;
} System.out.print(sum); } } this solution doesn't give the right answer |
| Test 7 | Nakatengga | 1971. Graphics Settings | 11 Oct 2013 00:19 | 1 |
Test 7 Nakatengga 11 Oct 2013 00:19 I am getting Time limit exceeded.. Maybe someone had the same problem? What can it be? help please |
| Hint. | rydah | 1753. Bookshelf | 10 Oct 2013 16:21 | 1 |
Hint. rydah 10 Oct 2013 16:21 You gotta find the dependence of your length with the angle. It looks like two variable formula. |
| Почему нет возврата ошибки при Runtime Error | vpuhoff | | 10 Oct 2013 14:20 | 2 |
Добрый день, чем вызвано отсутствие реализации возврата данных об ошибке программы, ведь нет информации по тестовым наборам данных а при реализации многих программ при чтении задачи буквально ошибки быть физически не может, в таких случаях нужны либо ответ от программы либо наборы данных с которыми производится тестирование потому как данные явно не соответствуют условиям задачи. Чем вызвано создание подобной недоработки в системе? Я лично не вижу сложностей в реализации отдачи данных хотя бы стандартного потока при любой ошибке. This doesn't correspond site policy. It is possible to get test data: some program reads test, writes it to stdout and falls with Runtime - now you see test data. All input data are exactly satisfy problem description, it is specially checked. If you think it doesn't - say why you think so. |
| Нет признака завершения ввода набора данных | vpuhoff | 1001. Reverse Root | 10 Oct 2013 14:02 | 2 |
«отделённых друг от друга произвольным количеством пробелов и переводов строк» подразумевает возможность того что «переводов строк» может быть бесконечно много и невозможно определить закончили ли вводить данные в программу или все еще вводят "переводы строк". Без данного признака условие задачи некорректно. «Размер входного потока не превышает 256 КБ», так что «переводов строк» не может быть бесконечно много, т.к. перевод строки это как минимум 1 байт. К тому же есть такая штука как "конец входного потока" - когда её встречаешь - набор входных данных заканчивается. Как читать данные до конца потока, подробно описано в разделе FAQ, соответствующего нужному языку программирования: http://acm.timus.ru/help.aspx?topic=faq |
| WA 8 | Guzh | 1290. Sabotage | 9 Oct 2013 23:34 | 1 |
WA 8 Guzh 9 Oct 2013 23:34 What's (input) in a test №8? |
| (2 ^ k) * (n ^ 2) works in 0.171 | Bekzhan | 1500. Pass Licenses | 9 Oct 2013 03:07 | 2 |
Of course, with a little optimizations :) But not (2 ^ k) * (n ^ 2) * K : )) |
| AC......but too slow! | Yu YuanMing | 1326. Bottle Taps | 8 Oct 2013 23:08 | 5 |
I regard it as a graph theory problem,and solve it in O(M*2^N). But it is very slow,so I would like to hear some others' algorithm.Maybe we can make progress together. Contact me: yym2008@hotmail.com Just get only bottles he wants (ignore others). Perform mix-up by bit-wise OR (I think you did it). And use heap for Dijkstra - it works very well because |E| < |V| thanks Denis Koshman, first i Time limit exceeded in test 11, when i use your hint i AC in 0.453 s, i dont forgot your hint in all my life :D. GOOD LUCK!!! How can I regard it as a graph theory problem??? What do edges mean and what do vertex mean? Edited by author 17.05.2012 18:31 ive got the same problem my solutions (both using function w/ memoization and precomputing all the possible bitmasks before answering) pass the time limits but are 6-7 times slower :| |
| What is the answer for this test? | pmartynov | 1326. Bottle Taps | 8 Oct 2013 23:04 | 3 |
4 20 11 12 23 3 17 2 1 3 25 3 2 3 4 15 2 3 4 3 1 3 4 What is the answer? 32 or 35? If 32, how is it possible to do that less that O(2^(N+M))? English version says AN optimal offer. Russian says: Осталось выбрать оптимальнЫЕ предложенИЯ (plural). What to choose? |
| VERY Important HIINT for C++ solvers. | 198808xc | 1177. Like Comparisons | 8 Oct 2013 21:28 | 2 |
When reading the input, like this: char *Input; cin.getline(...); the chars with ASCII code larger than 127 will become negative integers, for example, if the ASCII code is SUPPOSED to be 160, it will turn out to be 160-128. Fix this trick, and you will get AC. One more, this article will help you VERY MUCH if you don't really understand the problem statements. http://acm.timus.ru/forum/thread.aspx?space=1&num=1177&id=10577&upd=632900666745579610 (It can be found just on the BOARD.) GOOD LUCK~ please give me source kostan3@spaces.ru |
| TLE27 | kostan3 | 1275. Knights of the Round Table | 8 Oct 2013 20:17 | 1 |
TLE27 kostan3 8 Oct 2013 20:17 TLE27???????????????? как исправить |
| Java WA on test 1 | Izobara | 1001. Reverse Root | 8 Oct 2013 14:53 | 2 |
import java.io.*; import java.text.DecimalFormat; import java.util.*; public class Main { public static void main(String[] args) throws IOException { Scanner in = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out); List<Double> a = new ArrayList<Double>(); while (in.hasNextDouble() ) { a.add(in.nextDouble()); } DecimalFormat df = new DecimalFormat("#.0000"); for (int i = a.size() - 1; i >= 0; --i) { out.println(df.format(Math.sqrt(a.get(i)))); } } } And I realy don't understand where is my problem Edited by author 02.10.2013 14:42 Change List<Double> to List<Long> |
| WA 4 Help!! | Alexandr-pro | 1319. Hotel | 8 Oct 2013 06:52 | 1 |
var i,j,n:word; a:array[1..100] of word; begin readln(n); a[1]:=1; for i:=2 to n do a[i]:=a[i-1]+i-1; for j:=n downto 1 do begin for i:=n downto 1 do write(a[i]:3); for i:=1 to n-1 do a[i]:=a[i+1]+1; a[n]:=a[n]+j; writeln; end; end. |
| To admins! | ilya trofimov | 1154. Mages Contest | 8 Oct 2013 00:59 | 2 |
“We can't win!” in English statement is not «We can’t win!» in Russian statement: ' not equal ’. Thus if you use ’ - WA8. |
| WA13 , Any Example Test cases | balbasaur | 1718. Rejudge | 7 Oct 2013 23:30 | 1 |
|
| Help, please! Unclear problem statement | Leonid | 1157. Young Tiler | 7 Oct 2013 21:33 | 1 |
Oh... He actually uses all of his tiles. Sorry, I read statement inattentively. deleted Edited by author 07.10.2013 22:24 |