Блог пользователя CherryTree

Автор CherryTree, история, 11 лет назад, По-английски

Hello Codeforces community!

I am glad to announce that HackerRank 101 Hack 30th edition will be held on 21th October 2015 at 16:30 UTC. You can sign up for the contest here. Though what's priceless is solving interesting problems and the thrill of competition, prizes make the competition fierce. Top 10 performers will get a HackerRank T-shirt.

Problems have been set by me and tested by wanbo. The contest will consist of 5 problems with variable scoring distribution. We have tried our best to prepare a nice problem set. Hopefully everyone will enjoy. Also, you'll be able to enjoy the detailed editorials written by the setter after the contest.

Good luck and have fun!

  • Проголосовать: нравится
  • +52
  • Проголосовать: не нравится

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Ideas for 3rd??

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve "How Many Solvable Puzzles" I always get TLE

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Was anyone able to use the criteria of solvability on wikipedia for a solution that does not TLE?

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

Any idea on how to solve Four Primes(2nd Question) ?

»
11 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +1 Проголосовать: не нравится

My code for B: http://ideone.com/NPSnTu :D (it got full score)

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Screencast with music

»
11 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +14 Проголосовать: не нравится

How do you solve E with the maximum score? I could only get 85.72 by using Djikstra's algorithm.

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

When will the editorials be available?

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +27 Проголосовать: не нравится

By the way, what does %pic related% button do? I thought that Shortest Path Revisited was the fourth problem since it's exactly what I saw after I followed this link from the 3rd task: look at the bottom-left corner of the picture.

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Why doesn't hashing work in Shortest-path problem(Problem Link) ?Or it does and I did it wrong.

Here's what I did.

  1. Stored count of all pairs of (hash, substring_length) for all possible substrings of s.

  2. Stored 4 items in heap — (cur_distance, cur_node, cur_hash, cur_length).cur_length denotes the length of substring formed on reaching node cur_node from node 1.

  3. Applied Dijkstra.

But I'm getting only 85.71 points and wrong answer on many test cases.Here's my code.