ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1323. Classmates

Nice problem, but too big time limit...
Posted by Danica Porobic 25 Jul 2004 23:58
1 second is just enough.
Re: Nice problem, but too big time limit...
Posted by Yoyo 4 Sep 2004 22:25
Any hints?
Just brute force :) (-)
Posted by Dmitry 'Diman_YES' Kovalioff 5 Sep 2004 12:43
Re: Nice problem, but too big time limit...
Posted by Aleksey (BMSTU IU7) 30 Sep 2004 01:20
just 0.1 sec.
How can you do it so fast?
Posted by Neumann 5 Feb 2005 10:32
Because of enough time,I used dfs in 0.9sec.
But I think bfs+binary will much faster...

What is your algo?
Re: How can you do it so fast?
Posted by Lifanov 9 Sep 2005 12:35
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.
Re: How can you do it so fast?
Posted by Ilya Rasenstein (Lyceum #40) 6 May 2007 14:35
there is a simple dp-on-subsets solution...
Re: How can you do it so fast?
Posted by SPIRiT 21 Jun 2007 02:08
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'?
Re: How can you do it so fast?
Posted by hoan 8 Dec 2010 19:28
the last can be change.
Re: Nice problem, but too big time limit...
Posted by Jane Soboleva (SumNU) 3 Mar 2016 06:58
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...