Recent Submissions

2026/11/06 22:43:45 INKEM solved Problem0008 (Line: 3)
2026/11/06 22:41:10 INKEM solved Problem0078 (Line: 1)
2026/11/06 22:35:13 INKEM solved Problem0007 (Line: 3)
2026/11/06 22:33:48 INKEM solved Problem0006 (Line: 3)
2026/11/06 22:33:19 INKEM solved Problem0005 (Line: 1)
2026/11/06 22:32:37 INKEM solved Problem0004 (Line: 3)
2026/11/06 22:31:35 INKEM solved Problem0003 (Line: 1)
2026/11/06 22:31:10 INKEM solved Problem0002 (Line: 1)
2026/11/06 22:30:33 INKEM solved Problem0001 (Line: 1)
2026/11/06 16:03:14 komichi solved Problem0039 (Line: 7)
2026/11/06 15:58:19 komichi solved Problem0032 (Line: 8)
2026/11/06 15:49:29 komichi solved Problem0032 (Line: 9)
2026/11/06 15:43:31 komichi solved Problem0032 (Line: 32)
2026/11/06 14:17:05 komichi solved Problem0085 (Line: 6)
2026/11/06 13:58:24 komichi solved Problem0051 (Line: 3)
2026/11/06 13:56:11 hulgas solved Problem0068 (Line: 3)
2026/11/06 01:38:19 tria solved Problem0053 (Line: 3)
2026/11/05 19:18:50 komichi solved Problem0013 (Line: 9)
2026/11/05 13:58:20 hulgas solved Problem0079 (Line: 4)
2026/11/05 00:17:40 Baka_Yojimbo solved Problem0013 (Line: 10)
2026/11/04 20:09:59 Baka_Yojimbo solved Problem0011 (Line: 12)
2026/11/04 19:25:53 Baka_Yojimbo solved Problem0010 (Line: 8)
2026/11/04 19:23:22 Baka_Yojimbo solved Problem0010 (Line: 9)
2026/11/04 01:03:06 Baka_Yojimbo solved Problem0009 (Line: 5)
2026/11/03 23:41:00 Baka_Yojimbo solved Problem0008 (Line: 3)
2026/11/03 23:22:51 Baka_Yojimbo solved Problem0007 (Line: 3)
2026/11/03 23:17:29 Baka_Yojimbo solved Problem0006 (Line: 3)
2026/11/03 23:15:12 Baka_Yojimbo solved Problem0004 (Line: 3)
2026/11/03 23:12:19 Baka_Yojimbo solved Problem0005 (Line: 1)
2026/11/03 22:58:10 Baka_Yojimbo solved Problem0003 (Line: 1)
2026/11/03 22:53:48 Baka_Yojimbo solved Problem0002 (Line: 1)
2026/11/03 22:52:59 Baka_Yojimbo solved Problem0001 (Line: 1)
2026/11/03 14:50:30 kkk solved Problem0009 (Line: 4)
2026/11/03 14:49:00 kkk solved Problem0008 (Line: 3)
2026/11/03 13:10:51 kkk solved Problem0007 (Line: 3)
2026/11/03 13:09:38 kkk solved Problem0006 (Line: 3)
2026/11/03 13:08:53 kkk solved Problem0005 (Line: 1)
2026/11/03 12:51:33 Erynderu solved Problem0013 (Line: 9)
2026/11/03 12:13:12 Erynderu solved Problem0012 (Line: 11)
2026/11/03 11:56:40 Erynderu solved Problem0011 (Line: 11)
2026/11/03 11:28:08 Erynderu solved Problem0010 (Line: 7)
2026/11/03 11:19:32 kkk solved Problem0004 (Line: 3)
2026/11/03 11:18:11 kkk solved Problem0003 (Line: 1)
2026/11/03 11:15:26 kkk solved Problem0002 (Line: 1)
2026/11/03 11:14:12 kkk solved Problem0001 (Line: 1)
2026/11/03 11:02:33 Erynderu solved Problem0009 (Line: 4)
2026/11/03 11:01:53 Erynderu solved Problem0008 (Line: 3)
2026/11/03 11:01:03 Erynderu solved Problem0007 (Line: 3)
2026/11/03 10:58:54 Erynderu solved Problem0006 (Line: 3)
2026/11/03 10:58:37 Erynderu solved Problem0005 (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.