Recent Submissions

2026/03/22 17:24:49 Ifren solved Problem0006 (Line: 3)
2026/03/22 13:46:30 c0ffee solved Problem0036 (Line: 3)
2026/03/22 13:45:17 c0ffee solved Problem0035 (Line: 1)
2026/03/22 13:40:48 c0ffee solved Problem0078 (Line: 1)
2026/03/22 13:31:13 Ifren solved Problem0005 (Line: 1)
2026/03/22 13:30:28 Ifren solved Problem0004 (Line: 3)
2026/03/22 13:27:02 Ifren solved Problem0003 (Line: 1)
2026/03/22 13:14:51 c0ffee solved Problem0020 (Line: 12)
2026/03/22 13:12:50 c0ffee solved Problem0019 (Line: 5)
2026/03/22 12:58:01 c0ffee solved Problem0017 (Line: 2)
2026/03/22 12:57:25 c0ffee solved Problem0016 (Line: 1)
2026/03/22 12:48:56 c0ffee solved Problem0011 (Line: 11)
2026/03/22 12:48:09 c0ffee solved Problem0011 (Line: 11)
2026/03/22 09:35:45 c0ffee solved Problem0009 (Line: 4)
2026/03/22 09:32:43 c0ffee solved Problem0008 (Line: 3)
2026/03/22 09:31:16 c0ffee solved Problem0007 (Line: 3)
2026/03/22 09:30:22 c0ffee solved Problem0006 (Line: 3)
2026/03/22 09:29:48 c0ffee solved Problem0005 (Line: 1)
2026/03/22 09:28:42 c0ffee solved Problem0004 (Line: 3)
2026/03/22 09:28:10 c0ffee solved Problem0003 (Line: 1)
2026/03/22 09:27:52 c0ffee solved Problem0002 (Line: 1)
2026/03/22 09:27:10 c0ffee solved Problem0001 (Line: 1)
2026/03/22 08:43:42 Ifren solved Problem0002 (Line: 1)
2026/03/22 08:43:00 Ifren solved Problem0001 (Line: 1)
2026/03/20 12:53:04 john229 solved Problem0063 (Line: 3)
2026/03/19 15:12:18 AlexeyAI solved Problem0035 (Line: 1)
2026/03/19 15:11:51 AlexeyAI solved Problem0035 (Line: 4)
2026/03/18 15:51:09 john229 solved Problem0032 (Line: 10)
2026/03/18 15:43:00 john229 solved Problem0052 (Line: 4)
2026/03/18 02:55:54 AlexeyAI solved Problem0026 (Line: 15)
2026/03/17 17:59:39 john229 solved Problem0061 (Line: 2)
2026/03/17 17:50:55 john229 solved Problem0051 (Line: 3)
2026/03/17 17:41:51 john229 solved Problem0050 (Line: 2)
2026/03/17 17:40:09 john229 solved Problem0078 (Line: 1)
2026/03/17 17:29:13 john229 solved Problem0049 (Line: 1)
2026/03/17 17:28:49 john229 solved Problem0037 (Line: 6)
2026/03/17 17:26:34 john229 solved Problem0045 (Line: 1)
2026/03/17 17:25:34 john229 solved Problem0036 (Line: 3)
2026/03/17 17:04:08 john229 solved Problem0035 (Line: 1)
2026/03/17 17:01:53 john229 solved Problem0019 (Line: 5)
2026/03/17 16:54:01 john229 solved Problem0018 (Line: 7)
2026/03/17 16:52:03 john229 solved Problem0017 (Line: 2)
2026/03/17 16:48:49 john229 solved Problem0016 (Line: 1)
2026/03/17 16:42:28 john229 solved Problem0083 (Line: 12)
2026/03/17 16:27:45 john229 solved Problem0080 (Line: 2)
2026/03/17 16:26:57 john229 solved Problem0080 (Line: 3)
2026/03/17 15:53:50 hotman78 solved Problem0010 (Line: 7)
2026/03/17 15:39:21 hotman78 solved Problem0036 (Line: 3)
2026/03/17 15:32:03 john229 solved Problem0053 (Line: 3)
2026/03/17 13:15:31 john229 solved Problem0034 (Line: 6)

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.