Recent Submissions

2026/11/02 11:33:15 IcedSalad solved Problem0010 (Line: 8)
2026/11/02 11:30:02 IcedSalad solved Problem0009 (Line: 6)
2026/11/02 11:26:47 IcedSalad solved Problem0008 (Line: 5)
2026/11/02 11:21:43 IcedSalad solved Problem0007 (Line: 6)
2026/11/02 11:16:42 IcedSalad solved Problem0006 (Line: 3)
2026/11/02 11:16:06 IcedSalad solved Problem0005 (Line: 1)
2026/11/02 11:15:29 IcedSalad solved Problem0004 (Line: 3)
2026/11/02 11:14:58 IcedSalad solved Problem0003 (Line: 1)
2026/11/02 11:12:22 IcedSalad solved Problem0002 (Line: 1)
2026/11/02 11:12:05 IcedSalad solved Problem0001 (Line: 1)
2026/11/02 10:48:45 cy1hluvt solved Problem0007 (Line: 3)
2026/11/02 10:48:10 cy1hluvt solved Problem0007 (Line: 4)
2026/11/02 10:35:06 cy1hluvt solved Problem0006 (Line: 3)
2026/11/02 10:24:48 cy1hluvt solved Problem0004 (Line: 3)
2026/11/02 10:24:16 cy1hluvt solved Problem0003 (Line: 1)
2026/11/02 10:23:45 cy1hluvt solved Problem0002 (Line: 1)
2026/11/02 10:23:33 cy1hluvt solved Problem0001 (Line: 1)
2026/11/01 20:47:05 Hot_Jelly_ solved Problem0013 (Line: 10)
2026/11/01 20:30:14 Hot_Jelly_ solved Problem0012 (Line: 11)
2026/11/01 16:37:11 Hot_Jelly_ solved Problem0011 (Line: 11)
2026/11/01 16:28:13 Hot_Jelly_ solved Problem0010 (Line: 7)
2026/11/01 16:23:49 Hot_Jelly_ solved Problem0009 (Line: 4)
2026/11/01 16:22:26 Hot_Jelly_ solved Problem0008 (Line: 3)
2026/11/01 16:17:09 kiwi solved Problem0046 (Line: 7)
2026/11/01 16:10:10 Hot_Jelly_ solved Problem0007 (Line: 3)
2026/11/01 16:09:39 Hot_Jelly_ solved Problem0006 (Line: 3)
2026/11/01 16:09:07 Hot_Jelly_ solved Problem0005 (Line: 1)
2026/11/01 16:08:47 Hot_Jelly_ solved Problem0004 (Line: 3)
2026/11/01 16:08:20 Hot_Jelly_ solved Problem0003 (Line: 1)
2026/11/01 16:07:48 Hot_Jelly_ solved Problem0002 (Line: 1)
2026/11/01 16:07:15 kiwi solved Problem0046 (Line: 10)
2026/11/01 16:07:14 Hot_Jelly_ solved Problem0001 (Line: 1)
2026/11/01 16:04:26 Hot_Jelly_ solved Problem0028 (Line: 19)
2026/11/01 00:43:48 Sparkle_Infinity solved Problem0050 (Line: 2)
2026/10/31 14:02:19 nike solved Problem0053 (Line: 7)
2026/10/31 13:54:29 nike solved Problem0025 (Line: 6)
2026/10/31 13:52:34 nike solved Problem0078 (Line: 1)
2026/10/31 13:46:52 nike solved Problem0013 (Line: 12)
2026/10/29 23:48:32 3109 solved Problem0039 (Line: 11)
2026/10/28 19:30:27 hulgas solved Problem0084 (Line: 15)
2026/10/28 19:29:06 hulgas solved Problem0083 (Line: 13)
2026/10/28 07:23:45 kdy solved Problem0023 (Line: 6)
2026/10/28 07:23:19 kdy solved Problem0023 (Line: 7)
2026/10/27 22:28:12 hulgas solved Problem0058 (Line: 22)
2026/10/27 15:25:02 yao99 solved Problem0058 (Line: 14)
2026/10/27 08:06:37 kdy solved Problem0020 (Line: 12)
2026/10/26 21:04:19 kdy solved Problem0046 (Line: 7)
2026/10/26 14:23:47 hulgas solved Problem0039 (Line: 11)
2026/10/26 14:23:28 hulgas solved Problem0040 (Line: 10)
2026/10/26 12:00:52 kdy solved Problem0019 (Line: 5)

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.