Search found 139 matches

by metaphysis
Tue Jun 21, 2016 4:13 pm
Forum: Volume 2 (200-299)
Topic: 233 - Package Pricing
Replies: 2
Views: 1800

Re: 233 - Package Pricing

There are multi dataset, print a blank line after every dataset. Use DP or you will get TLE.
by metaphysis
Thu Jun 16, 2016 5:41 am
Forum: Volume 2 (200-299)
Topic: 217 - Radio Direction Finder
Replies: 2
Views: 1063

Re: 217 - Radio Direction Finder

Aha, got AC!
by metaphysis
Thu Jun 16, 2016 5:37 am
Forum: Volume 2 (200-299)
Topic: 217 - Radio Direction Finder
Replies: 2
Views: 1063

Re: 217 - Radio Direction Finder

Can anyone give me some test cases?
by metaphysis
Tue Jun 14, 2016 4:24 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 184428

Re: 100 - The 3n + 1 problem

Try input: 999999 1 To avoid TLE, you should use memoization to store the results calculated, use it directly instead of calculating it again. For example, n = 21, the sequences below produced: 21 64 32 16 8 4 2 1 so, when you got the steps of 21, you can calculate the steps of 64 by add 1 step.
by metaphysis
Tue Jun 14, 2016 4:11 pm
Forum: Volume 2 (200-299)
Topic: 292 - Presentation Error
Replies: 8
Views: 6217

Re: 292 - Presentation Error

Any special or critical test cases? My code always got WA, I tried the test cases on uDebug, It's OK.
by metaphysis
Mon Jun 13, 2016 5:40 am
Forum: Volume 2 (200-299)
Topic: 249 - Bang the Drum Slowly
Replies: 2
Views: 1050

Re: 249 - Bang the Drum Slowly

I used memoization to store results and got AC. Thank you, spencereir!
by metaphysis
Sun Jun 12, 2016 4:19 am
Forum: Volume 2 (200-299)
Topic: 249 - Bang the Drum Slowly
Replies: 2
Views: 1050

Re: 249 - Bang the Drum Slowly

Can anybody solved this problem?
It's seem to be a simple problem involving simulation and recursion, but I always got TLE, I double checked my code and couldn't figure out why, can anyone give me some critical test cases or hints? Thanks in advance!
by metaphysis
Thu Jun 09, 2016 2:24 pm
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 4
Views: 1428

Re: 272 - TEX Quotes

You can use code below to read input.

Code: Select all

cin.unsetf(ios::skipws);
char input;
while (cin >> input)
{
    ...    
}
by metaphysis
Thu Jun 09, 2016 9:59 am
Forum: Volume 2 (200-299)
Topic: 293 - Bits
Replies: 8
Views: 2558

Re: 293 - Bits

The test data is tricky. Problem statement have no mention about handing with cases provided by mf.
by metaphysis
Wed Jun 08, 2016 7:16 am
Forum: Volume 2 (200-299)
Topic: 262 - Transferable Voting
Replies: 22
Views: 9895

Re: 262 - Transferable Voting

Weird input again, please refer to Project's post above.
by metaphysis
Tue Jun 07, 2016 10:55 am
Forum: Volume 2 (200-299)
Topic: 285 - Crosswords
Replies: 16
Views: 9229

Re: 285 - Crosswords

Weird problem statement. 1)Extra spaces may inserted before a row in the solution. 2)Spaces may removed from the start/end/middle of a row in the solution. the minimal width and height means the right margin and bottom margin of crossword counting from (1,1). for examle: alas 2 1 r # 4 1 alas$ the c...
by metaphysis
Sun Jun 05, 2016 5:53 am
Forum: Volume 2 (200-299)
Topic: 286 - Dead Or Not -- That Is The Question
Replies: 19
Views: 5098

Re: 286 - Dead Or Not -- That Is The Question

The problem statement is not so clear.
When a pawn is in the 8th row, do I have to count it as any potentially promoted piece?
NO, you can assume that potential promotion already took place. so, a pawn in the 8th row is just a pawn.
The input is given as row by row, first a1 - h1, then a2 - h2, etc.
by metaphysis
Fri Jun 03, 2016 7:54 am
Forum: Volume 2 (200-299)
Topic: 283 - Compress
Replies: 16
Views: 6203

Re: 283 - Compress

The problem statement is not so clear, after try some time, I got AC. As mentioned before, you can use all bit length code, but every time you used a code, the "prefix" is get longer, for example, the sample input: 2 3 Hello Contestant,$ Please write a program which gives$ the text Hello world.$ 1 T...
by metaphysis
Thu Jun 02, 2016 4:04 am
Forum: Volume 2 (200-299)
Topic: 226 - MIDI Preprocessing
Replies: 1
Views: 916

Re: 226 - MIDI Preprocessing

Some test cases and accepted output. 0 ON 60 10 ON 60 12 OFF 60 20 OFF 60 20 ON 60 30 OFF 60 30 ON 60 40 OFF 60 40 ON 60 60 OFF 60 -1 0 ON 60 5 ON 70 10 ON 60 10 OFF 60 15 OFF 70 15 ON 70 20 OFF 60 20 OFF 70 -1 0 ON 60 1 OFF 60 1 ON 60 10 OFF 60 -1 0 ON 60 2 ON 60 3 ON 60 4 ON 60 5 ON 60 6 ON 60 7 O...
by metaphysis
Tue May 31, 2016 5:00 am
Forum: Volume 2 (200-299)
Topic: 243 - Theseus and the Minotaur (II)
Replies: 22
Views: 7570

Re: 243 - Theseus and the Minotaur (II)

Some test cases and AC output. A:BCD D:BACG F:HE G:HED B:AD E:FGH H:FEG C:AD @ACFH A:BCD D:BACG F:HE G:HED B:AD E:FGH H:FEG C:AD @ABAC A:BCD D:BACG F:HE G:HED B:AD E:FGH H:FEG C:AD @ACDG D:G G:ED E:GH H:E @DGGE A:BC B:CA C:AB @ABBC # Theseus is killed between D and G The Minotaur is slain in D The M...

Go to advanced search