Recent Submissions

2025/03/30 22:22:55 jeeema solved Problem0013 (Line: 10)
2025/03/30 22:04:50 jeeema solved Problem0014 (Line: 12)
2025/03/30 13:40:13 jeeema solved Problem0023 (Line: 5)
2025/03/30 10:06:22 jeeema solved Problem0008 (Line: 3)
2025/03/30 10:05:20 jeeema solved Problem0008 (Line: 3)
2025/03/30 09:58:18 jeeema solved Problem0003 (Line: 2)
2025/03/29 04:56:26 azazkakakakakaHi solved Problem0003 (Line: 1)
2025/03/29 04:53:36 azazkakakakakaHi solved Problem0002 (Line: 1)
2025/03/29 04:53:11 azazkakakakakaHi solved Problem0001 (Line: 1)
2025/03/29 02:39:02 saffah solved Problem0018 (Line: 7)
2025/03/29 02:34:06 saffah solved Problem0016 (Line: 1)
2025/03/26 05:52:35 zln solved Problem0043 (Line: 10)
2025/03/26 05:48:49 zln solved Problem0043 (Line: 11)
2025/03/26 04:53:46 zln solved Problem0078 (Line: 1)
2025/03/23 20:10:11 Unbakedbread solved Problem0080 (Line: 2)
2025/03/23 20:09:33 Unbakedbread solved Problem0079 (Line: 5)
2025/03/23 20:03:38 Unbakedbread solved Problem0078 (Line: 1)
2025/03/23 20:00:27 Unbakedbread solved Problem0016 (Line: 1)
2025/03/23 20:00:14 Unbakedbread solved Problem0017 (Line: 2)
2025/03/22 15:25:15 Gold14526 solved Problem0085 (Line: 6)
2025/03/22 15:19:50 Gold14526 solved Problem0064 (Line: 6)
2025/03/22 15:17:56 Gold14526 solved Problem0064 (Line: 9)
2025/03/21 20:27:26 liuhengxi solved Problem0014 (Line: 11)
2025/03/21 16:17:21 azzn solved Problem0015 (Line: 13)
2025/03/21 15:43:36 QwQgg_umlv solved Problem0007 (Line: 3)
2025/03/21 15:33:21 QwQgg_umlv solved Problem0006 (Line: 3)
2025/03/21 15:26:51 QwQgg_umlv solved Problem0005 (Line: 1)
2025/03/21 15:22:30 QwQgg_umlv solved Problem0004 (Line: 3)
2025/03/21 15:21:29 QwQgg_umlv solved Problem0003 (Line: 1)
2025/03/21 15:20:46 QwQgg_umlv solved Problem0002 (Line: 1)
2025/03/21 15:19:43 QwQgg_umlv solved Problem0001 (Line: 1)
2025/03/21 09:05:20 liuhengxi solved Problem0013 (Line: 9)
2025/03/21 09:03:00 liuhengxi solved Problem0012 (Line: 11)
2025/03/21 08:58:39 liuhengxi solved Problem0011 (Line: 11)
2025/03/21 08:45:52 liuhengxi solved Problem0010 (Line: 7)
2025/03/20 20:56:21 ___ solved Problem0035 (Line: 1)
2025/03/20 20:50:39 ___ solved Problem0081 (Line: 8)
2025/03/20 20:48:06 ___ solved Problem0081 (Line: 10)
2025/03/20 20:41:05 ___ solved Problem0063 (Line: 3)
2025/03/20 20:39:51 ___ solved Problem0061 (Line: 2)
2025/03/20 20:34:13 ___ solved Problem0045 (Line: 1)
2025/03/20 17:59:32 ___ solved Problem0053 (Line: 3)
2025/03/20 17:51:25 ___ solved Problem0028 (Line: 21)
2025/03/20 17:29:21 ___ solved Problem0019 (Line: 10)
2025/03/20 17:26:43 ___ solved Problem0017 (Line: 2)
2025/03/20 17:25:44 ___ solved Problem0016 (Line: 1)
2025/03/19 19:04:53 ___ solved Problem0013 (Line: 12)
2025/03/19 18:51:44 TR3XY solved Problem0013 (Line: 7)
2025/03/19 18:50:08 ___ solved Problem0012 (Line: 11)
2025/03/19 18:44:54 ___ solved Problem0011 (Line: 11)

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.