Recent Submissions

2026/04/20 06:10:58 kuruma solved Problem0052 (Line: 3)
2026/04/19 21:10:16 kuruma solved Problem0011 (Line: 12)
2026/04/19 20:29:20 kuruma solved Problem0034 (Line: 11)
2026/04/19 14:51:50 kuruma solved Problem0061 (Line: 2)
2026/04/19 14:50:19 kuruma solved Problem0045 (Line: 1)
2026/04/19 14:49:44 kuruma solved Problem0037 (Line: 6)
2026/04/19 14:47:54 kuruma solved Problem0037 (Line: 8)
2026/04/19 14:29:17 kuruma solved Problem0048 (Line: 7)
2026/04/19 14:23:34 kuruma solved Problem0049 (Line: 1)
2026/04/19 14:22:50 kuruma solved Problem0078 (Line: 1)
2026/04/19 14:17:30 kuruma solved Problem0038 (Line: 5)
2026/04/19 12:13:08 kuruma solved Problem0034 (Line: 33)
2026/04/19 11:59:49 kuruma solved Problem0032 (Line: 10)
2026/04/19 11:51:54 kuruma solved Problem0035 (Line: 1)
2026/04/19 11:51:24 kuruma solved Problem0036 (Line: 3)
2026/04/19 11:46:23 kuruma solved Problem0032 (Line: 16)
2026/04/19 11:41:57 c0ffee solved Problem0037 (Line: 6)
2026/04/19 11:39:50 kuruma solved Problem0025 (Line: 8)
2026/04/19 11:32:19 kuruma solved Problem0025 (Line: 9)
2026/04/19 11:21:54 kuruma solved Problem0024 (Line: 25)
2026/04/19 11:19:31 kuruma solved Problem0023 (Line: 9)
2026/04/19 11:16:38 kuruma solved Problem0027 (Line: 15)
2026/04/19 11:14:43 c0ffee solved Problem0019 (Line: 5)
2026/04/19 11:11:47 kuruma solved Problem0028 (Line: 31)
2026/04/19 10:57:49 kuruma solved Problem0022 (Line: 62)
2026/04/18 18:12:05 untan solved Problem0001 (Line: 1)
2026/04/17 18:44:07 Yusuke728 solved Problem0020 (Line: 12)
2026/04/17 06:52:01 qwertyq solved Problem0001 (Line: 1)
2026/04/13 07:11:06 kkkaiiii solved Problem0001 (Line: 1)
2026/04/11 02:36:07 kuruma solved Problem0020 (Line: 12)
2026/04/10 13:23:15 Yusuke728 solved Problem0019 (Line: 6)
2026/04/10 13:21:37 Yusuke728 solved Problem0019 (Line: 7)
2026/04/10 13:20:50 kuruma solved Problem0019 (Line: 5)
2026/04/10 13:18:53 kuruma solved Problem0019 (Line: 6)
2026/04/10 06:47:20 Yusuke728 solved Problem0018 (Line: 7)
2026/04/10 06:37:59 Yusuke728 solved Problem0017 (Line: 2)
2026/04/10 06:35:16 Yusuke728 solved Problem0016 (Line: 1)
2026/04/10 01:02:18 kuruma solved Problem0013 (Line: 12)
2026/04/10 00:02:52 kuruma solved Problem0015 (Line: 22)
2026/04/09 23:52:28 kuruma solved Problem0014 (Line: 13)
2026/04/09 22:40:42 kuruma solved Problem0013 (Line: 14)
2026/04/09 22:23:37 kuruma solved Problem0012 (Line: 36)
2026/04/09 22:05:06 kuruma solved Problem0011 (Line: 25)
2026/04/09 22:04:55 kuruma solved Problem0011 (Line: 25)
2026/04/09 21:38:08 kuruma solved Problem0010 (Line: 7)
2026/04/09 21:16:12 kuruma solved Problem0009 (Line: 4)
2026/04/09 21:14:21 kuruma solved Problem0008 (Line: 3)
2026/04/09 21:02:40 kuruma solved Problem0007 (Line: 3)
2026/04/09 21:01:25 kuruma solved Problem0003 (Line: 1)
2026/04/09 21:00:56 kuruma 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.