Recent Submissions

2026/06/16 01:41:30 cacampu solved Problem0024 (Line: 11)
2026/06/16 01:30:02 cacampu solved Problem0043 (Line: 8)
2026/06/16 01:12:09 cacampu solved Problem0043 (Line: 10)
2026/06/16 00:58:52 __char__ solved Problem0072 (Line: 8)
2026/06/16 00:38:14 cacampu solved Problem0074 (Line: 4)
2026/06/16 00:34:34 Jerry solved Problem0017 (Line: 2)
2026/06/16 00:32:10 Jerry solved Problem0078 (Line: 1)
2026/06/16 00:31:27 Jerry solved Problem0049 (Line: 1)
2026/06/16 00:30:40 Jerry solved Problem0045 (Line: 1)
2026/06/16 00:30:17 __char__ solved Problem0073 (Line: 10)
2026/06/16 00:29:44 Jerry solved Problem0035 (Line: 1)
2026/06/16 00:28:51 Jerry solved Problem0016 (Line: 1)
2026/06/16 00:25:42 cacampu solved Problem0025 (Line: 6)
2026/06/16 00:25:09 cacampu solved Problem0053 (Line: 3)
2026/06/16 00:24:01 Jerry solved Problem0053 (Line: 3)
2026/06/16 00:23:36 cacampu solved Problem0025 (Line: 8)
2026/06/16 00:17:49 Kent477 solved Problem0053 (Line: 3)
2026/06/16 00:09:37 Jerry solved Problem0009 (Line: 4)
2026/06/16 00:04:02 cacampu solved Problem0024 (Line: 20)
2026/06/16 00:03:40 Jerry solved Problem0008 (Line: 3)
2026/06/15 23:52:14 Jerry solved Problem0007 (Line: 3)
2026/06/15 23:50:43 takanen solved Problem0017 (Line: 2)
2026/06/15 23:48:57 Jerry solved Problem0006 (Line: 3)
2026/06/15 23:47:59 Jerry solved Problem0005 (Line: 1)
2026/06/15 23:45:13 takanen solved Problem0016 (Line: 1)
2026/06/15 23:42:28 Jerry solved Problem0004 (Line: 3)
2026/06/15 23:41:09 Jerry solved Problem0003 (Line: 1)
2026/06/15 23:37:07 cacampu solved Problem0023 (Line: 7)
2026/06/15 23:36:36 takanen solved Problem0015 (Line: 16)
2026/06/15 23:34:56 Jerry solved Problem0002 (Line: 1)
2026/06/15 23:34:40 Jerry solved Problem0001 (Line: 1)
2026/06/15 23:32:15 __char__ solved Problem0074 (Line: 4)
2026/06/15 23:31:54 cacampu solved Problem0008 (Line: 3)
2026/06/15 23:26:37 cacampu solved Problem0022 (Line: 16)
2026/06/15 23:19:20 cacampu solved Problem0020 (Line: 12)
2026/06/15 23:17:04 cacampu solved Problem0019 (Line: 5)
2026/06/15 23:15:03 cacampu solved Problem0018 (Line: 7)
2026/06/15 23:01:42 cacampu solved Problem0017 (Line: 2)
2026/06/15 23:00:56 cacampu solved Problem0016 (Line: 1)
2026/06/15 22:59:43 cacampu solved Problem0015 (Line: 15)
2026/06/15 22:55:04 cacampu solved Problem0014 (Line: 18)
2026/06/15 22:54:52 cacampu solved Problem0013 (Line: 14)
2026/06/15 22:46:35 Kent477 solved Problem0037 (Line: 8)
2026/06/15 22:41:17 takanen solved Problem0014 (Line: 12)
2026/06/15 22:39:18 Kent477 solved Problem0062 (Line: 2)
2026/06/15 22:37:20 Kent477 solved Problem0061 (Line: 2)
2026/06/15 22:28:24 Kent477 solved Problem0085 (Line: 14)
2026/06/15 22:26:03 __char__ solved Problem0068 (Line: 5)
2026/06/15 22:24:38 cacampu solved Problem0042 (Line: 2)
2026/06/15 22:12:32 cacampu solved Problem0010 (Line: 7)

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.