| Show all threads Hide all threads Show all messages Hide all messages |
| WA at #14... | Mikhail Krivenko | 1588. Jamaica | 7 Jan 2015 03:48 | 2 |
can anyone help me with that? AC now Mikhail Krivenko 7 Jan 2015 03:48 |
| Why I get WA? Pelase, help me!!!!!!! | Revenger and NSC | 1136. Parliament | 7 Jan 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 (HSE) | 1136. Parliament | 7 Jan 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. Nested Segments | 6 Jan 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. One Step from Happiness | 6 Jan 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. Hyperchannels | 6 Jan 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. Palindromes and Super Abilities 2 | 4 Jan 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 | airibo | 1125. Hopscotch | 4 Jan 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 Jan 2015 03:06 | 1 |
WA #10 👨🏻💻 Spatarel Dan Constantin 4 Jan 2015 03:06 Di and Do may _COINCIDE_. |
| Explain the statement, please | Burakov Vladyslav | 2024. Adventure Time | 4 Jan 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. Magic and Science | 3 Jan 2015 23:32 | 2 |
test 4 ilya trofimov 17 Oct 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. Penguins | 3 Jan 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; } |
| test 1 | guliashvili | 1263. Elections | 3 Jan 2015 15:47 | 5 |
test 1 guliashvili 15 Dec 2011 01:53 #include <stdio.h> #include<string.h> int main() { int sel[10010],n,m,tmp,i; scanf("%d%d",&n,&m); memset(sel,0,10010*sizeof(int)); for(i=0; i<m; i++) { scanf("%d",&tmp); sel[tmp]++; } for(i=1; i<=n; i++) printf("%.2f%\n",((double)sel[i]*(double)100)/(double)m); return 0; } whats wrong? printf("%.2f%%\n", problem is here. it needs two % Re: test 1 Nodir NAZAROV [TUIT-Karshi] 9 Sep 2012 15:29 % should also be printed at the end, I just found this mistake :) I am also amazed by this. My code is working in ideone with single "%". http://ideone.com/cbm8uh Edited by author 03.01.2015 15:49 |
| If you have WA #12 . Try this test. | test | 1930. Ivan's Car | 3 Jan 2015 15:16 | 4 |
6 6 4 2 1 2 4 5 2 3 2 6 6 4 1 5 answer : 0 Edited by author 07.01.2014 01:25 ? 6 6 4 2 1 2 4 5 2 3 2 6 6 4 1 5 answer : 0 Edited by author 07.01.2014 01:25 are you sure? isn't the answer is 2 the optimal route is: 1 -> 2 -> 6 -> 4 -> 5 and requires no gear changes Of course . it is right answer |
| please help with WA10 | ABC | 2003. Simple Magic | 3 Jan 2015 14:34 | 3 |
Try Input 3 3999986 5999979 9999965 Output infinity Input 2 5999979 9999965 Output 2 Input 1 9999965 Output 1 Input 1 1 Output 0 Your tests are incorrect, cause 3 ≤ n ≤ 10 000 |
| Greedy algorithm doesn't pass Test 3. Which algorithm to use ? | Hikmat Ahmedov | 1002. Phone Numbers | 2 Jan 2015 08:37 | 6 |
Greedy algorithm doesn't pass Test 3. Which algorithm to use ? Please don't say just DP+tree. How do you buld a tree ? Building a tree is not problem, we can build the tree using STACK but it gives TLE on test 5. It takes too much time to build the whole tree. In this promlem, order of the words is important, so I have no idea how to use DP. Please, give some hints. Thanks, just DP Similar to Knapsack(I think) and need to store the previous element to recover the path in the end :) In Knapsack order is not important, but in this problem order is important. How do you deal with order ? KNIGHT0X300 is right. It is an example of DP problem. I got AC using Trie Tree and Knapsack DP. |
| WA #3 | 👨🏻💻 Spatarel Dan Constantin | 1652. Banking Crisis | 1 Jan 2015 00:14 | 1 |
WA #3 👨🏻💻 Spatarel Dan Constantin 1 Jan 2015 00:14 A bank can't buy its own debt. The statement says: “responsible” banks only, i.e., those that credited _OTHER_ banks in the same country |
| c# accepted | pav1uxa | 1243. Divorce of the Seven Dwarfs | 31 Dec 2014 16:46 | 1 |
del Edited by author 06.01.2015 21:37 |
| solution keeps getting marked as incorrect... | noob dev | 1933. Guns for Battle! | 31 Dec 2014 10:51 | 1 |
My solution for "guns for battle" keeps getting marked as wrong and I don't know why. Any ideas? import java.util.*; import java.io.*; public class Gunner{ public static void main(String[] args) throws Exception{ StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in))); PrintWriter out = new PrintWriter(System.out); in.nextToken(); int n = (int)in.nval; int x = (2 * n) + 1;
int r = 1, c=1; while( r <= x) { while(c <= x){ if(r == c) out.print(0+" "); else out.print((r-1) + (c-1))+" "); out.flush(); ++c; } out.println(); out.flush(); c = 1; ++r; } } } |
| Reverse Root 1001 Runtime error C# | Blaine | 1001. Reverse Root | 31 Dec 2014 08:08 | 1 |
I cant figure out how the code receives the input data, if anyone could shed some light on how to fix my code that would be very much appreciated. using System; using System.Collections.Generic; class Program { static void Main() { var rootList = new List<string>();
string aLine = Console.In.ReadToEnd();
string[] separators = {" "};
var arguments = aLine.Split(separators , StringSplitOptions.RemoveEmptyEntries); foreach (var arg in arguments) {
rootList.Add(Math.Sqrt(long.Parse(arg)).ToString("#.####"));
} rootList.Reverse();
foreach(string root in rootList) { Console.WriteLine(root);
}
} } |