Recent Submissions

2026/09/17 17:28:30 houraic solved Problem0051 (Line: 3)
2026/09/17 17:28:11 houraic solved Problem0051 (Line: 4)
2026/09/17 17:16:54 houraic solved Problem0050 (Line: 2)
2026/09/17 17:15:55 houraic solved Problem0083 (Line: 15)
2026/09/17 16:16:46 hulgas solved Problem0039 (Line: 21)
2026/09/17 16:12:49 hulgas solved Problem0040 (Line: 21)
2026/09/17 13:06:25 hulgas solved Problem0025 (Line: 6)
2026/09/17 12:19:15 houraic solved Problem0053 (Line: 4)
2026/09/17 11:23:00 hulgas solved Problem0054 (Line: 28)
2026/09/17 03:34:17 houraic solved Problem0084 (Line: 15)
2026/09/17 02:44:27 houraic solved Problem0084 (Line: 16)
2026/09/17 02:43:23 houraic solved Problem0010 (Line: 8)
2026/09/17 02:37:41 houraic solved Problem0005 (Line: 1)
2026/09/17 02:37:11 houraic solved Problem0002 (Line: 1)
2026/09/17 02:29:46 houraic solved Problem0084 (Line: 21)
2026/09/17 02:06:42 houraic solved Problem0084 (Line: 22)
2026/09/17 01:54:28 hioagr solved Problem0083 (Line: 15)
2026/09/17 01:36:34 houraic solved Problem0009 (Line: 4)
2026/09/17 00:40:12 hioagr solved Problem0032 (Line: 8)
2026/09/17 00:38:25 hioagr solved Problem0032 (Line: 10)
2026/09/17 00:31:43 houraic solved Problem0084 (Line: 27)
2026/09/17 00:31:10 houraic solved Problem0084 (Line: 27)
2026/09/17 00:26:46 kiwi solved Problem0065 (Line: 13)
2026/09/16 23:59:38 kiwi solved Problem0044 (Line: 5)
2026/09/16 23:59:07 houraic solved Problem0085 (Line: 9)
2026/09/16 23:56:00 kiwi solved Problem0026 (Line: 8)
2026/09/16 23:55:11 houraic solved Problem0008 (Line: 3)
2026/09/16 23:44:49 houraic solved Problem0049 (Line: 1)
2026/09/16 23:44:34 houraic solved Problem0049 (Line: 2)
2026/09/16 23:42:07 houraic solved Problem0007 (Line: 3)
2026/09/16 23:41:19 houraic solved Problem0006 (Line: 4)
2026/09/16 23:40:21 houraic solved Problem0005 (Line: 2)
2026/09/16 23:38:36 houraic solved Problem0004 (Line: 3)
2026/09/16 23:37:18 houraic solved Problem0003 (Line: 1)
2026/09/16 23:35:13 houraic solved Problem0002 (Line: 2)
2026/09/16 23:34:26 houraic solved Problem0001 (Line: 1)
2026/09/16 23:22:26 hioagr solved Problem0074 (Line: 6)
2026/09/16 22:58:14 kiwi solved Problem0024 (Line: 20)
2026/09/16 22:41:58 hioagr solved Problem0027 (Line: 9)
2026/09/16 22:41:10 hioagr solved Problem0027 (Line: 10)
2026/09/16 22:39:09 hioagr solved Problem0027 (Line: 11)
2026/09/16 18:25:54 krengdroid solved Problem0038 (Line: 5)
2026/09/16 18:24:14 krengdroid solved Problem0038 (Line: 6)
2026/09/16 17:49:09 kiwi solved Problem0064 (Line: 9)
2026/09/16 17:41:15 kiwi solved Problem0041 (Line: 27)
2026/09/16 17:38:54 krengdroid solved Problem0014 (Line: 12)
2026/09/16 13:03:00 hulgas solved Problem0034 (Line: 13)
2026/09/16 12:49:24 kiwi solved Problem0014 (Line: 14)
2026/09/16 12:30:50 hulgas solved Problem0020 (Line: 12)
2026/09/16 12:28:21 hulgas solved Problem0065 (Line: 9)

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.