| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| [to Admins] Got Runtime error (in Java) even on solutions which were accepted before. Any ideas? | Timur [SPB] | | 8 янв 2015 17:03 | 3 |
Send my solutions in Java. And get "Runtime error (non-zero exit code)". I decide to check an already accepted solution. Sent the same solution that was accepted 4 days ago and it returned "Runtime error (non-zero exit code)". What's wrong? Any changes on server for Java in last 4 days? P.S. Even with test problem 1000 from here: http://acm.timus.ru/help.aspx?topic=java Edited by author 08.01.2015 11:52 Edited by author 08.01.2015 15:24Fixed Vladimir Yakovlev (USU) 8 янв 2015 16:32 |
| if you get WA#3 try this test case: | Adhambek | 1050. Подготавливая статью | 8 янв 2015 10:03 | 1 |
Input: "Hello world "Next paragraph" and this works " \par last one \endinput Output: Hello world ``Next paragraph'' and this works \par last one \endinput |
| Why wrong answer?, please help!! | Najmaddin Akhundov | 1001. Обратный корень | 8 янв 2015 06:08 | 2 |
#include <iostream> #include <vector> #include <cmath> using namespace std; int main() { double n; vector<double> v; int a = 1; while (a==1) { cin >> n; v.push_back(n); if (cin.peek() == '\n') a = 0; }
for (int i = 0; i <= v.size() - 1; i++) { //cout << sqrt(v[v.size() - 1 - i]) << endl; printf("%.4f\n", sqrt(v[v.size() - 1 - i]));
} cout << endl;
} out of type. for ex. 876652098643267843 out of double |
| Wrong #11 example | Nodirbek Islomov | 1262. Псевдоримское число | 8 янв 2015 01:25 | 1 |
8888 --> 16 Edited by author 08.01.2015 10:09 Edited by author 08.01.2015 10:09 |
| n = 0 ? | Dima | 1047. Простые вычисления | 7 янв 2015 12:53 | 5 |
n = 0 ? Может такое быть ? deleted [] Edited by author 07.01.2015 12:54 |
| What is test case #3? | Suchith J N | 1450. Российские газопроводы | 7 янв 2015 08:54 | 1 |
I'm repeatedly getting WA in Test#3. I converted all weights to negative and used Bellman-Ford. I also checked if the destination is reachable from the source. Nevertheless, I'm getting WA in the same test case. Could someone give me test case #3? |
| What's wrong with my Topological Sorting? | Peter P | 1022. Генеалогическое дерево | 7 янв 2015 04:09 | 2 |
I got WA#1 :( What's wrong bros? =============================================================== static int speakerCount = 0; static void solve() throws IOException { final int N = nextInt(); // graph[i][j] = true: i-th is parent of j-th final boolean[][] graph = new boolean[N + 1][N + 1]; for (int line = 1; line <= N; line++) { int parent = nextInt(); if (parent == 0) { continue; } int child = nextInt(); while (0 < child) { graph[parent][child] = true; child = nextInt(); } } StringBuilder speakerList = new StringBuilder(); final boolean[] visitedNodes = new boolean[N + 1]; while (speakerCount < N) { for (int node = 1; node <= N; node++) { if (!visitedNodes[node]) { visit(node, visitedNodes, speakerList, graph); break; } } } out.println(speakerList.toString().trim()); } private static void visit(int node, boolean[] visitedNodes, StringBuilder speakerList, boolean[][] graph) { // Stop if marked if (visitedNodes[node]) { return; } // Marked visitedNodes[node] = true; // Visit each child for (int child = 1; child < visitedNodes.length; child++) { if (graph[node][child]) { visit(child, visitedNodes, speakerList, graph); } } speakerList.insert(0, node + " "); speakerCount++; } Edited by author 23.05.2014 15:48 I think the problem is that a children could have more than 1 parent - and here you have to check if all of his parents have been printed. If you can't find the solution yourself - write and I will tell you a way. P.S. Other people say that "One of the lines in test 4 has trailing space. This old problem was designed for Pascal/C++, such inputs treated as a bad style nowadays." I don't know what this means, but first check if this is the problem! Edited by author 07.01.2015 04:12 |
| Test 4 | Fyodor Menshikov | 1258. Бильярд | 7 янв 2015 04:05 | 2 |
Test 4 Fyodor Menshikov 5 мар 2010 00:17 |
| WA at #14... | Mikhail Krivenko | 1588. Ямайка | 7 янв 2015 03:48 | 2 |
can anyone help me with that? AC now Mikhail Krivenko 7 янв 2015 03:48 |
| Why I get WA? Pelase, help me!!!!!!! | Revenger and NSC | 1136. Парламент | 7 янв 2015 01:35 | 3 |
My code: [code deleted] Edited by moderator 20.06.2020 16:24 I solve it in absolutely the same way, I get WA too :( Set max id to 2 000 000 and max members to 65536 - it worked for me. |
| For those who had problems with test 11 and got AC | Ivanov Alexander | 1136. Парламент | 7 янв 2015 01:27 | 2 |
What is the 11th test about? Two my solutions (on pascal and c++) got wa11 and I really don't know why. The limit is said to be MAX 3000 members and MAX id 65535, but with this limits I got Access Violation on 11. I set MAX members to 65536 and MAX id to 2 000 000 and it worked. |
| Clarity for Problem Statement | Jihan Yin | 1987. Вложенные отрезки | 6 янв 2015 22:49 | 2 |
My code got WA for #27. After checking forever for errors, I edited my comparison for my set so that if two distances are equal, the distance with the bigger key will come first as a last desperation. After submitting this, I got AC. I think this should be stated in the problem statement, because it affects the solutions. For those that don't understand what I'm talking about: Input: 2 1 1 1 1 1 1 (Before) WA 27 Output: 1 (After) AC Output: 2 Your sample is incorrect. Because in the statment: "The segments are ordered by non-decreasing ai, and when ai = aj they are ordered by decreasing length. All segments are distinct." |
| c# accepted | pav1uxa | 1493. В одном шаге от счастья | 6 янв 2015 21:14 | 1 |
del Edited by author 06.01.2015 21:37 |
| AC with Visual C++ 2010, yet TLE 14 with G++ 4.9?! | Kirill Nikonov | 1176. Гиперканалы | 6 янв 2015 19:03 | 1 |
Ridiculous! It's O(damn E)! AND I got rid of all the lists and used simple arrays instead. It just cannot get any faster than that... |
| try this test case: | Adhambek | 2040. Палиндромы и сверхспособности 2 | 4 янв 2015 22:13 | 1 |
aaabbbababbaaaa ans: 111111111111001 Edited by author 04.01.2015 22:13 Edited by author 04.01.2015 22:15 |
| Im getting CRASH on test2. plz help | Ibragim Atadjanov | 1125. Классики | 4 янв 2015 14:55 | 2 |
Edited by author 08.06.2009 19:23 me too UPD. Oh, I understood my problem. I misunderstood the statment. Actually, there are m rows and n colums. But i thought on the contrary. Edited by author 04.01.2015 15:04 |
| WA #10 | Spatarel Dan Constantin | 1623. Fractal Labyrinth | 4 янв 2015 03:06 | 1 |
WA #10 Spatarel Dan Constantin 4 янв 2015 03:06 Di and Do may _COINCIDE_. |
| Explain the statement, please | Burakov Vladislav | 2024. Время приключений | 4 янв 2015 02:35 | 2 |
Could someone please explain me what does phrase "Rocks of pairwise different colors" mean? I assume that in second example the only possible set of Rocks is "ababa", but I can see there 6 pairs of Rocks with different colors. The only possible match to the samples I can see is if you could pick a set of Rocks with at most k different colors, but I don't think it is the right meaning of the statement. Update: Yep, my last guess was correct after all. Edited by author 25.12.2014 00:30 Yep, I don't understand the phrase either. Please fix the problem statement. :) |
| test 4 | ilya trofimov | 2016. Магия и наука | 3 янв 2015 23:32 | 2 |
test 4 ilya trofimov 17 окт 2014 18:04 Precision????? or something special??? Same question here. Any hints? Edit: just a bug with initial speed vector. Edited by author 04.01.2015 06:34 |
| Not working and WA #1; what's wrong here? | Neeraj Kumar | 1585. Пингвины | 3 янв 2015 17:30 | 1 |
#include<stdio.h> #include <string.h> // n is not required at all, i am leaving it. int main(){ int n, ce, cm, cl, max = 0; char c; scanf ("%d", &n); while ((c = getchar())!= EOF){ if (c == 'E') ce++; else if (c == 'M') cm++; else if (c == 'L') cl++; } /* Emperor Penguin Macaroni Penguin Little Penguin */ max = (ce > cm) ? ((ce > cl) ? ce : cl) : ((cm > cl) ? cm : cl); if (max == ce) printf("Emperor Penguin"); else if (max == cm) printf ("Macaroni Penguin"); else printf ("Little Penguin"); return 0; } |