Recent Submissions

2026/09/13 09:22:43 Meowmeow solved Problem0006 (Line: 3)
2026/09/13 09:22:07 Meowmeow solved Problem0005 (Line: 1)
2026/09/13 09:20:05 Meowmeow solved Problem0004 (Line: 3)
2026/09/13 09:19:38 Meowmeow solved Problem0003 (Line: 1)
2026/09/13 09:18:42 kiwi solved Problem0028 (Line: 27)
2026/09/13 09:18:02 Meowmeow solved Problem0002 (Line: 1)
2026/09/13 09:17:40 Meowmeow solved Problem0001 (Line: 1)
2026/09/13 09:07:01 kiwi solved Problem0085 (Line: 9)
2026/09/13 08:58:56 kiwi solved Problem0025 (Line: 9)
2026/09/13 08:52:43 kiwi solved Problem0066 (Line: 10)
2026/09/12 23:55:45 ems solved Problem0008 (Line: 3)
2026/09/12 23:47:21 ems solved Problem0016 (Line: 1)
2026/09/12 22:19:26 txhwind solved Problem0010 (Line: 6)
2026/09/12 21:57:56 txhwind solved Problem0010 (Line: 7)
2026/09/12 21:54:28 txhwind solved Problem0009 (Line: 4)
2026/09/12 21:52:43 txhwind solved Problem0008 (Line: 3)
2026/09/12 21:47:06 txhwind solved Problem0007 (Line: 3)
2026/09/12 21:38:48 txhwind solved Problem0006 (Line: 3)
2026/09/12 21:38:25 txhwind solved Problem0005 (Line: 1)
2026/09/12 21:38:05 txhwind solved Problem0004 (Line: 3)
2026/09/12 21:37:45 txhwind solved Problem0003 (Line: 1)
2026/09/12 21:37:13 txhwind solved Problem0002 (Line: 1)
2026/09/12 21:37:00 txhwind solved Problem0001 (Line: 1)
2026/09/12 18:37:31 hioagr solved Problem0063 (Line: 3)
2026/09/12 18:35:45 hioagr solved Problem0052 (Line: 3)
2026/09/12 18:35:00 hioagr solved Problem0051 (Line: 3)
2026/09/12 18:31:29 hioagr solved Problem0036 (Line: 3)
2026/09/12 18:27:37 hioagr solved Problem0080 (Line: 2)
2026/09/12 18:26:12 hioagr solved Problem0062 (Line: 2)
2026/09/12 18:25:28 hioagr solved Problem0061 (Line: 2)
2026/09/12 18:23:52 hioagr solved Problem0069 (Line: 2)
2026/09/12 18:21:51 hioagr solved Problem0069 (Line: 3)
2026/09/12 18:13:02 hioagr solved Problem0050 (Line: 2)
2026/09/12 18:06:49 hioagr solved Problem0049 (Line: 1)
2026/09/12 18:05:54 hioagr solved Problem0045 (Line: 1)
2026/09/12 18:02:01 hioagr solved Problem0015 (Line: 15)
2026/09/12 17:44:31 kiwi solved Problem0023 (Line: 6)
2026/09/12 17:43:35 kiwi solved Problem0023 (Line: 7)
2026/09/12 17:24:48 kiwi solved Problem0019 (Line: 10)
2026/09/12 14:20:10 hulgas solved Problem0014 (Line: 9)
2026/09/12 13:03:50 kurgm solved Problem0048 (Line: 5)
2026/09/12 13:00:35 kurgm solved Problem0048 (Line: 5)
2026/09/12 12:54:35 kurgm solved Problem0048 (Line: 7)
2026/09/12 12:47:46 kurgm solved Problem0065 (Line: 8)
2026/09/12 12:41:37 kurgm solved Problem0026 (Line: 16)
2026/09/12 10:36:45 kiwi solved Problem0063 (Line: 3)
2026/09/12 10:32:56 kiwi solved Problem0046 (Line: 10)
2026/09/12 10:32:45 kiwi solved Problem0046 (Line: 11)
2026/09/12 10:31:22 kiwi solved Problem0009 (Line: 4)
2026/09/12 10:23:41 kiwi solved Problem0046 (Line: 12)

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.