Recent Submissions

2026/02/12 13:28:46 unputdownable solved Problem0027 (Line: 9)
2026/02/12 13:27:06 unputdownable solved Problem0027 (Line: 10)
2026/02/12 13:21:00 unputdownable solved Problem0027 (Line: 11)
2026/02/12 10:22:24 zhuyy solved Problem0064 (Line: 8)
2026/02/12 10:17:59 zhuyy solved Problem0063 (Line: 3)
2026/02/12 10:17:03 zhuyy solved Problem0062 (Line: 2)
2026/02/12 10:15:51 zhuyy solved Problem0061 (Line: 2)
2026/02/12 10:04:33 unputdownable solved Problem0074 (Line: 4)
2026/02/12 01:34:17 unputdownable solved Problem0046 (Line: 6)
2026/02/12 01:31:22 unputdownable solved Problem0041 (Line: 6)
2026/02/12 01:20:09 unputdownable solved Problem0048 (Line: 4)
2026/02/12 00:57:17 unputdownable solved Problem0034 (Line: 5)
2026/02/12 00:46:51 unputdownable solved Problem0034 (Line: 6)
2026/02/12 00:42:45 unputdownable solved Problem0034 (Line: 7)
2026/02/12 00:22:47 unputdownable solved Problem0082 (Line: 10)
2026/02/12 00:22:34 unputdownable solved Problem0082 (Line: 11)
2026/02/12 00:12:37 unputdownable solved Problem0047 (Line: 16)
2026/02/11 22:44:39 unputdownable solved Problem0039 (Line: 4)
2026/02/11 22:15:12 unputdownable solved Problem0024 (Line: 15)
2026/02/11 21:07:13 crocodile solved Problem0013 (Line: 7)
2026/02/11 21:05:22 crocodile solved Problem0012 (Line: 11)
2026/02/11 20:59:49 crocodile solved Problem0011 (Line: 11)
2026/02/11 20:59:38 crocodile solved Problem0011 (Line: 12)
2026/02/11 20:55:56 crocodile solved Problem0010 (Line: 6)
2026/02/11 20:54:59 crocodile solved Problem0010 (Line: 8)
2026/02/11 20:47:01 crocodile solved Problem0009 (Line: 4)
2026/02/11 20:43:58 crocodile solved Problem0008 (Line: 3)
2026/02/11 20:41:28 crocodile solved Problem0007 (Line: 3)
2026/02/11 20:33:18 crocodile solved Problem0006 (Line: 3)
2026/02/11 20:32:43 crocodile solved Problem0005 (Line: 1)
2026/02/11 20:32:04 crocodile solved Problem0004 (Line: 3)
2026/02/11 20:31:13 crocodile solved Problem0003 (Line: 1)
2026/02/11 20:29:16 crocodile solved Problem0002 (Line: 1)
2026/02/11 20:28:57 crocodile solved Problem0001 (Line: 1)
2026/02/11 19:58:31 unputdownable solved Problem0013 (Line: 7)
2026/02/11 19:04:45 unputdownable solved Problem0014 (Line: 9)
2026/02/11 18:53:19 unputdownable solved Problem0013 (Line: 8)
2026/02/11 18:48:09 unputdownable solved Problem0023 (Line: 5)
2026/02/11 18:42:57 unputdownable solved Problem0023 (Line: 6)
2026/02/11 18:42:10 zhuyy solved Problem0053 (Line: 8)
2026/02/11 18:41:10 unputdownable solved Problem0020 (Line: 12)
2026/02/11 18:40:06 unputdownable solved Problem0020 (Line: 13)
2026/02/11 18:35:02 zhuyy solved Problem0052 (Line: 3)
2026/02/11 18:34:34 unputdownable solved Problem0025 (Line: 5)
2026/02/11 18:33:01 zhuyy solved Problem0051 (Line: 3)
2026/02/11 18:32:24 unputdownable solved Problem0038 (Line: 5)
2026/02/11 18:28:20 zhuyy solved Problem0050 (Line: 2)
2026/02/11 18:27:11 zhuyy solved Problem0049 (Line: 1)
2026/02/11 18:26:46 zhuyy solved Problem0048 (Line: 7)
2026/02/11 18:13:53 zhuyy solved Problem0046 (Line: 6)

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.