Recent Submissions

2026/06/17 22:32:04 cacampu solved Problem0073 (Line: 8)
2026/06/17 17:39:26 cacampu solved Problem0072 (Line: 6)
2026/06/17 17:36:12 cacampu solved Problem0072 (Line: 7)
2026/06/17 12:31:05 cacampu solved Problem0068 (Line: 4)
2026/06/17 12:21:04 cacampu solved Problem0067 (Line: 7)
2026/06/17 12:04:37 cacampu solved Problem0065 (Line: 8)
2026/06/17 11:37:31 cacampu solved Problem0060 (Line: 15)
2026/06/17 10:59:51 cacampu solved Problem0059 (Line: 10)
2026/06/17 07:39:42 cacampu solved Problem0047 (Line: 21)
2026/06/17 07:27:56 cacampu solved Problem0040 (Line: 6)
2026/06/17 07:24:03 cacampu solved Problem0039 (Line: 7)
2026/06/17 07:11:48 cacampu solved Problem0066 (Line: 4)
2026/06/17 07:00:50 cacampu solved Problem0064 (Line: 6)
2026/06/17 06:58:08 cacampu solved Problem0064 (Line: 9)
2026/06/17 06:49:02 cacampu solved Problem0082 (Line: 16)
2026/06/17 06:15:47 cacampu solved Problem0085 (Line: 11)
2026/06/17 06:08:19 cacampu solved Problem0081 (Line: 6)
2026/06/17 05:52:32 cacampu solved Problem0046 (Line: 4)
2026/06/17 05:13:19 cacampu solved Problem0041 (Line: 12)
2026/06/17 05:05:31 cacampu solved Problem0038 (Line: 5)
2026/06/17 05:03:52 cacampu solved Problem0037 (Line: 6)
2026/06/17 04:57:25 cacampu solved Problem0071 (Line: 11)
2026/06/17 04:30:24 cacampu solved Problem0045 (Line: 1)
2026/06/17 04:29:56 cacampu solved Problem0052 (Line: 3)
2026/06/17 04:28:55 cacampu solved Problem0051 (Line: 3)
2026/06/17 04:25:59 cacampu solved Problem0050 (Line: 2)
2026/06/17 04:22:33 cacampu solved Problem0048 (Line: 4)
2026/06/17 04:14:45 cacampu solved Problem0049 (Line: 1)
2026/06/17 04:14:03 cacampu solved Problem0063 (Line: 3)
2026/06/17 04:12:09 cacampu solved Problem0062 (Line: 2)
2026/06/17 04:10:47 cacampu solved Problem0061 (Line: 2)
2026/06/17 04:09:23 cacampu solved Problem0034 (Line: 5)
2026/06/17 04:07:14 cacampu solved Problem0034 (Line: 6)
2026/06/17 04:01:59 cacampu solved Problem0033 (Line: 7)
2026/06/17 03:27:54 cacampu solved Problem0032 (Line: 10)
2026/06/17 03:23:25 cacampu solved Problem0032 (Line: 11)
2026/06/17 03:16:56 cacampu solved Problem0070 (Line: 28)
2026/06/17 02:56:43 cacampu solved Problem0069 (Line: 2)
2026/06/17 02:36:05 cacampu solved Problem0080 (Line: 2)
2026/06/17 02:35:12 cacampu solved Problem0078 (Line: 1)
2026/06/17 02:33:06 cacampu solved Problem0027 (Line: 7)
2026/06/17 01:13:41 __char__ solved Problem0042 (Line: 2)
2026/06/16 22:59:01 __char__ solved Problem0053 (Line: 3)
2026/06/16 22:58:10 takanen solved Problem0027 (Line: 9)
2026/06/16 22:50:43 __char__ solved Problem0027 (Line: 9)
2026/06/16 22:49:37 __char__ solved Problem0027 (Line: 10)
2026/06/16 22:49:23 takanen solved Problem0027 (Line: 17)
2026/06/16 22:43:53 takanen solved Problem0027 (Line: 31)
2026/06/16 22:30:24 takanen solved Problem0026 (Line: 14)
2026/06/16 22:05:57 __char__ solved Problem0025 (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.