Recent Submissions

2026/07/17 04:18:46 sato2718 solved Problem0022 (Line: 13)
2026/07/17 04:13:53 sato2718 solved Problem0083 (Line: 18)
2026/07/17 04:10:29 sato2718 solved Problem0066 (Line: 6)
2026/07/17 04:01:55 sato2718 solved Problem0027 (Line: 9)
2026/07/17 03:59:47 sato2718 solved Problem0070 (Line: 13)
2026/07/17 03:48:27 sato2718 solved Problem0041 (Line: 13)
2026/07/17 03:45:54 sato2718 solved Problem0043 (Line: 9)
2026/07/17 03:36:04 sato2718 solved Problem0030 (Line: 17)
2026/07/17 03:35:53 sato2718 solved Problem0029 (Line: 17)
2026/07/17 03:35:42 sato2718 solved Problem0031 (Line: 17)
2026/07/17 03:27:04 sato2718 solved Problem0040 (Line: 8)
2026/07/17 03:25:15 sato2718 solved Problem0039 (Line: 8)
2026/07/17 03:18:19 sato2718 solved Problem0033 (Line: 8)
2026/07/17 03:12:36 sato2718 solved Problem0058 (Line: 45)
2026/07/17 01:17:37 Duke solved Problem0033 (Line: 22)
2026/07/17 00:57:43 Duke solved Problem0033 (Line: 24)
2026/07/17 00:54:08 Duke solved Problem0033 (Line: 28)
2026/07/17 00:48:09 Duke solved Problem0033 (Line: 36)
2026/07/17 00:46:43 Duke solved Problem0033 (Line: 38)
2026/07/17 00:46:13 Duke solved Problem0033 (Line: 39)
2026/07/16 17:58:27 sato2718 solved Problem0074 (Line: 9)
2026/07/16 17:53:03 sato2718 solved Problem0072 (Line: 8)
2026/07/16 17:47:54 sato2718 solved Problem0084 (Line: 18)
2026/07/15 16:59:25 sato2718 solved Problem0055 (Line: 35)
2026/07/15 16:34:17 sato2718 solved Problem0042 (Line: 2)
2026/07/15 16:16:44 sato2718 solved Problem0073 (Line: 15)
2026/07/15 16:11:32 sato2718 solved Problem0079 (Line: 5)
2026/07/15 16:10:26 sato2718 solved Problem0071 (Line: 10)
2026/07/15 16:05:43 sato2718 solved Problem0018 (Line: 7)
2026/07/15 16:03:30 sato2718 solved Problem0071 (Line: 11)
2026/07/15 15:52:14 sato2718 solved Problem0027 (Line: 15)
2026/07/15 15:51:36 sato2718 solved Problem0026 (Line: 10)
2026/07/15 15:43:03 sato2718 solved Problem0081 (Line: 8)
2026/07/15 15:41:46 sato2718 solved Problem0082 (Line: 12)
2026/07/15 15:28:03 sato2718 solved Problem0066 (Line: 10)
2026/07/15 15:24:23 sato2718 solved Problem0067 (Line: 9)
2026/07/15 15:16:46 sato2718 solved Problem0083 (Line: 25)
2026/07/15 13:15:09 sato2718 solved Problem0065 (Line: 15)
2026/07/15 13:08:56 sato2718 solved Problem0054 (Line: 21)
2026/07/15 12:56:01 sato2718 solved Problem0047 (Line: 20)
2026/07/15 12:47:57 sato2718 solved Problem0028 (Line: 19)
2026/07/14 04:04:40 holuaia solved Problem0010 (Line: 7)
2026/07/14 03:59:12 holuaia solved Problem0009 (Line: 4)
2026/07/14 03:58:30 holuaia solved Problem0008 (Line: 3)
2026/07/14 03:55:56 holuaia solved Problem0007 (Line: 3)
2026/07/14 03:54:29 holuaia solved Problem0006 (Line: 3)
2026/07/14 03:53:57 holuaia solved Problem0005 (Line: 1)
2026/07/14 03:53:40 holuaia solved Problem0004 (Line: 3)
2026/07/14 03:53:12 holuaia solved Problem0003 (Line: 1)
2026/07/14 03:52:53 holuaia solved Problem0002 (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.