Recent Submissions

2026/09/15 01:31:57 JeffJeff solved Problem0063 (Line: 3)
2026/09/14 22:31:02 hioagr solved Problem0079 (Line: 5)
2026/09/14 22:28:15 hioagr solved Problem0078 (Line: 1)
2026/09/14 20:16:31 hulgas solved Problem0069 (Line: 3)
2026/09/14 18:39:04 kiwi solved Problem0040 (Line: 11)
2026/09/14 18:33:50 kiwi solved Problem0034 (Line: 22)
2026/09/14 18:00:04 kiwi solved Problem0048 (Line: 5)
2026/09/14 17:41:13 kiwi solved Problem0039 (Line: 11)
2026/09/14 17:36:16 hulgas solved Problem0053 (Line: 26)
2026/09/14 14:49:48 hulgas solved Problem0043 (Line: 28)
2026/09/14 14:49:20 hulgas solved Problem0043 (Line: 29)
2026/09/14 14:08:47 hulgas solved Problem0079 (Line: 5)
2026/09/14 13:00:20 JeffJeff solved Problem0023 (Line: 6)
2026/09/14 12:52:43 JeffJeff solved Problem0080 (Line: 2)
2026/09/14 12:49:26 JeffJeff solved Problem0078 (Line: 1)
2026/09/14 12:47:07 JeffJeff solved Problem0050 (Line: 2)
2026/09/14 12:46:11 JeffJeff solved Problem0062 (Line: 2)
2026/09/14 12:45:01 JeffJeff solved Problem0061 (Line: 2)
2026/09/14 12:39:08 JeffJeff solved Problem0049 (Line: 1)
2026/09/14 12:35:18 kiwi solved Problem0038 (Line: 9)
2026/09/14 12:35:03 JeffJeff solved Problem0045 (Line: 1)
2026/09/14 12:34:46 JeffJeff solved Problem0035 (Line: 1)
2026/09/14 12:30:07 JeffJeff solved Problem0017 (Line: 2)
2026/09/14 12:28:08 JeffJeff solved Problem0016 (Line: 1)
2026/09/14 12:15:34 kiwi solved Problem0062 (Line: 2)
2026/09/14 12:09:23 hulgas solved Problem0044 (Line: 15)
2026/09/14 11:47:19 hulgas solved Problem0048 (Line: 4)
2026/09/14 11:40:57 hulgas solved Problem0048 (Line: 7)
2026/09/14 11:40:46 hulgas solved Problem0048 (Line: 13)
2026/09/14 11:24:25 hulgas solved Problem0013 (Line: 10)
2026/09/14 08:14:21 hulgas solved Problem0028 (Line: 27)
2026/09/14 07:34:06 kiwi solved Problem0044 (Line: 7)
2026/09/14 05:27:28 wintorse solved Problem0085 (Line: 6)
2026/09/14 05:16:53 wintorse solved Problem0085 (Line: 12)
2026/09/14 04:49:59 JeffJeff solved Problem0085 (Line: 9)
2026/09/14 04:45:46 wintorse solved Problem0053 (Line: 3)
2026/09/14 04:43:54 wintorse solved Problem0007 (Line: 3)
2026/09/14 04:43:29 JeffJeff solved Problem0008 (Line: 3)
2026/09/14 04:42:27 wintorse solved Problem0006 (Line: 3)
2026/09/14 04:41:25 wintorse solved Problem0005 (Line: 1)
2026/09/14 04:40:13 wintorse solved Problem0004 (Line: 3)
2026/09/14 04:39:17 wintorse solved Problem0009 (Line: 4)
2026/09/14 04:31:25 JeffJeff solved Problem0007 (Line: 3)
2026/09/14 04:30:38 JeffJeff solved Problem0006 (Line: 3)
2026/09/14 04:29:57 JeffJeff solved Problem0005 (Line: 1)
2026/09/14 04:29:31 JeffJeff solved Problem0004 (Line: 3)
2026/09/14 04:28:36 JeffJeff solved Problem0003 (Line: 1)
2026/09/14 04:28:16 JeffJeff solved Problem0002 (Line: 1)
2026/09/14 04:27:54 JeffJeff solved Problem0001 (Line: 1)
2026/09/13 20:26:07 hulgas solved Problem0015 (Line: 18)

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.