Recent Submissions

2026/02/26 19:45:41 grafi solved Problem0010 (Line: 6)
2026/02/26 11:50:00 jstein solved Problem0007 (Line: 3)
2026/02/26 11:33:36 jstein solved Problem0006 (Line: 3)
2026/02/26 11:33:07 jstein solved Problem0005 (Line: 1)
2026/02/26 10:48:18 jstein solved Problem0004 (Line: 3)
2026/02/26 10:48:02 jstein solved Problem0003 (Line: 1)
2026/02/26 10:47:39 jstein solved Problem0002 (Line: 1)
2026/02/26 10:47:20 jstein solved Problem0001 (Line: 1)
2026/02/25 20:56:16 Yusuke728 solved Problem0011 (Line: 11)
2026/02/25 20:48:03 Yusuke728 solved Problem0010 (Line: 6)
2026/02/25 20:36:50 Yusuke728 solved Problem0010 (Line: 7)
2026/02/25 20:27:53 Yusuke728 solved Problem0010 (Line: 7)
2026/02/25 20:19:05 Yusuke728 solved Problem0010 (Line: 8)
2026/02/25 20:10:57 Yusuke728 solved Problem0009 (Line: 4)
2026/02/25 20:09:49 Yusuke728 solved Problem0008 (Line: 3)
2026/02/25 19:58:07 Yusuke728 solved Problem0007 (Line: 3)
2026/02/25 19:55:58 Yusuke728 solved Problem0006 (Line: 3)
2026/02/25 19:54:27 Yusuke728 solved Problem0005 (Line: 1)
2026/02/25 19:50:50 Yusuke728 solved Problem0004 (Line: 3)
2026/02/25 19:50:04 Yusuke728 solved Problem0003 (Line: 1)
2026/02/25 19:49:39 Yusuke728 solved Problem0002 (Line: 1)
2026/02/25 19:42:44 Yusuke728 solved Problem0001 (Line: 1)
2026/02/25 11:52:04 zhuyy solved Problem0065 (Line: 9)
2026/02/24 11:24:15 EclipsedOlm solved Problem0061 (Line: 2)
2026/02/24 11:23:19 EclipsedOlm solved Problem0062 (Line: 2)
2026/02/24 11:00:55 EclipsedOlm solved Problem0050 (Line: 2)
2026/02/24 11:00:06 EclipsedOlm solved Problem0049 (Line: 1)
2026/02/24 10:56:36 EclipsedOlm solved Problem0045 (Line: 1)
2026/02/24 10:52:09 EclipsedOlm solved Problem0036 (Line: 3)
2026/02/24 10:48:31 EclipsedOlm solved Problem0035 (Line: 1)
2026/02/24 10:47:25 EclipsedOlm solved Problem0017 (Line: 2)
2026/02/24 10:46:35 EclipsedOlm solved Problem0016 (Line: 1)
2026/02/24 10:44:25 EclipsedOlm solved Problem0078 (Line: 1)
2026/02/21 17:56:22 GUAqwq solved Problem0051 (Line: 3)
2026/02/21 17:56:07 GUAqwq solved Problem0051 (Line: 4)
2026/02/21 17:55:07 GUAqwq solved Problem0052 (Line: 4)
2026/02/21 17:52:45 GUAqwq solved Problem0061 (Line: 2)
2026/02/21 17:52:07 GUAqwq solved Problem0053 (Line: 5)
2026/02/21 17:43:54 GUAqwq solved Problem0018 (Line: 7)
2026/02/21 17:42:29 GUAqwq solved Problem0017 (Line: 2)
2026/02/21 17:41:43 GUAqwq solved Problem0016 (Line: 1)
2026/02/21 17:40:50 GUAqwq solved Problem0020 (Line: 12)
2026/02/21 17:31:49 yakamoti solved Problem0018 (Line: 7)
2026/02/21 11:31:26 EclipsedOlm solved Problem0008 (Line: 3)
2026/02/21 11:30:51 EclipsedOlm solved Problem0007 (Line: 3)
2026/02/21 11:29:39 EclipsedOlm solved Problem0006 (Line: 3)
2026/02/21 11:29:01 EclipsedOlm solved Problem0005 (Line: 1)
2026/02/20 23:24:19 jellybean solved Problem0008 (Line: 3)
2026/02/20 23:05:48 jellybean solved Problem0007 (Line: 3)
2026/02/20 23:03:31 jellybean 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.