Recent Submissions

2025/04/16 01:36:55 hatena solved Problem0004 (Line: 3)
2025/04/16 01:33:49 hatena solved Problem0003 (Line: 1)
2025/04/16 01:32:02 hatena solved Problem0003 (Line: 2)
2025/04/16 01:30:50 hatena solved Problem0002 (Line: 1)
2025/04/16 01:30:24 hatena solved Problem0001 (Line: 1)
2025/04/10 17:09:31 ChaiAndChill solved Problem0080 (Line: 2)
2025/04/10 06:49:43 sfiction solved Problem0081 (Line: 8)
2025/04/10 06:48:11 sfiction solved Problem0081 (Line: 8)
2025/04/10 06:47:55 sfiction solved Problem0081 (Line: 9)
2025/04/10 06:47:17 sfiction solved Problem0081 (Line: 8)
2025/04/10 05:14:51 sfiction solved Problem0027 (Line: 13)
2025/04/08 05:13:44 aspiranek solved Problem0079 (Line: 4)
2025/04/08 05:10:54 aspiranek solved Problem0079 (Line: 5)
2025/04/08 05:07:15 aspiranek solved Problem0078 (Line: 1)
2025/04/08 02:40:51 aspiranek solved Problem0023 (Line: 5)
2025/04/08 01:47:20 aspiranek solved Problem0013 (Line: 7)
2025/04/08 01:38:08 aspiranek solved Problem0012 (Line: 11)
2025/04/08 01:28:21 aspiranek solved Problem0011 (Line: 11)
2025/04/08 01:23:05 aspiranek solved Problem0009 (Line: 4)
2025/04/08 01:22:21 aspiranek solved Problem0009 (Line: 5)
2025/04/08 01:20:22 aspiranek solved Problem0005 (Line: 1)
2025/04/08 01:19:52 aspiranek solved Problem0006 (Line: 3)
2025/04/08 01:18:48 aspiranek solved Problem0004 (Line: 4)
2025/04/08 01:17:40 aspiranek solved Problem0001 (Line: 1)
2025/04/07 04:53:22 aspiranek solved Problem0062 (Line: 2)
2025/04/07 04:50:45 aspiranek solved Problem0007 (Line: 3)
2025/04/07 04:20:33 aspiranek solved Problem0010 (Line: 8)
2025/04/07 00:17:12 aspiranek solved Problem0063 (Line: 3)
2025/04/07 00:14:32 aspiranek solved Problem0061 (Line: 2)
2025/04/06 20:30:29 aspiranek solved Problem0008 (Line: 3)
2025/04/06 20:13:37 aspiranek solved Problem0003 (Line: 1)
2025/04/06 20:12:38 aspiranek solved Problem0002 (Line: 1)
2025/04/06 16:17:49 Uika solved Problem0064 (Line: 8)
2025/04/06 16:16:12 Uika solved Problem0064 (Line: 9)
2025/04/06 16:09:17 Uika solved Problem0052 (Line: 3)
2025/04/06 16:04:21 sfiction solved Problem0037 (Line: 8)
2025/04/06 16:02:00 Uika solved Problem0023 (Line: 5)
2025/04/06 12:14:26 Uika solved Problem0010 (Line: 6)
2025/04/06 02:01:32 sfiction solved Problem0013 (Line: 9)
2025/04/06 01:08:33 heyshb solved Problem0025 (Line: 7)
2025/04/06 01:07:55 sfiction solved Problem0025 (Line: 7)
2025/04/06 00:52:30 heyshb solved Problem0011 (Line: 11)
2025/04/06 00:43:54 heyshb solved Problem0036 (Line: 3)
2025/04/06 00:43:30 sfiction solved Problem0010 (Line: 6)
2025/04/06 00:42:48 heyshb solved Problem0035 (Line: 1)
2025/04/06 00:34:03 heyshb solved Problem0010 (Line: 7)
2025/04/05 21:37:40 sfiction solved Problem0028 (Line: 18)
2025/04/05 21:06:45 sfiction solved Problem0028 (Line: 19)
2025/04/05 18:23:00 heyshb solved Problem0019 (Line: 5)
2025/04/05 15:14:51 sfiction solved Problem0063 (Line: 3)

News

About

Markov Algorithm

quote from wikipedia:

The Rules is a sequence of pair of strings, usually presented in the form of pattern → replacement. Each rule may be either ordinary or terminating.

Given an input string:

  1. Check the Rules in order from top to bottom to see whether any of the patterns can be found in the input string.
  2. If none is found, the algorithm stops.
  3. If one (or more) is found, use the first of them to replace the leftmost occurrence of matched text in the input string with its replacement. If the rule just applied was a terminating one, the algorithm stops.
  4. Go to step 1.

Note that after each rule application the search starts over from the first rule.

Syntax and Limitations

pattern:replacement This is ordinary rule. Replace first occurrence of pattern to replacement.
pattern::replacement This is terminating rule. Replace first occurrence of pattern to replacement and the algorithm stops.
empty pattern Empty string matches to the beginning of a string.
comments Lines not containing : are regarded as comments.
spaces Leading/trailing spaces in pattern/replacement are ignored.
step limit The number of replacements must not 50000 times.
string length limit The length of input string must not exceed 500 at any moment.
code length limit The length of the code must not exceed 1000 including comments and blanks.

Specifications

  • Your code will be accepted if it runs correctly for all testcases prepared by the problem writer.
  • The score is calculated based on the number of lines of replacement rules.
  • Scoring formula is min(900*Best / Yours + 100, 1000).
  • The fastest player who solved in fewest lines becomes Top player.
  • However the writer cannot become Top player and his/her solution isn't applied to Best.
  • Testcase hack is not allowed. If I find it, I will edit testcases and run rejudge.