Recent Submissions

2026/06/17 01:13:41 __char__ solved Problem0042 (Line: 2)
2026/06/16 22:59:01 __char__ solved Problem0053 (Line: 3)
2026/06/16 22:58:10 takanen solved Problem0027 (Line: 9)
2026/06/16 22:50:43 __char__ solved Problem0027 (Line: 9)
2026/06/16 22:49:37 __char__ solved Problem0027 (Line: 10)
2026/06/16 22:49:23 takanen solved Problem0027 (Line: 17)
2026/06/16 22:43:53 takanen solved Problem0027 (Line: 31)
2026/06/16 22:30:24 takanen solved Problem0026 (Line: 14)
2026/06/16 22:05:57 __char__ solved Problem0025 (Line: 6)
2026/06/16 22:02:11 __char__ solved Problem0026 (Line: 12)
2026/06/16 21:38:37 takanen solved Problem0025 (Line: 7)
2026/06/16 21:27:23 takanen solved Problem0024 (Line: 25)
2026/06/16 21:24:46 takanen solved Problem0024 (Line: 25)
2026/06/16 21:24:29 takanen solved Problem0024 (Line: 25)
2026/06/16 21:00:05 takanen solved Problem0023 (Line: 8)
2026/06/16 19:34:25 takanen solved Problem0022 (Line: 13)
2026/06/16 15:44:20 cacampu solved Problem0036 (Line: 3)
2026/06/16 15:43:41 cacampu solved Problem0035 (Line: 1)
2026/06/16 15:40:53 cacampu solved Problem0031 (Line: 19)
2026/06/16 15:40:34 cacampu solved Problem0030 (Line: 19)
2026/06/16 15:39:32 cacampu solved Problem0029 (Line: 19)
2026/06/16 15:27:52 cacampu solved Problem0028 (Line: 20)
2026/06/16 15:17:27 cacampu solved Problem0027 (Line: 10)
2026/06/16 14:45:22 cacampu solved Problem0012 (Line: 11)
2026/06/16 14:41:50 cacampu solved Problem0023 (Line: 5)
2026/06/16 14:32:06 cacampu solved Problem0025 (Line: 5)
2026/06/16 14:04:45 cacampu solved Problem0026 (Line: 9)
2026/06/16 13:08:58 cacampu solved Problem0012 (Line: 12)
2026/06/16 12:42:58 __char__ solved Problem0033 (Line: 8)
2026/06/16 12:38:43 cacampu solved Problem0007 (Line: 3)
2026/06/16 12:37:55 cacampu solved Problem0006 (Line: 3)
2026/06/16 12:37:31 cacampu solved Problem0005 (Line: 1)
2026/06/16 12:37:15 cacampu solved Problem0004 (Line: 3)
2026/06/16 12:36:53 cacampu solved Problem0003 (Line: 1)
2026/06/16 12:36:32 cacampu solved Problem0002 (Line: 1)
2026/06/16 12:36:20 cacampu solved Problem0001 (Line: 1)
2026/06/16 12:35:42 cacampu solved Problem0058 (Line: 14)
2026/06/16 11:39:30 cacampu solved Problem0056 (Line: 118)
2026/06/16 11:23:36 takanen solved Problem0020 (Line: 12)
2026/06/16 08:41:12 TripMachine solved Problem0053 (Line: 7)
2026/06/16 08:40:58 TripMachine solved Problem0053 (Line: 7)
2026/06/16 08:09:00 takanen solved Problem0019 (Line: 10)
2026/06/16 08:03:18 takanen solved Problem0018 (Line: 7)
2026/06/16 05:14:28 cacampu solved Problem0044 (Line: 4)
2026/06/16 05:12:47 cacampu solved Problem0044 (Line: 6)
2026/06/16 04:12:55 cacampu solved Problem0079 (Line: 4)
2026/06/16 03:28:47 cacampu solved Problem0043 (Line: 7)
2026/06/16 02:26:13 cacampu solved Problem0055 (Line: 37)
2026/06/16 02:14:03 cacampu solved Problem0054 (Line: 28)
2026/06/16 01:41:30 cacampu solved Problem0024 (Line: 11)

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.