Recent Submissions

2026/09/25 02:53:50 kiwi solved Problem0028 (Line: 20)
2026/09/25 02:40:51 kiwi solved Problem0031 (Line: 15)
2026/09/25 02:40:38 kiwi solved Problem0030 (Line: 15)
2026/09/25 02:36:17 kiwi solved Problem0029 (Line: 15)
2026/09/25 02:35:55 kiwi solved Problem0029 (Line: 16)
2026/09/25 02:34:44 kiwi solved Problem0029 (Line: 17)
2026/09/25 02:08:29 kiwi solved Problem0015 (Line: 14)
2026/09/25 00:05:18 kiwi solved Problem0014 (Line: 9)
2026/09/24 23:50:50 kiwi solved Problem0013 (Line: 8)
2026/09/24 23:45:32 kiwi solved Problem0010 (Line: 7)
2026/09/24 23:31:05 kiwi solved Problem0024 (Line: 19)
2026/09/24 18:23:32 kiwi solved Problem0084 (Line: 21)
2026/09/24 14:34:17 kiwi solved Problem0083 (Line: 18)
2026/09/24 14:05:50 kiwi solved Problem0040 (Line: 9)
2026/09/24 14:01:03 kiwi solved Problem0039 (Line: 9)
2026/09/24 13:58:52 kiwi solved Problem0039 (Line: 10)
2026/09/24 13:17:01 kiwi solved Problem0024 (Line: 17)
2026/09/24 00:40:04 kiwi solved Problem0043 (Line: 27)
2026/09/23 23:56:33 Naky solved Problem0010 (Line: 8)
2026/09/23 23:49:02 Naky solved Problem0010 (Line: 8)
2026/09/23 23:44:38 Naky solved Problem0009 (Line: 4)
2026/09/23 23:41:54 Naky solved Problem0009 (Line: 5)
2026/09/23 23:38:27 Naky solved Problem0008 (Line: 3)
2026/09/23 23:35:48 Naky solved Problem0007 (Line: 3)
2026/09/23 23:35:16 Naky solved Problem0006 (Line: 3)
2026/09/23 23:34:45 Naky solved Problem0005 (Line: 1)
2026/09/23 23:34:03 Naky solved Problem0004 (Line: 3)
2026/09/23 23:33:40 Naky solved Problem0003 (Line: 1)
2026/09/23 23:33:19 Naky solved Problem0002 (Line: 1)
2026/09/23 23:32:47 Naky solved Problem0001 (Line: 1)
2026/09/23 22:47:29 kiwi solved Problem0015 (Line: 15)
2026/09/23 22:33:54 kiwi solved Problem0014 (Line: 10)
2026/09/23 20:52:45 kiwi solved Problem0014 (Line: 11)
2026/09/23 20:41:39 kiwi solved Problem0010 (Line: 7)
2026/09/23 20:37:12 hulgas solved Problem0023 (Line: 5)
2026/09/23 20:35:38 kiwi solved Problem0023 (Line: 5)
2026/09/23 20:09:42 kiwi solved Problem0023 (Line: 6)
2026/09/23 19:55:14 kiwi solved Problem0041 (Line: 7)
2026/09/23 19:53:50 kiwi solved Problem0041 (Line: 10)
2026/09/23 16:27:25 kiwi solved Problem0025 (Line: 6)
2026/09/23 16:12:43 kiwi solved Problem0052 (Line: 3)
2026/09/23 15:55:43 hulgas solved Problem0069 (Line: 3)
2026/09/23 09:52:53 kiwi solved Problem0079 (Line: 5)
2026/09/23 09:49:49 kiwi solved Problem0054 (Line: 23)
2026/09/23 03:17:10 cici0729 solved Problem0001 (Line: 1)
2026/09/22 20:58:49 kiwi solved Problem0085 (Line: 11)
2026/09/22 20:50:22 kiwi solved Problem0058 (Line: 45)
2026/09/22 20:22:43 kiwi solved Problem0073 (Line: 18)
2026/09/22 20:22:32 kiwi solved Problem0073 (Line: 20)
2026/09/22 20:22:22 kiwi solved Problem0073 (Line: 21)

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.