Recent Submissions

2026/11/25 20:33:28 apeiro256 solved Problem0047 (Line: 34)
2026/11/25 19:52:10 bry solved Problem0009 (Line: 4)
2026/11/25 19:03:25 bry solved Problem0008 (Line: 3)
2026/11/25 19:01:12 345ljh solved Problem0019 (Line: 5)
2026/11/25 19:01:06 bry solved Problem0007 (Line: 3)
2026/11/25 19:00:57 345ljh solved Problem0019 (Line: 6)
2026/11/25 18:58:16 bry solved Problem0006 (Line: 3)
2026/11/25 18:57:18 bry solved Problem0005 (Line: 1)
2026/11/25 18:55:16 bry solved Problem0004 (Line: 3)
2026/11/25 18:54:32 bry solved Problem0003 (Line: 1)
2026/11/25 18:53:50 bry solved Problem0002 (Line: 1)
2026/11/25 18:52:05 bry solved Problem0001 (Line: 1)
2026/11/25 18:51:57 345ljh solved Problem0011 (Line: 13)
2026/11/25 18:31:23 345ljh solved Problem0049 (Line: 1)
2026/11/25 18:31:11 345ljh solved Problem0050 (Line: 2)
2026/11/25 18:19:57 karasu solved Problem0005 (Line: 1)
2026/11/25 18:07:27 karasu solved Problem0004 (Line: 3)
2026/11/25 18:06:18 karasu solved Problem0003 (Line: 1)
2026/11/25 18:05:31 karasu solved Problem0002 (Line: 1)
2026/11/25 18:04:36 345ljh solved Problem0018 (Line: 7)
2026/11/25 18:04:19 karasu solved Problem0001 (Line: 1)
2026/11/25 18:04:07 karasu solved Problem0001 (Line: 1)
2026/11/25 18:03:40 345ljh solved Problem0018 (Line: 7)
2026/11/25 17:58:30 345ljh solved Problem0017 (Line: 2)
2026/11/25 17:57:05 345ljh solved Problem0016 (Line: 1)
2026/11/25 17:35:31 345ljh solved Problem0053 (Line: 3)
2026/11/25 17:24:38 345ljh solved Problem0010 (Line: 8)
2026/11/25 17:12:21 345ljh solved Problem0009 (Line: 4)
2026/11/25 17:10:48 345ljh solved Problem0008 (Line: 3)
2026/11/25 17:08:25 345ljh solved Problem0007 (Line: 3)
2026/11/25 17:05:37 345ljh solved Problem0005 (Line: 1)
2026/11/25 17:00:46 345ljh solved Problem0006 (Line: 3)
2026/11/25 17:00:04 345ljh solved Problem0004 (Line: 3)
2026/11/25 16:59:28 345ljh solved Problem0003 (Line: 1)
2026/11/25 16:58:05 345ljh solved Problem0002 (Line: 1)
2026/11/25 16:57:37 345ljh solved Problem0001 (Line: 1)
2026/11/25 09:43:06 Viewing3193 solved Problem0010 (Line: 7)
2026/11/25 05:11:13 Sakoosan solved Problem0078 (Line: 1)
2026/11/25 05:09:29 Sakoosan solved Problem0081 (Line: 10)
2026/11/25 05:00:08 Sakoosan solved Problem0006 (Line: 3)
2026/11/25 04:58:59 Sakoosan solved Problem0005 (Line: 1)
2026/11/25 04:58:36 Sakoosan solved Problem0004 (Line: 3)
2026/11/25 04:57:29 Sakoosan solved Problem0003 (Line: 1)
2026/11/25 04:56:49 Sakoosan solved Problem0002 (Line: 1)
2026/11/25 04:56:17 Sakoosan solved Problem0001 (Line: 1)
2026/11/25 04:06:42 Viewing3193 solved Problem0010 (Line: 7)
2026/11/25 03:47:16 Viewing3193 solved Problem0010 (Line: 7)
2026/11/25 03:41:43 Viewing3193 solved Problem0009 (Line: 4)
2026/11/25 03:40:44 Viewing3193 solved Problem0008 (Line: 3)
2026/11/25 03:35:45 Viewing3193 solved Problem0007 (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.