Search found 18 matches

by JohnTortugo
Sat Aug 09, 2014 2:51 am
Forum: Volume 5 (500-599)
Topic: 548 - Tree
Replies: 23
Views: 10894

Re: 548 getting TLE

A few inputs:

Input:

Code: Select all

6 1 2 3 5 4
6 1 5 3 2 4
1000 3000 2000 4000 6000 5000 7000
1000 2000 3000 6000 7000 5000 4000
1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
7000 8000 9000 9500 3000
7000 8000 3000 9500 9000
Output:

Code: Select all

6
1000
1000
3000
by JohnTortugo
Fri May 09, 2014 10:50 pm
Forum: Volume 118 (11800-11899)
Topic: 11800 - Determine the Shape
Replies: 47
Views: 13056

Re: 11800 - Determine The Shape

Anyone have more test cases?

brianfry713, my code passes all your test cases but gets WA from the judge =( , do you have any input with corner case?
by JohnTortugo
Sun Apr 12, 2009 8:02 pm
Forum: Volume 106 (10600-10699)
Topic: 10653 - Bombs! NO they are Mines!!
Replies: 36
Views: 18104

Re: 10653 - Bombs! NO they are Mines!!

I've coded it using STL Queue for DFS and it pass easy...

Also I think there isn't a test with no route, anyway my program prints 0x3f3f3f3f in decimal 8)

Good luck, John.
by JohnTortugo
Sat Apr 11, 2009 1:57 am
Forum: Volume 110 (11000-11099)
Topic: 11035 - Card Hands
Replies: 12
Views: 5551

Re: 11035 - Card Hands

Hi, I know its too late, but I'll apreciate if somebody can give me the correct output for the input case below :wink: :

Code: Select all

3
5 6D 7D 8D 9D AH
5 6D 7D 8D 9D AH
5 6D 7D 8D 9D AH
5
5 6D 7D 8D 9D AH
5 6D 7D 8D 9D AH
5 6D 7D 8D 9D AH
4 6D 7D 8D AH
4 6D 7D 8D AH
0
Thank you very much.
John.
by JohnTortugo
Wed Jan 14, 2009 8:50 pm
Forum: Volume 115 (11500-11599)
Topic: 11569 - Lovely Hint
Replies: 8
Views: 1821

Re: 11569 - Lovely Hint

Hi.

Chirag, how are you doing that?
by JohnTortugo
Tue Jan 13, 2009 5:20 pm
Forum: Volume 100 (10000-10099)
Topic: 10082 - WERTYU
Replies: 57
Views: 6904

Re: 10082 - WERTYU

I was using texto = gets(), with texto being char[10000] and was getting wrong answer... after I switch it for c = getchar(), i got AC.
by JohnTortugo
Sat Jan 10, 2009 5:44 pm
Forum: Volume 4 (400-499)
Topic: 436 - Arbitrage (II)
Replies: 17
Views: 5229

Re: 436 - Arbitrage - Clarify please

Hi all. I'm trying to solve this problem using Floyd Warshall... but I'm getting lots of wrong answers... I think the problem isn't with the floyd... but perhaps with the input.... I would apreciate if someone could give me some hint or input case that my program fails... below is my code. #include ...
by JohnTortugo
Tue Jan 06, 2009 3:41 pm
Forum: Algorithms
Topic: How many graphs?
Replies: 4
Views: 1220

Re: How many graphs?

Thanks mf and maxdiver, these links point me for what I was looking for.
by JohnTortugo
Sun Jan 04, 2009 7:48 pm
Forum: Algorithms
Topic: How many graphs?
Replies: 4
Views: 1220

How many graphs?

How many different graphs are with V vertex? The graph should be: Directed, connected, with no self-loops and no "parallel-edges" (namely the same start-point and end-point). I'm trying to solve this problem for a long long time... I really would appreciate if someone can point me some hint. PS: The...
by JohnTortugo
Sun Nov 02, 2008 5:59 pm
Forum: Volume 101 (10100-10199)
Topic: 10194 - Football (aka Soccer)
Replies: 119
Views: 36863

Re: 10194 - Football (aka Soccer)

Hi all.

thanks LIMON. I found my error, it was a "\n" at the end of output. I used only strcasecmp....

But now I'm confused... this shouldn't be a Presentation Error (the "\n" at the end)?

thanks. John.
by JohnTortugo
Mon Oct 20, 2008 4:53 am
Forum: Volume 101 (10100-10199)
Topic: 10194 - Football (aka Soccer)
Replies: 119
Views: 36863

Re: 10194 - Football (aka Soccer)

No one know what is wrong with my code? I think it's a little mistake...

Thanks.
by JohnTortugo
Tue Oct 14, 2008 5:47 pm
Forum: Volume 101 (10100-10199)
Topic: 10194 - Football (aka Soccer)
Replies: 119
Views: 36863

Re: 10194 - Football (aka Soccer)

Hi guys, i'm getting lots of W.A in this problem, i really dont know what's wrong with my code. I'll be glad by any help. Thanks in advance. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <inttypes.h> #include <ctype.h> #include <algorithm> #include <map> #incl...
by JohnTortugo
Mon Aug 25, 2008 6:50 pm
Forum: Volume 101 (10100-10199)
Topic: 10187 - From Dusk Till Dawn
Replies: 50
Views: 17937

Re: 10187 - From Dusk till Dawn

Hello there! I'm trying the following algorithm: 1. Create a directed graph, using city names as vertices and travel time as edges. I ignore all travels that satisfies this condition: (dep > 6 && dep < 18) OR (dep+tt > 30). 2. Do Dijkstra algoritm. I'm using a stl map to lookup what's the city numbe...
by JohnTortugo
Mon Aug 11, 2008 10:59 pm
Forum: Volume 103 (10300-10399)
Topic: 10392 - Factoring Large Numbers
Replies: 14
Views: 7746

Re: 10392 - Factoring Large Numbers

Hello there. I'm getting W.A in this problem, can someone give me some test cases? below is my code. Thanks for any help. #include <iostream> #include <math.h> using namespace std; int main(void) { long long int n; long long int sq; long long int i=0, c=0; while (cin >> n && n >= 0) { if (i) cout <<...
by JohnTortugo
Thu Aug 07, 2008 7:11 pm
Forum: Volume 114 (11400-11499)
Topic: 11462 - Age Sort
Replies: 49
Views: 18280

Re: 11462 - Ages Sort

Ok. Now it runs in 1.5s :oops:

Thanks anyway.

Go to advanced search