Recent Submissions

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)
2026/08/28 23:05:41 zzk solved Problem0023 (Line: 5)
2026/08/28 23:02:12 zzk solved Problem0023 (Line: 6)
2026/08/28 23:01:17 zzk solved Problem0023 (Line: 7)
2026/08/28 22:51:49 zzk solved Problem0023 (Line: 9)
2026/08/28 21:08:35 zzk solved Problem0022 (Line: 12)
2026/08/28 20:57:25 zzk solved Problem0020 (Line: 12)
2026/08/28 20:53:56 zzk solved Problem0014 (Line: 8)
2026/08/28 20:52:34 zzk solved Problem0014 (Line: 9)
2026/08/28 20:47:21 JoatMao solved Problem0020 (Line: 22)
2026/08/28 20:42:14 JoatMao solved Problem0019 (Line: 5)
2026/08/28 20:41:57 JoatMao solved Problem0019 (Line: 6)
2026/08/28 20:41:16 zzk solved Problem0019 (Line: 5)
2026/08/28 20:29:34 zzk solved Problem0018 (Line: 7)
2026/08/28 20:29:03 zzk solved Problem0018 (Line: 7)
2026/08/28 20:26:49 zzk solved Problem0017 (Line: 2)
2026/08/28 20:26:20 zzk solved Problem0016 (Line: 1)
2026/08/28 20:24:18 JoatMao solved Problem0019 (Line: 10)
2026/08/28 20:23:55 zzk solved Problem0015 (Line: 16)
2026/08/28 20:20:15 JoatMao solved Problem0018 (Line: 7)
2026/08/28 20:18:24 JoatMao solved Problem0017 (Line: 2)
2026/08/28 20:16:51 JoatMao solved Problem0016 (Line: 1)
2026/08/28 20:13:46 JoatMao solved Problem0015 (Line: 17)
2026/08/28 20:08:45 zzk solved Problem0014 (Line: 10)
2026/08/28 20:05:14 JoatMao solved Problem0014 (Line: 16)
2026/08/28 20:03:43 zzk solved Problem0014 (Line: 11)
2026/08/28 19:56:05 JoatMao solved Problem0013 (Line: 10)
2026/08/28 19:55:26 zzk solved Problem0013 (Line: 10)
2026/08/28 19:53:47 zzk solved Problem0013 (Line: 7)
2026/08/28 19:46:25 JoatMao solved Problem0012 (Line: 11)
2026/08/28 19:41:10 JoatMao solved Problem0011 (Line: 11)
2026/08/28 19:32:02 JoatMao solved Problem0010 (Line: 7)
2026/08/28 19:24:07 JoatMao solved Problem0009 (Line: 4)
2026/08/28 19:20:45 JoatMao solved Problem0008 (Line: 3)
2026/08/28 19:19:49 JoatMao solved Problem0008 (Line: 3)
2026/08/28 19:18:06 JoatMao solved Problem0007 (Line: 3)
2026/08/28 19:17:27 JoatMao solved Problem0006 (Line: 3)
2026/08/28 19:16:36 JoatMao solved Problem0005 (Line: 1)
2026/08/28 19:16:06 JoatMao solved Problem0004 (Line: 3)
2026/08/28 19:14:41 JoatMao solved Problem0003 (Line: 1)
2026/08/28 19:13:29 JoatMao solved Problem0002 (Line: 1)
2026/08/28 19:12:48 JoatMao solved Problem0001 (Line: 1)
2026/08/25 03:27:05 tonba solved Problem0080 (Line: 2)

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.