Recent Submissions

2026/09/26 10:55:40 m1nt1a solved Problem0010 (Line: 7)
2026/09/26 10:44:17 m1nt1a solved Problem0009 (Line: 4)
2026/09/26 10:34:07 m1nt1a solved Problem0008 (Line: 3)
2026/09/26 10:30:50 m1nt1a solved Problem0007 (Line: 3)
2026/09/26 10:30:14 m1nt1a solved Problem0006 (Line: 3)
2026/09/26 10:29:48 m1nt1a solved Problem0005 (Line: 1)
2026/09/26 10:29:14 m1nt1a solved Problem0004 (Line: 3)
2026/09/26 10:28:15 m1nt1a solved Problem0003 (Line: 1)
2026/09/26 10:27:44 m1nt1a solved Problem0002 (Line: 1)
2026/09/26 10:27:23 m1nt1a solved Problem0001 (Line: 1)
2026/09/26 08:25:44 hulgas solved Problem0010 (Line: 7)
2026/09/26 08:20:03 hulgas solved Problem0046 (Line: 7)
2026/09/26 08:17:14 hulgas solved Problem0073 (Line: 16)
2026/09/25 22:59:21 3109 solved Problem0009 (Line: 4)
2026/09/25 22:43:55 3109 solved Problem0008 (Line: 3)
2026/09/25 22:39:24 hioagr solved Problem0053 (Line: 3)
2026/09/25 22:35:59 3109 solved Problem0007 (Line: 3)
2026/09/25 22:33:19 3109 solved Problem0006 (Line: 3)
2026/09/25 22:32:16 3109 solved Problem0005 (Line: 1)
2026/09/25 22:31:26 3109 solved Problem0004 (Line: 3)
2026/09/25 22:30:30 3109 solved Problem0003 (Line: 1)
2026/09/25 22:30:08 3109 solved Problem0002 (Line: 1)
2026/09/25 22:29:24 3109 solved Problem0001 (Line: 1)
2026/09/25 21:51:02 y_zhongdao solved Problem0061 (Line: 2)
2026/09/25 20:31:57 hulgas solved Problem0031 (Line: 17)
2026/09/25 20:31:45 hulgas solved Problem0030 (Line: 17)
2026/09/25 20:31:15 hulgas solved Problem0029 (Line: 17)
2026/09/25 20:30:33 hulgas solved Problem0029 (Line: 17)
2026/09/25 11:14:56 hulgas solved Problem0032 (Line: 11)
2026/09/25 11:09:41 hulgas solved Problem0027 (Line: 11)
2026/09/25 11:07:06 hulgas solved Problem0024 (Line: 11)
2026/09/25 02:53:50 kiwi solved Problem0028 (Line: 20)
2026/09/25 02:40:51 kiwi solved Problem0031 (Line: 15)
2026/09/25 02:40:38 kiwi solved Problem0030 (Line: 15)
2026/09/25 02:36:17 kiwi solved Problem0029 (Line: 15)
2026/09/25 02:35:55 kiwi solved Problem0029 (Line: 16)
2026/09/25 02:34:44 kiwi solved Problem0029 (Line: 17)
2026/09/25 02:08:29 kiwi solved Problem0015 (Line: 14)
2026/09/25 00:05:18 kiwi solved Problem0014 (Line: 9)
2026/09/24 23:50:50 kiwi solved Problem0013 (Line: 8)
2026/09/24 23:45:32 kiwi solved Problem0010 (Line: 7)
2026/09/24 23:31:05 kiwi solved Problem0024 (Line: 19)
2026/09/24 18:23:32 kiwi solved Problem0084 (Line: 21)
2026/09/24 14:34:17 kiwi solved Problem0083 (Line: 18)
2026/09/24 14:05:50 kiwi solved Problem0040 (Line: 9)
2026/09/24 14:01:03 kiwi solved Problem0039 (Line: 9)
2026/09/24 13:58:52 kiwi solved Problem0039 (Line: 10)
2026/09/24 13:17:01 kiwi solved Problem0024 (Line: 17)
2026/09/24 00:40:04 kiwi solved Problem0043 (Line: 27)
2026/09/23 23:56:33 Naky solved Problem0010 (Line: 8)

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.