|
|
back to board1 second is just enough. just 0.1 sec. Because of enough time,I used dfs in 0.9sec. But I think bfs+binary will much faster... What is your algo? I used dfs and get AC with 2.1 sec. Then i use simple optimization and get Ac with 0.17 sec? It's very simple. there is a simple dp-on-subsets solution... I tried to solve it with dp-on-subsets but WA at test 7. Any hints? Also, when I use stricmp in C++, I get CE. Is this function illegal? Also, are the names unique in case-sensitive sense, or case insensitive? Does the last line in file always contain word 'Tanya'? AC with the help of "if currentTime - startTime > 3.98 then exit"~ Without this limitation, it works almost full 40 seconds on test with maxed N and M. I feel too lazy to think of effecient ways when i see such a generous time limit... |
|
|