Search found 15 matches

by TryCatchMe
Sat Feb 27, 2016 12:22 am
Forum: Volume 6 (600-699)
Topic: 645 - File Mapping
Replies: 2
Views: 4784

Re: 645 - File Mapping

Directories should remain unsorted. Print them in the order they appear in the input as in the sample I/O. Here is output from my AC code for your input. DATA SET 1: ROOT | dir3 | | dir2 | | file1 | | file2 | dir1 file1 file2 file3 file4 DATA SET 2: ROOT file1 file2 DATA SET 3: ROOT DATA SET 4: ROO...
by TryCatchMe
Wed Feb 17, 2016 6:32 pm
Forum: Volume 103 (10300-10399)
Topic: 10374 - Election
Replies: 44
Views: 15035

Re: 10374 - Election

I got WA the first 3 submissions. The judges input is fine and uDebug even explains in an earlier post how to handle reading the i/o. Here is some input I created that pointed out some cases I overlooked. Once I solved this i/o correctly, I got Accepted with NO fancy tricks. In my Accepted program I...
by TryCatchMe
Fri Feb 12, 2016 12:36 pm
Forum: Volume 2 (200-299)
Topic: 271 - Simply Syntax
Replies: 46
Views: 12475

Re: 271 - Simply Syntax

Hello all, First of all, you can do this problem without recursion. It is solve-able using recursion, but definitely not necessary. A recursive solution may not run in time. I will give you all a hint: use a stack! Also, if you think about the problem you will realize you just need a for loop with n...
by TryCatchMe
Tue Feb 09, 2016 10:31 pm
Forum: Other words
Topic: New language: Python ?
Replies: 10
Views: 8594

Re: New language: Python ?

Hey all, even though it is about 14 years later, I thought I'd let you know you can now submit problems with Python!
by TryCatchMe
Wed Feb 03, 2016 8:38 pm
Forum: Volume 124 (12400-12499)
Topic: 12442 - Forwarding Emails
Replies: 31
Views: 14026

Re: 12442 - Forwarding Emails

Hi. Could anyone please help me understand why I'm getting TLE for this problem when I pass all test data provided here. I am using Java and have done re-factoring on the code a few times now. Really starting to feel down about it. Any help would be appreciated. Thank you. import java.util.Arrays; ...
by TryCatchMe
Wed Feb 03, 2016 8:09 pm
Forum: Volume 124 (12400-12499)
Topic: 12442 - Forwarding Emails
Replies: 31
Views: 14026

Re: 12442 - Forwarding Emails

Input: 10 22 1 15 2 19 3 9 4 11 5 10 6 17 7 19 8 19 9 6 10 4 11 17 12 1 13 18 14 11 15 9 16 3 17 9 18 12 19 9 20 4 21 1 22 22 16 1 15 2 15 3 13 4 4 5 9 6 9 7 3 8 3 9 7 10 11 11 2 12 9 13 2 14 6 15 9 16 4 22 1 2 2 11 3 5 4 17 5 21 6 11 7 20 8 5 9 22 10 6 11 7 12 1 13 5 14 1 15 15 16 12 17 15 18 8 19...
by TryCatchMe
Wed Sep 02, 2015 11:23 am
Forum: Volume 7 (700-799)
Topic: 723 - Comment Removal
Replies: 16
Views: 10018

Re: 723 - Comment Removal

Can someone PLEASE post more critical input? I get the same output as all of the above input and cannot figure out why WA. I get the same answers for all of the uDebug sample io as well. Thanks. Also, can someone with AC confrm this... input begin var s := (* some long comment*) ' a string literal o...
by TryCatchMe
Wed Jan 07, 2015 10:45 pm
Forum: Volume 102 (10200-10299)
Topic: 10200 - Prime Time
Replies: 202
Views: 61406

Re: 10200 - Prime Time

This problem was beyond frustrating. I kept getting WA and I knew my algorithm was efficient and correct. I also debugged on uDebug. Once I read the posts here and saw that BrianFry (thank you Brian!) said to add 1e-9 to your final percentage I finally got ACC. I wish the judge would just ask for th...
by TryCatchMe
Sun Jan 04, 2015 10:23 pm
Forum: Volume 101 (10100-10199)
Topic: 10183 - How Many Fibs?
Replies: 66
Views: 23644

Re: 10183 - How Many Fibs?

Some valid ACC I/O: 21 33 22 34 22 33 10 100 100 1000 5000 9000 1234000 123456000 5567 900000000 34556 10000000000000 43324234 85675676576575675675 8678678 345345345345345345353453453 235432435425 4364364653453646353643645656345646345 1 100000000000000000000000 234134 454765765674567457645 123421341...
by TryCatchMe
Sat Jan 03, 2015 4:33 pm
Forum: Volume 101 (10100-10199)
Topic: 10192 - Vacation
Replies: 58
Views: 14424

Re: 10192 - Vacation

Ok, this problem was a pain. I got WA 10 times before I got ACC due to I/O mistakes. If you got WA on this problem it is most likely due to I/O and not your LCS algorithm... and yes basic LCS is enough for this problem. Here is some I/O: abcd caabd a b b a a b a b aaaaaaaaaaaa aaaa bbbbbbb bbbbbbb x...
by TryCatchMe
Sun Dec 28, 2014 12:32 am
Forum: Volume 101 (10100-10199)
Topic: 10147 - Highways
Replies: 67
Views: 20541

Re: 10147 - Highways

I solved this problem in not so great time using the C++ STL priority_queue data structure and Kruskal's algorithm... Kruskal's relies on using a set union data structure which is just an array that keeps track of the i_th vertex's parent in the minimum spanning tree. Mahade- Your nested loops have ...
by TryCatchMe
Tue Dec 23, 2014 9:14 pm
Forum: Volume 101 (10100-10199)
Topic: 10132 - File Fragmentation
Replies: 24
Views: 11275

Re: 10132 - File Fragmentation

I solved this problem with backtracking in 0.015. A hint to those who are lost: for each test case compute the length of the solution string by summing all the input string lengths and dividing by (number of lines / 2) and exploit this in your pruning.
by TryCatchMe
Mon Sep 15, 2014 10:55 pm
Forum: Volume 100 (10000-10099)
Topic: 10000 - Longest Paths
Replies: 160
Views: 36349

Re: 10000 - Longest Paths

I solved this in 0.065s using BFS in C. Consider this test case... 4 1 1 3 1 2 2 3 1 2 0 0 0 ACC output is: Case 1: The longest path from 1 has length 3, finishing at 2. The problem people are having with BFS is most likely due to not revisiting nodes. Although in a BFS you don't visit a node that h...
by TryCatchMe
Fri Jun 20, 2014 11:51 am
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 52313

Re: 10267 - Graphical Editor

brianfry, Is it too much to tell you that I love you, lol? You are extremely helpful for so many of these problems. Anyways, I got 3 WA when I tried to submit the problem. Originally, read the input char by char using getchar() in the C standard library, assuming that there was one space between fie...
by TryCatchMe
Thu Jun 19, 2014 1:16 am
Forum: Volume 100 (10000-10099)
Topic: 10020 - Minimal coverage
Replies: 57
Views: 20602

Re: 10020 - Minimal Coverage

brainfry - Thank you so much for all of your sample IO. You have helped me so much over the past month or so since I started these problems. I really appreciate it. Anyways, to the rest of the people who read this... the description does not say the input will be integers, BUT I used a greedy algori...

Go to advanced search