Recent Submissions

2026/02/04 07:18:45 aguscarpio solved Problem0078 (Line: 1)
2026/02/04 07:10:34 aguscarpio solved Problem0019 (Line: 5)
2026/02/04 07:10:11 aguscarpio solved Problem0019 (Line: 6)
2026/02/04 06:59:07 aguscarpio solved Problem0018 (Line: 7)
2026/02/04 06:54:07 aguscarpio solved Problem0017 (Line: 2)
2026/02/04 06:53:22 aguscarpio solved Problem0016 (Line: 1)
2026/02/04 06:53:08 aguscarpio solved Problem0016 (Line: 2)
2026/02/04 06:16:15 aguscarpio solved Problem0011 (Line: 12)
2026/02/04 01:54:16 faaple solved Problem0006 (Line: 3)
2026/02/04 01:53:12 faaple solved Problem0005 (Line: 1)
2026/02/04 01:52:34 faaple solved Problem0004 (Line: 3)
2026/02/04 01:51:59 faaple solved Problem0003 (Line: 1)
2026/02/04 01:51:33 faaple solved Problem0002 (Line: 1)
2026/02/04 01:51:10 faaple solved Problem0001 (Line: 1)
2026/02/03 22:04:34 zhuyy solved Problem0012 (Line: 11)
2026/02/03 20:56:29 zhuyy solved Problem0011 (Line: 11)
2026/02/03 20:15:21 zhuyy solved Problem0010 (Line: 6)
2026/02/03 18:58:39 zhuyy solved Problem0009 (Line: 4)
2026/02/03 18:47:07 zhuyy solved Problem0008 (Line: 3)
2026/02/03 18:27:07 zhuyy solved Problem0007 (Line: 3)
2026/02/03 18:24:32 zhuyy solved Problem0006 (Line: 3)
2026/02/03 18:23:48 zhuyy solved Problem0005 (Line: 1)
2026/02/03 18:23:10 zhuyy solved Problem0004 (Line: 3)
2026/02/03 18:21:55 zhuyy solved Problem0003 (Line: 1)
2026/02/03 18:19:06 zhuyy solved Problem0002 (Line: 1)
2026/02/03 18:18:29 zhuyy solved Problem0001 (Line: 1)
2026/02/03 17:47:39 aguscarpio solved Problem0010 (Line: 8)
2026/02/03 17:32:56 aguscarpio solved Problem0009 (Line: 4)
2026/02/03 17:17:12 aguscarpio solved Problem0008 (Line: 3)
2026/02/03 17:13:57 aguscarpio solved Problem0007 (Line: 3)
2026/02/03 17:12:47 aguscarpio solved Problem0006 (Line: 3)
2026/02/03 17:12:00 aguscarpio solved Problem0005 (Line: 1)
2026/02/03 17:10:59 aguscarpio solved Problem0004 (Line: 3)
2026/02/03 17:10:19 aguscarpio solved Problem0003 (Line: 1)
2026/02/03 16:52:44 aguscarpio solved Problem0002 (Line: 1)
2026/02/03 16:52:21 aguscarpio solved Problem0001 (Line: 1)
2026/02/03 11:11:15 hyman00 solved Problem0073 (Line: 16)
2026/02/03 10:57:09 hyman00 solved Problem0043 (Line: 7)
2026/02/03 10:51:20 hyman00 solved Problem0047 (Line: 26)
2026/02/03 10:32:15 hyman00 solved Problem0085 (Line: 7)
2026/02/03 10:14:16 hyman00 solved Problem0085 (Line: 8)
2026/02/03 10:10:51 hyman00 solved Problem0085 (Line: 8)
2026/02/03 10:09:51 hyman00 solved Problem0085 (Line: 9)
2026/01/31 17:49:06 Easy solved Problem0085 (Line: 6)
2026/01/31 17:08:19 hyman00 solved Problem0014 (Line: 12)
2026/01/23 19:57:29 aleph_zero solved Problem0023 (Line: 5)
2026/01/22 04:36:53 aleph_zero solved Problem0047 (Line: 15)
2026/01/22 04:28:01 aleph_zero solved Problem0048 (Line: 4)
2026/01/22 04:25:39 aleph_zero solved Problem0048 (Line: 7)
2026/01/22 04:08:26 aleph_zero solved Problem0071 (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.