Search found 36 matches

by tzupengwang
Sat Apr 20, 2013 9:25 am
Forum: Volume 123 (12300-12399)
Topic: 12350 - Queen Game
Replies: 0
Views: 2303

12350 - Queen Game

Can anyone give a hint on how to solve the problem??
C is up to 10^15.Is there a math solution or there's a quick algorithm?
:)
by tzupengwang
Fri Mar 22, 2013 5:17 am
Forum: Volume 6 (600-699)
Topic: 652 - Eight
Replies: 22
Views: 8119

Re: 652 - Eight

Can anyone help? I applied the A* algorithm but got TLE. I've seen someone AC with pure BFS, which should be much slower. Can anyone give me suggestions to speed up my program, or is there some tricky parts in the I/O? thanks!! /*652*/ #include<stdio.h> #include<string.h> #include<queue> #include<ve...
by tzupengwang
Wed Mar 20, 2013 2:09 pm
Forum: Volume 109 (10900-10999)
Topic: 10969 - Sweet Dream
Replies: 15
Views: 5384

Re: 10969 - Sweet Dream

Or is there a faster math algorithm? :-?
by tzupengwang
Wed Mar 20, 2013 11:23 am
Forum: Volume 11 (1100-1199)
Topic: 1112 - Mice and Maze
Replies: 13
Views: 7469

Re: 1112 - Mice and Maze

BrianFry~Thanks for your advice!! :D
I got AC with Floyd Warshall
but I'm still wondering what's wrong with my Dijkstra Algorithm since it's a single destination shortest path problem!!!
by tzupengwang
Wed Mar 20, 2013 11:00 am
Forum: Volume 109 (10900-10999)
Topic: 10969 - Sweet Dream
Replies: 15
Views: 5384

10969 - Sweet Dream

Can anyone point out what's wrong with my code? I think it's a Monte Carlo problem Is it a precision error or is there a problem with my algorithm? #include<stdio.h> #include<string.h> #include<math.h> #include<algorithm> using namespace std; #define PI (3.14159265) #define MAXN 743 int num; double ...
by tzupengwang
Sat Mar 16, 2013 1:44 pm
Forum: Volume 11 (1100-1199)
Topic: 1112 - Mice and Maze
Replies: 13
Views: 7469

1112 - Mice and Maze

I get WA with this problem. Can anyone tell me the tricky part of this problem or is there any mistake with my code? I turn all edges to the opposite side and run the Dijkstra Algorithm to know the shortest path from every vertex to the exit. The following is my code Thanks~ /*1112*/ #include<stdio....
by tzupengwang
Wed Jan 23, 2013 4:20 pm
Forum: Volume 111 (11100-11199)
Topic: 11153 - Museums
Replies: 16
Views: 9167

Re: 11153 - Museums

Could anyone post some I/O ?
Thanks~ :D
by tzupengwang
Fri Sep 07, 2012 6:02 am
Forum: Volume 119 (11900-11999)
Topic: 11959 - Dice
Replies: 6
Views: 2594

Re: 11959 - Dice

Wow~I didn't notice that, maybe there's a problem about my submission, I got AC now!
by tzupengwang
Thu Sep 06, 2012 2:19 pm
Forum: Volume 119 (11900-11999)
Topic: 11959 - Dice
Replies: 6
Views: 2594

Re: 11959 - Dice

I was struggling with the problem and at the end I decided to state the 24 possibilities of a dice and compare it one by one?I'm curious why I get WA!! Can anyone help? thanks :D /*11959*/ #include<stdio.h> #include<algorithm> using namespace std; int in; int s1[7],s2[7]; int opp[11]; void READ() { ...
by tzupengwang
Tue Aug 21, 2012 4:42 pm
Forum: Volume 102 (10200-10299)
Topic: 10226 - Hardwood Species
Replies: 121
Views: 38108

Re: 10226 - Hardwood Species

Thanks for your advice
I get AC in 2.108s now
by tzupengwang
Tue Aug 21, 2012 3:34 pm
Forum: Volume 111 (11100-11199)
Topic: 11136 - Hoax or what
Replies: 31
Views: 17687

Re: 11136 - Hoax or what

I'm still a new user of "set"
Thank you very much ~
I get AC now!!
by tzupengwang
Mon Aug 20, 2012 9:34 am
Forum: Volume 111 (11100-11199)
Topic: 11136 - Hoax or what
Replies: 31
Views: 17687

Re: 11136 - Hoax or what

I am getting WA with this problem
I use "multiset" to store all the bills
and I am wondering where the mistake is?
Can anyone help? Thanks!!

Code: Select all

/*11136*/
Removed after AC
by tzupengwang
Sat Aug 18, 2012 7:28 am
Forum: Volume 102 (10200-10299)
Topic: 10226 - Hardwood Species
Replies: 121
Views: 38108

Re: 10226 - Hardwood Species

I'm getting TLE now
I am using getline() and cout()
I'm wondering how to read &write"string" with gets() and printf()
or how to convert string with *char
the following is my code~
Can anyone help?

Code: Select all

/*10226*/
Removed after AC

by tzupengwang
Wed Aug 15, 2012 7:27 pm
Forum: Volume 102 (10200-10299)
Topic: 10281 - Average Speed
Replies: 39
Views: 14881

Re: 10281 - Average Speed

I get AC now~
But it's not a precision problem
it's a input problem with the first line
it's not necessary to have a "speed" input at the end of the first line
Thank you very for your help !!!
I really appreciate it
by tzupengwang
Sat Aug 11, 2012 6:45 pm
Forum: Volume 102 (10200-10299)
Topic: 10281 - Average Speed
Replies: 39
Views: 14881

Re: 10281 - Average Speed

Thanks for your help
I alter my codes again, which do not overflow and gets right with your I/O
However, I am still receiving WA!
What other problem is happening?

Go to advanced search