Hi alex,
In the worst case, there're roughly 5^18=3814697265625 states. Did you assume that the tree will not grow up so rapidly, or you have proved an upper bound?
Thanks
To little joey: The random input generator was written by me. I made a mistake at the first time, that the heat generated by Chemical i + Chmical j was not equal to that of Chemical j + Chemical i. I corrected that error but I didn't notice(and had no sense) that the final product must be the same. ...
I'd solved this problem right on the very first or second day it was added to OJ but later I got WA on correct rejudgement. Hope to solve it soon but right now I'm little busy with other things. I hope I could make you understand what exactly is asked for in this problem. If you think your solution...
Thank you Whinii,
I slightly modified my program but still got WA.
It seems there are some hidden bugs I cannot see.
I'll check it another time.
Thanks again!
I got trouble in solving this problem. So many people could solve that problem, but not me. :oops: My algo is to test all edges and all vertices. When I fix a candidate symmetric line, I check each vertex one by one that lies on different side of that line. Here is some test data I made 4 -1000 0 0 ...
Hello Everybody, Now I'm working on a problem which can be modelled as a minimization of a sawtooth function. I wonder whether it can be solved in O(n) or not. Since there are so many experts here, I would like to ask for your help. A sawtooth function is something like that: http://www.oz.nthu.edu....
No, one envelope can appear just one time my AC program for this input is Case #1 cannot buy this is a matching problem but no need to use maximum flow Yes, I found that for problem says N >= M. But I have a question, that we can determine if an answer exists or not by maximum flow. Besides that, h...
I wanna say something. first, the judge is wrong. actually i think this is an NP-complete problem, but Adil's algorithm works, which is polynomial running time. i first guess this is just an approximation algorithm, but, after the algorithm, i verified that it doesn't invite all the politicians! th...
Hello Neal, I just got AC and generated an input file to compare my answer with yours. The following is one of the case that differs: 1 2 4 1 M 9 4 Y 7 1 E 2 2 B 6 4 W 9 1 N 6 3 F The answer is obvious, but your program cannot output correctly. If you need more random generated i/o, write pm to me.