Recent Submissions

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)
2026/09/12 10:07:06 kiwi solved Problem0052 (Line: 4)
2026/09/12 10:03:53 kiwi solved Problem0052 (Line: 9)
2026/09/12 05:00:51 ems solved Problem0006 (Line: 3)
2026/09/12 04:51:12 ems solved Problem0007 (Line: 3)
2026/09/12 04:14:19 ems solved Problem0001 (Line: 1)
2026/09/12 04:13:52 ems solved Problem0005 (Line: 1)
2026/09/12 04:12:07 ems solved Problem0004 (Line: 3)
2026/09/12 04:11:08 ems solved Problem0003 (Line: 1)
2026/09/12 04:10:14 ems solved Problem0002 (Line: 1)
2026/09/12 03:54:58 kurgm solved Problem0081 (Line: 8)
2026/09/12 03:53:49 kurgm solved Problem0081 (Line: 8)
2026/09/12 03:50:54 kurgm solved Problem0079 (Line: 5)
2026/09/12 03:49:48 kurgm solved Problem0079 (Line: 6)
2026/09/12 03:44:58 kurgm solved Problem0046 (Line: 10)
2026/09/12 03:42:43 kurgm solved Problem0080 (Line: 2)
2026/09/12 03:38:57 kurgm solved Problem0064 (Line: 9)
2026/09/12 03:34:51 kurgm solved Problem0069 (Line: 3)
2026/09/12 03:30:12 kurgm solved Problem0038 (Line: 7)
2026/09/12 03:22:20 hulgas solved Problem0032 (Line: 16)
2026/09/12 03:21:24 kurgm solved Problem0078 (Line: 1)
2026/09/12 03:21:00 kurgm solved Problem0063 (Line: 3)
2026/09/12 03:17:04 kurgm solved Problem0052 (Line: 4)
2026/09/12 03:14:51 hulgas solved Problem0046 (Line: 11)
2026/09/12 03:04:13 hulgas solved Problem0038 (Line: 10)
2026/09/12 02:59:14 hioagr solved Problem0025 (Line: 6)
2026/09/12 02:58:12 hioagr solved Problem0025 (Line: 7)
2026/09/12 02:46:23 hioagr solved Problem0020 (Line: 12)
2026/09/12 02:36:55 kurgm solved Problem0024 (Line: 25)
2026/09/12 02:35:30 hioagr solved Problem0023 (Line: 9)
2026/09/12 02:31:18 hioagr solved Problem0023 (Line: 7)
2026/09/12 02:29:53 hioagr solved Problem0019 (Line: 5)
2026/09/12 02:28:15 hulgas solved Problem0036 (Line: 3)
2026/09/12 02:28:03 hioagr solved Problem0017 (Line: 2)
2026/09/12 02:26:53 hioagr solved Problem0016 (Line: 1)
2026/09/12 02:24:36 hulgas solved Problem0025 (Line: 6)
2026/09/12 01:02:43 kurgm solved Problem0051 (Line: 3)
2026/09/12 01:01:25 kurgm solved Problem0062 (Line: 2)
2026/09/12 00:59:22 kurgm solved Problem0053 (Line: 3)
2026/09/12 00:53:57 kurgm solved Problem0061 (Line: 2)
2026/09/12 00:51:34 kurgm solved Problem0037 (Line: 6)
2026/09/12 00:50:28 kurgm solved Problem0050 (Line: 2)
2026/09/12 00:50:07 kurgm solved Problem0049 (Line: 1)
2026/09/12 00:49:51 kurgm solved Problem0049 (Line: 2)
2026/09/12 00:49:15 kurgm solved Problem0036 (Line: 3)
2026/09/12 00:48:40 kurgm solved Problem0045 (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.