Recent Submissions

2025/08/29 00:38:28 kei66go solved Problem0002 (Line: 1)
2025/08/29 00:36:58 kei66go solved Problem0001 (Line: 1)
2025/08/27 01:44:55 idiotcomputer solved Problem0014 (Line: 13)
2025/08/25 14:54:46 nanashi030 solved Problem0010 (Line: 7)
2025/08/25 14:46:55 nanashi030 solved Problem0009 (Line: 4)
2025/08/25 14:46:43 nanashi030 solved Problem0009 (Line: 4)
2025/08/25 14:43:47 nanashi030 solved Problem0008 (Line: 3)
2025/08/25 14:41:51 nanashi030 solved Problem0007 (Line: 3)
2025/08/25 14:26:33 nanashi030 solved Problem0006 (Line: 3)
2025/08/25 14:25:42 nanashi030 solved Problem0005 (Line: 1)
2025/08/25 14:25:12 nanashi030 solved Problem0004 (Line: 3)
2025/08/25 14:24:11 nanashi030 solved Problem0003 (Line: 1)
2025/08/25 14:23:40 nanashi030 solved Problem0002 (Line: 1)
2025/08/25 14:23:03 nanashi030 solved Problem0001 (Line: 1)
2025/08/22 03:35:55 idiotcomputer solved Problem0023 (Line: 5)
2025/08/21 18:28:51 ralsoon solved Problem0019 (Line: 5)
2025/08/21 02:15:56 idiotcomputer solved Problem0022 (Line: 12)
2025/08/21 02:14:21 idiotcomputer solved Problem0025 (Line: 5)
2025/08/21 02:13:07 idiotcomputer solved Problem0025 (Line: 6)
2025/08/20 22:34:00 idiotcomputer solved Problem0023 (Line: 6)
2025/08/20 03:44:41 idiotcomputer solved Problem0020 (Line: 12)
2025/08/20 03:43:03 idiotcomputer solved Problem0019 (Line: 5)
2025/08/20 03:41:58 idiotcomputer solved Problem0019 (Line: 6)
2025/08/20 03:31:55 idiotcomputer solved Problem0018 (Line: 7)
2025/08/20 03:31:10 idiotcomputer solved Problem0018 (Line: 9)
2025/08/19 01:50:18 TripMachine solved Problem0069 (Line: 3)
2025/08/19 01:24:26 idiotcomputer solved Problem0017 (Line: 2)
2025/08/19 01:24:05 idiotcomputer solved Problem0017 (Line: 3)
2025/08/19 01:23:15 idiotcomputer solved Problem0016 (Line: 1)
2025/08/18 16:58:59 synk solved Problem0009 (Line: 4)
2025/08/18 16:33:17 synk solved Problem0008 (Line: 3)
2025/08/18 16:11:25 synk solved Problem0007 (Line: 3)
2025/08/18 16:09:37 synk solved Problem0006 (Line: 3)
2025/08/18 16:07:39 synk solved Problem0005 (Line: 1)
2025/08/18 16:07:09 synk solved Problem0004 (Line: 3)
2025/08/18 16:06:09 synk solved Problem0003 (Line: 1)
2025/08/18 16:05:04 synk solved Problem0002 (Line: 1)
2025/08/18 16:04:23 synk solved Problem0001 (Line: 1)
2025/08/18 15:48:40 synk solved Problem0016 (Line: 1)
2025/08/15 12:02:35 yamake solved Problem0023 (Line: 6)
2025/08/14 22:34:07 klbaaa solved Problem0080 (Line: 2)
2025/08/14 22:32:10 klbaaa solved Problem0078 (Line: 1)
2025/08/14 22:31:27 klbaaa solved Problem0062 (Line: 2)
2025/08/14 22:27:55 klbaaa solved Problem0061 (Line: 2)
2025/08/14 22:23:00 klbaaa solved Problem0049 (Line: 1)
2025/08/14 22:22:31 klbaaa solved Problem0045 (Line: 1)
2025/08/14 22:21:20 klbaaa solved Problem0017 (Line: 2)
2025/08/14 22:18:57 klbaaa solved Problem0009 (Line: 4)
2025/08/14 22:18:01 klbaaa solved Problem0007 (Line: 3)
2025/08/14 22:16:59 klbaaa 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.