Recent Submissions

2026/06/15 02:00:48 bd_ solved Problem0002 (Line: 1)
2026/06/15 02:00:23 bd_ solved Problem0001 (Line: 1)
2026/06/15 01:39:30 __char__ solved Problem0052 (Line: 3)
2026/06/15 01:38:24 __char__ solved Problem0051 (Line: 3)
2026/06/15 01:35:37 __char__ solved Problem0050 (Line: 2)
2026/06/15 01:31:22 __char__ solved Problem0049 (Line: 1)
2026/06/15 01:30:34 __char__ solved Problem0048 (Line: 15)
2026/06/15 01:30:05 Kent477 solved Problem0011 (Line: 11)
2026/06/15 01:23:48 sakisaki5542 solved Problem0007 (Line: 3)
2026/06/15 01:15:16 sakisaki5542 solved Problem0006 (Line: 3)
2026/06/15 01:05:22 sakisaki5542 solved Problem0005 (Line: 1)
2026/06/15 01:02:38 sakisaki5542 solved Problem0004 (Line: 3)
2026/06/15 00:02:08 takanen solved Problem0012 (Line: 11)
2026/06/14 23:45:12 __char__ solved Problem0010 (Line: 7)
2026/06/14 23:28:23 __char__ solved Problem0046 (Line: 7)
2026/06/14 23:27:44 lalapi solved Problem0012 (Line: 11)
2026/06/14 23:21:03 __char__ solved Problem0045 (Line: 1)
2026/06/14 23:11:51 takanen solved Problem0011 (Line: 11)
2026/06/14 23:05:53 lalapi solved Problem0011 (Line: 11)
2026/06/14 22:46:48 takanen solved Problem0011 (Line: 25)
2026/06/14 22:35:42 foa_504 solved Problem0010 (Line: 8)
2026/06/14 22:24:41 __char__ solved Problem0038 (Line: 6)
2026/06/14 22:15:08 __char__ solved Problem0037 (Line: 8)
2026/06/14 22:14:39 Kent477 solved Problem0011 (Line: 23)
2026/06/14 22:13:47 __char__ solved Problem0036 (Line: 3)
2026/06/14 22:13:14 tasuku solved Problem0010 (Line: 7)
2026/06/14 22:11:25 __char__ solved Problem0035 (Line: 1)
2026/06/14 22:09:13 __char__ solved Problem0032 (Line: 10)
2026/06/14 22:06:52 foa_504 solved Problem0009 (Line: 4)
2026/06/14 22:04:52 foa_504 solved Problem0009 (Line: 5)
2026/06/14 21:56:39 __char__ solved Problem0031 (Line: 32)
2026/06/14 21:56:20 __char__ solved Problem0030 (Line: 32)
2026/06/14 21:55:38 __char__ solved Problem0030 (Line: 32)
2026/06/14 21:55:23 srtubaki solved Problem0014 (Line: 9)
2026/06/14 21:54:49 __char__ solved Problem0029 (Line: 32)
2026/06/14 21:47:31 srtubaki solved Problem0013 (Line: 9)
2026/06/14 21:47:28 toraneko solved Problem0012 (Line: 46)
2026/06/14 21:43:19 takanen solved Problem0010 (Line: 7)
2026/06/14 21:37:07 srtubaki solved Problem0013 (Line: 9)
2026/06/14 21:31:19 srtubaki solved Problem0013 (Line: 11)
2026/06/14 21:30:23 toraneko solved Problem0011 (Line: 27)
2026/06/14 21:28:38 lalapi solved Problem0011 (Line: 24)
2026/06/14 21:27:48 foa_504 solved Problem0008 (Line: 3)
2026/06/14 21:24:34 takanen solved Problem0009 (Line: 4)
2026/06/14 21:17:57 Kent477 solved Problem0010 (Line: 7)
2026/06/14 21:17:06 srtubaki solved Problem0012 (Line: 11)
2026/06/14 21:15:28 srtubaki solved Problem0011 (Line: 11)
2026/06/14 21:11:57 tasuku solved Problem0009 (Line: 4)
2026/06/14 21:10:34 tasuku solved Problem0008 (Line: 3)
2026/06/14 21:09:33 tasuku solved Problem0007 (Line: 3)

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.