Recent Submissions

2026/01/14 14:17:02 NoName14159 solved Problem0034 (Line: 6)
2026/01/14 11:25:47 jonathanpaulson2 solved Problem0009 (Line: 4)
2026/01/14 11:24:49 jonathanpaulson2 solved Problem0008 (Line: 3)
2026/01/14 11:24:16 jonathanpaulson2 solved Problem0007 (Line: 3)
2026/01/14 11:23:58 jonathanpaulson2 solved Problem0006 (Line: 3)
2026/01/14 11:23:36 jonathanpaulson2 solved Problem0005 (Line: 1)
2026/01/14 11:23:23 jonathanpaulson2 solved Problem0004 (Line: 3)
2026/01/14 11:22:51 jonathanpaulson2 solved Problem0003 (Line: 1)
2026/01/14 11:22:02 jonathanpaulson2 solved Problem0002 (Line: 1)
2026/01/14 11:21:52 jonathanpaulson2 solved Problem0001 (Line: 1)
2026/01/13 17:20:03 williamjaackson solved Problem0038 (Line: 5)
2026/01/13 17:18:36 williamjaackson solved Problem0038 (Line: 33)
2026/01/13 17:08:26 protein_powder solved Problem0038 (Line: 5)
2026/01/13 16:45:44 williamjaackson solved Problem0011 (Line: 11)
2026/01/13 16:42:37 williamjaackson solved Problem0011 (Line: 28)
2026/01/13 16:37:13 williamjaackson solved Problem0011 (Line: 31)
2026/01/13 09:55:09 williamjaackson solved Problem0027 (Line: 64)
2026/01/13 09:35:54 williamjaackson solved Problem0053 (Line: 3)
2026/01/13 09:30:28 williamjaackson solved Problem0024 (Line: 42)
2026/01/13 09:28:16 williamjaackson solved Problem0024 (Line: 42)
2026/01/13 09:27:52 williamjaackson solved Problem0024 (Line: 42)
2026/01/13 09:22:53 williamjaackson solved Problem0023 (Line: 8)
2026/01/13 09:22:43 williamjaackson solved Problem0023 (Line: 9)
2026/01/13 09:15:07 williamjaackson solved Problem0020 (Line: 13)
2026/01/13 09:12:37 williamjaackson solved Problem0019 (Line: 10)
2026/01/13 09:03:15 williamjaackson solved Problem0018 (Line: 7)
2026/01/13 09:01:14 williamjaackson solved Problem0017 (Line: 2)
2026/01/13 08:59:45 williamjaackson solved Problem0016 (Line: 1)
2026/01/13 08:57:54 williamjaackson solved Problem0016 (Line: 16)
2026/01/13 08:50:03 williamjaackson solved Problem0015 (Line: 26)
2026/01/12 22:31:26 hyman00 solved Problem0044 (Line: 6)
2026/01/12 22:30:11 hyman00 solved Problem0044 (Line: 7)
2026/01/12 19:45:01 williamjaackson solved Problem0013 (Line: 14)
2026/01/12 19:29:28 williamjaackson solved Problem0010 (Line: 7)
2026/01/12 19:29:06 williamjaackson solved Problem0009 (Line: 4)
2026/01/12 19:26:15 williamjaackson solved Problem0008 (Line: 3)
2026/01/12 19:25:46 williamjaackson solved Problem0007 (Line: 3)
2026/01/12 19:25:20 williamjaackson solved Problem0006 (Line: 3)
2026/01/12 19:25:06 williamjaackson solved Problem0005 (Line: 1)
2026/01/12 19:24:55 williamjaackson solved Problem0004 (Line: 3)
2026/01/12 19:24:41 williamjaackson solved Problem0003 (Line: 1)
2026/01/12 19:24:21 williamjaackson solved Problem0002 (Line: 1)
2026/01/12 19:24:10 williamjaackson solved Problem0001 (Line: 1)
2026/01/12 18:57:25 protein_powder solved Problem0010 (Line: 7)
2026/01/12 18:50:54 protein_powder solved Problem0009 (Line: 4)
2026/01/12 18:48:00 protein_powder solved Problem0009 (Line: 4)
2026/01/12 18:39:25 protein_powder solved Problem0008 (Line: 3)
2026/01/12 18:38:12 halchihal solved Problem0042 (Line: 2)
2026/01/12 18:33:15 halchihal solved Problem0019 (Line: 5)
2026/01/12 18:25:44 halchihal solved Problem0006 (Line: 3)

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.