Recent Submissions

2026/06/12 01:38:47 koukanni solved Problem0018 (Line: 6)
2026/06/12 01:29:17 koukanni solved Problem0018 (Line: 7)
2026/06/12 01:19:03 koukanni solved Problem0074 (Line: 4)
2026/06/12 00:52:31 terryyang solved Problem0074 (Line: 5)
2026/06/12 00:45:14 terryyang solved Problem0074 (Line: 6)
2026/06/12 00:35:14 terryyang solved Problem0046 (Line: 11)
2026/06/12 00:16:54 terryyang solved Problem0069 (Line: 2)
2026/06/12 00:07:12 terryyang solved Problem0017 (Line: 2)
2026/06/11 00:04:21 koukanni solved Problem0012 (Line: 11)
2026/06/10 23:48:27 koukanni solved Problem0017 (Line: 2)
2026/06/10 23:47:41 koukanni solved Problem0016 (Line: 1)
2026/06/10 03:28:12 koukanni solved Problem0011 (Line: 11)
2026/06/10 03:21:47 koukanni solved Problem0011 (Line: 12)
2026/06/10 03:18:32 terryyang solved Problem0012 (Line: 11)
2026/06/10 03:16:49 koukanni solved Problem0010 (Line: 6)
2026/06/10 03:11:51 koukanni solved Problem0010 (Line: 7)
2026/06/10 03:10:26 terryyang solved Problem0011 (Line: 11)
2026/06/10 03:09:15 terryyang solved Problem0011 (Line: 11)
2026/06/10 03:07:17 koukanni solved Problem0009 (Line: 4)
2026/06/10 02:59:44 koukanni solved Problem0008 (Line: 3)
2026/06/10 02:51:14 koukanni solved Problem0007 (Line: 3)
2026/06/10 02:48:02 koukanni solved Problem0006 (Line: 3)
2026/06/10 02:46:54 koukanni solved Problem0005 (Line: 1)
2026/06/10 02:46:15 koukanni solved Problem0004 (Line: 3)
2026/06/10 02:45:55 koukanni solved Problem0003 (Line: 1)
2026/06/10 02:45:17 koukanni solved Problem0002 (Line: 1)
2026/06/10 02:44:40 koukanni solved Problem0001 (Line: 1)
2026/06/03 23:20:06 CainSnuke solved Problem0030 (Line: 16)
2026/06/03 23:18:00 CainSnuke solved Problem0031 (Line: 16)
2026/06/01 08:57:51 macaroni5708 solved Problem0010 (Line: 7)
2026/06/01 08:52:39 macaroni5708 solved Problem0009 (Line: 4)
2026/06/01 08:50:35 macaroni5708 solved Problem0008 (Line: 3)
2026/06/01 08:47:56 macaroni5708 solved Problem0007 (Line: 3)
2026/06/01 08:46:45 macaroni5708 solved Problem0006 (Line: 3)
2026/06/01 08:45:18 macaroni5708 solved Problem0005 (Line: 1)
2026/06/01 08:44:51 macaroni5708 solved Problem0004 (Line: 3)
2026/06/01 08:43:58 macaroni5708 solved Problem0003 (Line: 1)
2026/06/01 08:43:21 macaroni5708 solved Problem0002 (Line: 1)
2026/06/01 08:42:18 macaroni5708 solved Problem0001 (Line: 1)
2026/05/31 03:25:16 ai solved Problem0064 (Line: 9)
2026/05/31 03:24:24 ai solved Problem0063 (Line: 3)
2026/05/31 02:59:42 ai solved Problem0061 (Line: 2)
2026/05/31 02:49:37 ai solved Problem0059 (Line: 18)
2026/05/31 02:45:16 ai solved Problem0057 (Line: 97)
2026/05/31 02:39:26 ai solved Problem0058 (Line: 45)
2026/05/31 02:33:46 ai solved Problem0056 (Line: 120)
2026/05/31 02:30:28 ai solved Problem0054 (Line: 26)
2026/05/31 02:25:50 ai solved Problem0055 (Line: 77)
2026/05/31 02:20:37 ai solved Problem0053 (Line: 3)
2026/05/31 02:20:23 ai solved Problem0051 (Line: 3)

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.