Recent Submissions

2026/08/30 01:31:38 zzk solved Problem0029 (Line: 8)
2026/08/30 01:30:00 zzk solved Problem0029 (Line: 7)
2026/08/30 00:55:43 zzk solved Problem0028 (Line: 18)
2026/08/30 00:52:05 zzk solved Problem0028 (Line: 19)
2026/08/29 18:14:16 JoatMao solved Problem0027 (Line: 12)
2026/08/29 17:59:29 JoatMao solved Problem0067 (Line: 8)
2026/08/29 17:55:29 JoatMao solved Problem0067 (Line: 10)
2026/08/29 17:55:04 JoatMao solved Problem0067 (Line: 11)
2026/08/29 17:50:12 JoatMao solved Problem0066 (Line: 10)
2026/08/29 17:43:50 JoatMao solved Problem0065 (Line: 9)
2026/08/29 17:39:56 JoatMao solved Problem0085 (Line: 9)
2026/08/29 17:39:09 JoatMao solved Problem0085 (Line: 16)
2026/08/29 17:23:53 JoatMao solved Problem0082 (Line: 12)
2026/08/29 17:19:20 JoatMao solved Problem0081 (Line: 8)
2026/08/29 17:17:59 JoatMao solved Problem0080 (Line: 2)
2026/08/29 17:16:44 JoatMao solved Problem0079 (Line: 4)
2026/08/29 17:15:52 JoatMao solved Problem0079 (Line: 5)
2026/08/29 17:14:04 JoatMao solved Problem0078 (Line: 1)
2026/08/29 17:10:36 JoatMao solved Problem0069 (Line: 3)
2026/08/29 17:07:00 JoatMao solved Problem0064 (Line: 6)
2026/08/29 17:03:25 JoatMao solved Problem0064 (Line: 9)
2026/08/29 17:00:40 JoatMao solved Problem0063 (Line: 3)
2026/08/29 16:58:04 JoatMao solved Problem0062 (Line: 2)
2026/08/29 16:56:58 JoatMao solved Problem0061 (Line: 2)
2026/08/29 16:55:32 JoatMao solved Problem0052 (Line: 3)
2026/08/29 16:54:38 JoatMao solved Problem0051 (Line: 3)
2026/08/29 16:53:42 JoatMao solved Problem0051 (Line: 4)
2026/08/29 16:49:31 JoatMao solved Problem0050 (Line: 2)
2026/08/29 16:48:54 JoatMao solved Problem0049 (Line: 1)
2026/08/29 16:23:32 JoatMao solved Problem0046 (Line: 7)
2026/08/29 16:21:10 JoatMao solved Problem0045 (Line: 1)
2026/08/29 16:20:11 JoatMao solved Problem0038 (Line: 6)
2026/08/29 16:18:00 JoatMao solved Problem0038 (Line: 6)
2026/08/29 16:15:07 JoatMao solved Problem0038 (Line: 7)
2026/08/29 15:57:57 JoatMao solved Problem0037 (Line: 8)
2026/08/29 15:56:27 JoatMao solved Problem0036 (Line: 3)
2026/08/29 15:52:41 JoatMao solved Problem0035 (Line: 1)
2026/08/29 15:42:41 JoatMao solved Problem0032 (Line: 10)
2026/08/29 15:26:27 JoatMao solved Problem0025 (Line: 6)
2026/08/29 15:20:02 JoatMao solved Problem0023 (Line: 8)
2026/08/29 15:19:14 JoatMao solved Problem0023 (Line: 9)
2026/08/29 15:15:12 JoatMao solved Problem0022 (Line: 12)
2026/08/29 02:05:57 zzk solved Problem0027 (Line: 9)
2026/08/29 01:56:19 zzk solved Problem0026 (Line: 10)
2026/08/29 01:41:08 zzk solved Problem0025 (Line: 5)
2026/08/29 01:06:22 zzk solved Problem0025 (Line: 6)
2026/08/29 00:47:47 zzk solved Problem0025 (Line: 6)
2026/08/29 00:43:59 zzk solved Problem0025 (Line: 8)
2026/08/29 00:21:20 zzk solved Problem0024 (Line: 15)
2026/08/28 23:55:29 zzk solved Problem0015 (Line: 13)

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.