Recent Submissions

2026/02/15 20:44:59 crocodile solved Problem0052 (Line: 3)
2026/02/15 20:43:47 crocodile solved Problem0069 (Line: 2)
2026/02/15 20:40:40 crocodile solved Problem0048 (Line: 4)
2026/02/15 20:39:18 crocodile solved Problem0080 (Line: 2)
2026/02/15 20:37:00 crocodile solved Problem0079 (Line: 4)
2026/02/15 20:34:39 crocodile solved Problem0079 (Line: 5)
2026/02/15 20:33:01 crocodile solved Problem0078 (Line: 1)
2026/02/15 20:14:47 crocodile solved Problem0051 (Line: 3)
2026/02/15 20:09:40 crocodile solved Problem0053 (Line: 3)
2026/02/15 20:08:36 crocodile solved Problem0050 (Line: 2)
2026/02/15 20:07:31 crocodile solved Problem0049 (Line: 1)
2026/02/15 20:07:06 crocodile solved Problem0025 (Line: 5)
2026/02/15 20:03:19 crocodile solved Problem0020 (Line: 12)
2026/02/15 20:01:06 crocodile solved Problem0064 (Line: 6)
2026/02/15 19:59:11 crocodile solved Problem0064 (Line: 9)
2026/02/15 19:57:30 crocodile solved Problem0063 (Line: 3)
2026/02/15 19:56:27 crocodile solved Problem0062 (Line: 2)
2026/02/15 19:55:28 crocodile solved Problem0061 (Line: 2)
2026/02/15 19:50:55 crocodile solved Problem0046 (Line: 4)
2026/02/15 19:48:18 crocodile solved Problem0045 (Line: 1)
2026/02/15 19:46:09 crocodile solved Problem0023 (Line: 5)
2026/02/15 19:42:31 crocodile solved Problem0017 (Line: 2)
2026/02/15 19:40:49 crocodile solved Problem0016 (Line: 1)
2026/02/13 18:27:25 zhuyy solved Problem0047 (Line: 23)
2026/02/13 15:12:59 zhuyy solved Problem0084 (Line: 25)
2026/02/13 14:46:38 ROPASC solved Problem0020 (Line: 12)
2026/02/13 14:44:45 ROPASC solved Problem0020 (Line: 13)
2026/02/13 14:42:07 ROPASC solved Problem0020 (Line: 22)
2026/02/13 14:26:55 ROPASC solved Problem0019 (Line: 10)
2026/02/13 14:22:26 ROPASC solved Problem0018 (Line: 7)
2026/02/13 14:18:45 ROPASC solved Problem0017 (Line: 2)
2026/02/13 14:16:08 ROPASC solved Problem0016 (Line: 1)
2026/02/13 13:58:27 ROPASC solved Problem0081 (Line: 7)
2026/02/13 13:22:23 ROPASC solved Problem0081 (Line: 9)
2026/02/13 12:59:30 zhuyy solved Problem0083 (Line: 19)
2026/02/13 12:53:47 zhuyy solved Problem0082 (Line: 16)
2026/02/13 12:36:57 zhuyy solved Problem0079 (Line: 6)
2026/02/13 12:32:37 zhuyy solved Problem0081 (Line: 10)
2026/02/13 12:28:42 zhuyy solved Problem0081 (Line: 10)
2026/02/13 03:43:55 ROPASC solved Problem0010 (Line: 7)
2026/02/13 03:28:43 ROPASC solved Problem0010 (Line: 7)
2026/02/13 03:01:33 ROPASC solved Problem0010 (Line: 8)
2026/02/13 03:00:38 ROPASC solved Problem0010 (Line: 9)
2026/02/13 02:41:18 ROPASC solved Problem0009 (Line: 4)
2026/02/13 02:08:35 ROPASC solved Problem0008 (Line: 3)
2026/02/13 02:01:25 ROPASC solved Problem0007 (Line: 3)
2026/02/13 02:00:07 ROPASC solved Problem0006 (Line: 3)
2026/02/13 01:58:58 ROPASC solved Problem0005 (Line: 1)
2026/02/13 01:57:32 ROPASC solved Problem0004 (Line: 3)
2026/02/13 01:56:03 ROPASC 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.