Recent Submissions

2026/09/16 13:03:00 hulgas solved Problem0034 (Line: 13)
2026/09/16 12:49:24 kiwi solved Problem0014 (Line: 14)
2026/09/16 12:30:50 hulgas solved Problem0020 (Line: 12)
2026/09/16 12:28:21 hulgas solved Problem0065 (Line: 9)
2026/09/16 12:27:34 tmd solved Problem0085 (Line: 6)
2026/09/16 11:56:57 hulgas solved Problem0063 (Line: 3)
2026/09/16 10:27:28 tmd solved Problem0085 (Line: 9)
2026/09/16 10:26:29 tmd solved Problem0085 (Line: 9)
2026/09/16 10:25:08 hulgas solved Problem0038 (Line: 5)
2026/09/16 10:23:47 hulgas solved Problem0053 (Line: 3)
2026/09/16 07:34:17 kiwi solved Problem0053 (Line: 3)
2026/09/16 07:25:49 kiwi solved Problem0010 (Line: 8)
2026/09/16 06:35:14 kiwi solved Problem0013 (Line: 10)
2026/09/16 03:10:03 krengdroid solved Problem0011 (Line: 11)
2026/09/16 03:09:48 SeptaCube solved Problem0029 (Line: 14)
2026/09/16 02:54:28 SeptaCube solved Problem0030 (Line: 24)
2026/09/16 02:53:44 krengdroid solved Problem0012 (Line: 11)
2026/09/16 02:53:17 SeptaCube solved Problem0031 (Line: 24)
2026/09/16 02:30:42 SeptaCube solved Problem0028 (Line: 22)
2026/09/16 02:21:50 SeptaCube solved Problem0027 (Line: 11)
2026/09/16 02:20:32 SeptaCube solved Problem0026 (Line: 13)
2026/09/16 02:08:58 SeptaCube solved Problem0025 (Line: 8)
2026/09/16 02:05:36 SeptaCube solved Problem0024 (Line: 17)
2026/09/16 02:01:43 SeptaCube solved Problem0023 (Line: 6)
2026/09/16 02:01:17 SeptaCube solved Problem0023 (Line: 8)
2026/09/16 02:00:13 SeptaCube solved Problem0023 (Line: 9)
2026/09/16 01:59:34 SeptaCube solved Problem0022 (Line: 20)
2026/09/16 01:49:11 krengdroid solved Problem0037 (Line: 6)
2026/09/16 01:33:55 krengdroid solved Problem0050 (Line: 2)
2026/09/16 01:29:56 krengdroid solved Problem0020 (Line: 12)
2026/09/15 23:57:43 krengdroid solved Problem0038 (Line: 6)
2026/09/15 23:40:49 JeffJeff solved Problem0019 (Line: 5)
2026/09/15 23:39:37 JeffJeff solved Problem0019 (Line: 10)
2026/09/15 23:36:43 JeffJeff solved Problem0052 (Line: 3)
2026/09/15 23:25:56 krengdroid solved Problem0051 (Line: 3)
2026/09/15 23:25:27 krengdroid solved Problem0050 (Line: 3)
2026/09/15 23:23:17 krengdroid solved Problem0049 (Line: 1)
2026/09/15 23:07:16 krengdroid solved Problem0018 (Line: 7)
2026/09/15 23:03:38 krengdroid solved Problem0025 (Line: 6)
2026/09/15 23:00:57 krengdroid solved Problem0025 (Line: 6)
2026/09/15 22:58:37 krengdroid solved Problem0025 (Line: 7)
2026/09/15 22:46:46 krengdroid solved Problem0014 (Line: 12)
2026/09/15 21:43:04 krengdroid solved Problem0009 (Line: 4)
2026/09/15 21:38:48 krengdroid solved Problem0019 (Line: 5)
2026/09/15 21:30:58 kiwi solved Problem0027 (Line: 10)
2026/09/15 20:31:44 krengdroid solved Problem0018 (Line: 7)
2026/09/15 20:24:48 hioagr solved Problem0050 (Line: 2)
2026/09/15 20:22:15 hioagr solved Problem0049 (Line: 1)
2026/09/15 20:08:52 krengdroid solved Problem0010 (Line: 8)
2026/09/15 20:04:38 krengdroid solved Problem0010 (Line: 7)

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.