Recent Submissions

2026/01/19 11:02:02 tenth solved Problem0080 (Line: 2)
2026/01/19 11:00:11 tenth solved Problem0078 (Line: 1)
2026/01/19 10:58:17 tenth solved Problem0063 (Line: 3)
2026/01/19 10:57:11 tenth solved Problem0062 (Line: 2)
2026/01/19 10:52:37 tenth solved Problem0061 (Line: 2)
2026/01/19 10:48:46 tenth solved Problem0053 (Line: 3)
2026/01/19 05:41:21 jonathanpaulson2 solved Problem0046 (Line: 11)
2026/01/18 17:27:01 paul_foster solved Problem0085 (Line: 13)
2026/01/18 17:23:53 paul_foster solved Problem0084 (Line: 26)
2026/01/18 17:15:29 paul_foster solved Problem0083 (Line: 21)
2026/01/18 17:02:29 paul_foster solved Problem0082 (Line: 12)
2026/01/18 16:57:26 paul_foster solved Problem0081 (Line: 7)
2026/01/18 16:45:25 paul_foster solved Problem0080 (Line: 3)
2026/01/18 16:40:10 paul_foster solved Problem0079 (Line: 5)
2026/01/18 16:35:44 paul_foster solved Problem0078 (Line: 1)
2026/01/18 16:34:03 paul_foster solved Problem0077 (Line: 44)
2026/01/18 12:12:25 paul_foster solved Problem0076 (Line: 63)
2026/01/18 12:00:23 paul_foster solved Problem0076 (Line: 72)
2026/01/18 11:00:33 paul_foster solved Problem0075 (Line: 37)
2026/01/18 10:42:32 paul_foster solved Problem0074 (Line: 23)
2026/01/18 10:34:03 paul_foster solved Problem0073 (Line: 15)
2026/01/18 10:31:32 paul_foster solved Problem0073 (Line: 23)
2026/01/18 10:24:11 paul_foster solved Problem0072 (Line: 15)
2026/01/18 10:05:18 paul_foster solved Problem0042 (Line: 2)
2026/01/17 22:41:03 paul_foster solved Problem0071 (Line: 24)
2026/01/17 22:03:33 paul_foster solved Problem0070 (Line: 23)
2026/01/17 21:22:48 paul_foster solved Problem0069 (Line: 3)
2026/01/17 21:15:15 paul_foster solved Problem0068 (Line: 11)
2026/01/17 20:34:29 paul_foster solved Problem0067 (Line: 25)
2026/01/17 20:12:56 paul_foster solved Problem0066 (Line: 10)
2026/01/17 20:04:34 paul_foster solved Problem0065 (Line: 9)
2026/01/17 19:58:00 paul_foster solved Problem0064 (Line: 9)
2026/01/17 19:52:44 paul_foster solved Problem0063 (Line: 3)
2026/01/17 19:51:09 paul_foster solved Problem0062 (Line: 2)
2026/01/17 19:48:07 paul_foster solved Problem0061 (Line: 2)
2026/01/17 19:41:19 paul_foster solved Problem0060 (Line: 21)
2026/01/17 19:19:42 paul_foster solved Problem0059 (Line: 10)
2026/01/17 19:05:15 paul_foster solved Problem0058 (Line: 45)
2026/01/17 16:43:02 paul_foster solved Problem0057 (Line: 38)
2026/01/17 14:49:00 paul_foster solved Problem0056 (Line: 118)
2026/01/17 13:37:20 paul_foster solved Problem0055 (Line: 36)
2026/01/17 13:24:41 paul_foster solved Problem0054 (Line: 25)
2026/01/17 13:24:12 paul_foster solved Problem0054 (Line: 30)
2026/01/17 13:12:48 paul_foster solved Problem0053 (Line: 3)
2026/01/17 13:09:14 paul_foster solved Problem0052 (Line: 3)
2026/01/17 13:06:54 paul_foster solved Problem0052 (Line: 4)
2026/01/17 12:58:40 paul_foster solved Problem0051 (Line: 3)
2026/01/17 12:55:39 paul_foster solved Problem0050 (Line: 2)
2026/01/17 12:53:16 paul_foster solved Problem0049 (Line: 1)
2026/01/17 12:49:59 paul_foster solved Problem0048 (Line: 4)

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.