Recent Submissions

2026/11/11 07:01:11 vivia solved Problem0012 (Line: 35)
2026/11/11 04:36:20 vivia solved Problem0011 (Line: 11)
2026/11/11 04:32:47 vivia solved Problem0011 (Line: 14)
2026/11/11 02:59:05 Lazarus_hk416 solved Problem0018 (Line: 7)
2026/11/11 02:57:37 Lazarus_hk416 solved Problem0017 (Line: 2)
2026/11/11 02:56:51 Lazarus_hk416 solved Problem0016 (Line: 1)
2026/11/11 02:19:19 Lazarus_hk416 solved Problem0014 (Line: 11)
2026/11/11 01:57:54 ILikeWhales solved Problem0078 (Line: 1)
2026/11/11 01:53:26 ILikeWhales solved Problem0050 (Line: 2)
2026/11/11 01:52:34 ILikeWhales solved Problem0049 (Line: 1)
2026/11/11 01:51:44 ILikeWhales solved Problem0085 (Line: 9)
2026/11/11 01:48:51 ILikeWhales solved Problem0035 (Line: 1)
2026/11/11 01:44:51 ILikeWhales solved Problem0017 (Line: 2)
2026/11/11 01:42:33 ILikeWhales solved Problem0016 (Line: 1)
2026/11/11 01:25:07 ILikeWhales solved Problem0006 (Line: 3)
2026/11/11 01:23:54 ILikeWhales solved Problem0005 (Line: 1)
2026/11/11 01:23:19 ILikeWhales solved Problem0004 (Line: 3)
2026/11/11 01:22:50 ILikeWhales solved Problem0003 (Line: 1)
2026/11/11 01:22:26 ILikeWhales solved Problem0002 (Line: 1)
2026/11/11 01:21:12 ILikeWhales solved Problem0001 (Line: 1)
2026/11/10 20:42:16 yao99 solved Problem0076 (Line: 11)
2026/11/10 19:47:22 Lazarus_hk416 solved Problem0013 (Line: 7)
2026/11/10 19:28:32 Lazarus_hk416 solved Problem0012 (Line: 11)
2026/11/10 18:53:39 Lazarus_hk416 solved Problem0011 (Line: 11)
2026/11/10 18:06:17 hulgas solved Problem0027 (Line: 9)
2026/11/10 17:56:55 hulgas solved Problem0027 (Line: 10)
2026/11/10 09:43:08 vivia solved Problem0010 (Line: 7)
2026/11/10 09:38:10 vivia solved Problem0010 (Line: 8)
2026/11/10 09:20:09 vivia solved Problem0009 (Line: 4)
2026/11/10 09:15:18 vivia solved Problem0008 (Line: 3)
2026/11/10 09:09:47 vivia solved Problem0007 (Line: 3)
2026/11/10 09:05:00 vivia solved Problem0006 (Line: 3)
2026/11/10 09:01:08 vivia solved Problem0005 (Line: 1)
2026/11/10 08:58:14 vivia solved Problem0004 (Line: 3)
2026/11/10 08:51:59 vivia solved Problem0003 (Line: 1)
2026/11/10 08:48:51 vivia solved Problem0002 (Line: 1)
2026/11/10 06:26:38 vivia solved Problem0001 (Line: 1)
2026/11/10 06:26:24 vivia solved Problem0001 (Line: 1)
2026/11/10 03:02:49 mrosadilla solved Problem0011 (Line: 11)
2026/11/10 02:52:19 mrosadilla solved Problem0011 (Line: 15)
2026/11/10 01:11:06 Lazarus_hk416 solved Problem0010 (Line: 7)
2026/11/10 01:09:44 Lazarus_hk416 solved Problem0010 (Line: 8)
2026/11/10 01:06:20 Lazarus_hk416 solved Problem0009 (Line: 4)
2026/11/10 01:05:18 Lazarus_hk416 solved Problem0008 (Line: 3)
2026/11/10 01:04:12 Lazarus_hk416 solved Problem0008 (Line: 4)
2026/11/10 01:00:31 Lazarus_hk416 solved Problem0007 (Line: 3)
2026/11/10 00:59:50 Lazarus_hk416 solved Problem0006 (Line: 3)
2026/11/10 00:56:27 Lazarus_hk416 solved Problem0005 (Line: 1)
2026/11/10 00:55:41 Lazarus_hk416 solved Problem0004 (Line: 3)
2026/11/10 00:54:58 Lazarus_hk416 solved Problem0003 (Line: 1)

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.