Recent Submissions

2025/09/19 03:39:23 Sul_A solved Problem0028 (Line: 13)
2025/09/19 03:11:02 Sul_A solved Problem0068 (Line: 3)
2025/09/19 02:38:22 Sul_A solved Problem0028 (Line: 18)
2025/09/19 01:58:56 omar solved Problem0011 (Line: 124)
2025/09/19 01:55:01 Muaath_5 solved Problem0011 (Line: 31)
2025/09/19 01:50:55 Sul_A solved Problem0069 (Line: 2)
2025/09/19 01:39:05 omar solved Problem0032 (Line: 21)
2025/09/19 01:35:58 Muaath_5 solved Problem0023 (Line: 9)
2025/09/19 01:33:17 Muaath_5 solved Problem0004 (Line: 3)
2025/09/19 01:32:54 Muaath_5 solved Problem0009 (Line: 4)
2025/09/19 01:32:48 omar solved Problem0027 (Line: 15)
2025/09/19 01:32:15 Muaath_5 solved Problem0009 (Line: 5)
2025/09/19 01:30:49 Muaath_5 solved Problem0009 (Line: 7)
2025/09/19 01:22:21 Muaath_5 solved Problem0008 (Line: 3)
2025/09/19 01:19:03 Sul_A solved Problem0010 (Line: 6)
2025/09/19 01:18:25 Muaath_5 solved Problem0019 (Line: 10)
2025/09/19 01:17:54 omar solved Problem0019 (Line: 10)
2025/09/19 01:15:43 omar solved Problem0008 (Line: 3)
2025/09/19 01:10:07 Muaath_5 solved Problem0007 (Line: 3)
2025/09/19 01:09:24 Muaath_5 solved Problem0006 (Line: 3)
2025/09/19 01:07:59 Muaath_5 solved Problem0005 (Line: 1)
2025/09/19 01:00:22 omar solved Problem0007 (Line: 3)
2025/09/19 00:57:54 Sul_A solved Problem0008 (Line: 3)
2025/09/19 00:55:15 Sul_A solved Problem0007 (Line: 4)
2025/09/19 00:54:59 Sul_A solved Problem0007 (Line: 4)
2025/09/19 00:52:55 Muaath_5 solved Problem0004 (Line: 6)
2025/09/19 00:51:18 omar solved Problem0006 (Line: 3)
2025/09/19 00:50:21 Muaath_5 solved Problem0003 (Line: 1)
2025/09/19 00:50:05 omar solved Problem0005 (Line: 1)
2025/09/19 00:48:59 omar solved Problem0004 (Line: 3)
2025/09/19 00:48:38 omar solved Problem0003 (Line: 1)
2025/09/19 00:47:58 omar solved Problem0002 (Line: 1)
2025/09/19 00:47:01 omar solved Problem0001 (Line: 2)
2025/09/19 00:44:38 Muaath_5 solved Problem0002 (Line: 1)
2025/09/19 00:43:49 Muaath_5 solved Problem0001 (Line: 1)
2025/09/18 23:59:32 LeavingLeaves solved Problem0029 (Line: 9)
2025/09/18 23:57:40 LeavingLeaves solved Problem0029 (Line: 11)
2025/09/18 23:16:50 Windlotus solved Problem0026 (Line: 14)
2025/09/18 23:13:05 Windlotus solved Problem0020 (Line: 12)
2025/09/18 22:55:06 Sul_A solved Problem0085 (Line: 9)
2025/09/18 22:54:52 Sul_A solved Problem0085 (Line: 10)
2025/09/18 22:54:41 Sul_A solved Problem0085 (Line: 12)
2025/09/18 22:50:41 Sul_A solved Problem0083 (Line: 21)
2025/09/18 22:43:00 Windlotus solved Problem0015 (Line: 19)
2025/09/18 22:40:09 Windlotus solved Problem0012 (Line: 15)
2025/09/18 22:39:02 Sul_A solved Problem0082 (Line: 10)
2025/09/18 22:38:51 Sul_A solved Problem0082 (Line: 11)
2025/09/18 22:38:29 Sul_A solved Problem0082 (Line: 12)
2025/09/18 22:35:19 Sul_A solved Problem0082 (Line: 13)
2025/09/18 22:34:07 Windlotus solved Problem0085 (Line: 10)

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.