Recent Submissions

2025/12/26 23:10:40 nike solved Problem0049 (Line: 1)
2025/12/26 23:10:04 nike solved Problem0045 (Line: 1)
2025/12/26 23:09:45 nike solved Problem0035 (Line: 1)
2025/12/26 12:45:41 nike solved Problem0017 (Line: 2)
2025/12/26 12:43:14 nike solved Problem0016 (Line: 1)
2025/12/26 12:37:10 nike solved Problem0006 (Line: 3)
2025/12/26 12:35:13 nike solved Problem0001 (Line: 1)
2025/12/26 10:06:36 junhyuk1229 solved Problem0008 (Line: 3)
2025/12/26 10:04:36 junhyuk1229 solved Problem0007 (Line: 3)
2025/12/26 10:04:16 junhyuk1229 solved Problem0006 (Line: 3)
2025/12/26 10:03:54 junhyuk1229 solved Problem0005 (Line: 1)
2025/12/26 10:03:27 junhyuk1229 solved Problem0004 (Line: 3)
2025/12/26 10:03:07 junhyuk1229 solved Problem0003 (Line: 1)
2025/12/26 10:02:54 junhyuk1229 solved Problem0002 (Line: 1)
2025/12/26 10:00:35 junhyuk1229 solved Problem0001 (Line: 1)
2025/12/25 16:08:48 vip solved Problem0011 (Line: 11)
2025/12/25 15:56:48 vip solved Problem0010 (Line: 7)
2025/12/25 15:52:58 vip solved Problem0009 (Line: 4)
2025/12/25 15:51:41 vip solved Problem0008 (Line: 3)
2025/12/25 15:50:25 vip solved Problem0008 (Line: 3)
2025/12/25 15:47:58 vip solved Problem0007 (Line: 3)
2025/12/25 15:46:31 vip solved Problem0006 (Line: 3)
2025/12/25 15:45:58 vip solved Problem0005 (Line: 1)
2025/12/25 15:45:42 vip solved Problem0004 (Line: 3)
2025/12/25 15:45:22 vip solved Problem0003 (Line: 1)
2025/12/25 15:45:11 vip solved Problem0002 (Line: 1)
2025/12/25 15:44:57 vip solved Problem0001 (Line: 1)
2025/12/25 15:41:13 papavip solved Problem0005 (Line: 3)
2025/12/24 22:29:31 nike solved Problem0012 (Line: 12)
2025/12/24 22:07:49 nike solved Problem0011 (Line: 11)
2025/12/24 21:19:57 nike solved Problem0010 (Line: 7)
2025/12/24 20:50:47 nike solved Problem0009 (Line: 4)
2025/12/24 20:48:03 nike solved Problem0008 (Line: 3)
2025/12/24 20:45:41 nike solved Problem0007 (Line: 3)
2025/12/24 20:39:28 nike solved Problem0006 (Line: 3)
2025/12/24 20:38:24 nike solved Problem0005 (Line: 1)
2025/12/24 20:37:56 nike solved Problem0004 (Line: 3)
2025/12/24 20:37:13 nike solved Problem0003 (Line: 1)
2025/12/24 20:36:44 nike solved Problem0002 (Line: 1)
2025/12/24 20:35:54 nike solved Problem0001 (Line: 1)
2025/12/15 14:47:38 AC_Automation solved Problem0002 (Line: 1)
2025/12/10 22:58:21 Sul_A solved Problem0048 (Line: 4)
2025/12/10 22:55:47 Sul_A solved Problem0048 (Line: 17)
2025/12/10 22:51:08 Sul_A solved Problem0044 (Line: 4)
2025/12/10 22:39:43 Sul_A solved Problem0065 (Line: 9)
2025/12/10 22:38:27 Sul_A solved Problem0065 (Line: 16)
2025/12/10 22:25:59 Sul_A solved Problem0024 (Line: 25)
2025/12/10 22:17:44 Sul_A solved Problem0012 (Line: 11)
2025/12/09 15:34:11 didiju solved Problem0001 (Line: 1)
2025/11/29 05:47:16 Murdock solved Problem0020 (Line: 13)

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.