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...
BrianFry~Thanks for your advice!!
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!!!
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 ...
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....
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() { ...
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?
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
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?