Recent Submissions

2026/06/21 00:26:59 cacampu solved Problem0033 (Line: 5)
2026/06/20 23:03:36 HishamAlshehri solved Problem0008 (Line: 3)
2026/06/20 22:54:09 HishamAlshehri solved Problem0005 (Line: 1)
2026/06/20 22:50:12 HishamAlshehri solved Problem0004 (Line: 3)
2026/06/20 22:49:25 HishamAlshehri solved Problem0003 (Line: 1)
2026/06/20 22:49:04 HishamAlshehri solved Problem0002 (Line: 1)
2026/06/20 20:24:14 takanen solved Problem0030 (Line: 27)
2026/06/20 20:20:16 takanen solved Problem0031 (Line: 27)
2026/06/20 20:16:59 takanen solved Problem0029 (Line: 27)
2026/06/20 19:57:46 cacampu solved Problem0029 (Line: 13)
2026/06/20 19:22:30 cacampu solved Problem0029 (Line: 14)
2026/06/20 19:02:43 Kent477 solved Problem0036 (Line: 3)
2026/06/20 19:00:01 Kent477 solved Problem0069 (Line: 2)
2026/06/20 18:58:46 takanen solved Problem0069 (Line: 2)
2026/06/20 18:55:51 Kent477 solved Problem0069 (Line: 3)
2026/06/20 18:15:53 cacampu solved Problem0084 (Line: 9)
2026/06/20 18:14:30 cacampu solved Problem0084 (Line: 10)
2026/06/20 18:14:18 cacampu solved Problem0084 (Line: 11)
2026/06/20 18:11:30 cacampu solved Problem0083 (Line: 11)
2026/06/20 18:10:12 cacampu solved Problem0084 (Line: 11)
2026/06/20 18:01:09 cacampu solved Problem0084 (Line: 12)
2026/06/20 17:56:25 cacampu solved Problem0084 (Line: 13)
2026/06/20 17:37:58 cacampu solved Problem0084 (Line: 25)
2026/06/20 12:56:40 __char__ solved Problem0084 (Line: 15)
2026/06/20 03:40:32 cacampu solved Problem0085 (Line: 6)
2026/06/20 02:21:18 cacampu solved Problem0085 (Line: 9)
2026/06/20 02:06:27 cacampu solved Problem0041 (Line: 6)
2026/06/20 01:49:55 cacampu solved Problem0075 (Line: 9)
2026/06/20 01:48:09 cacampu solved Problem0075 (Line: 9)
2026/06/20 01:47:16 cacampu solved Problem0075 (Line: 10)
2026/06/20 01:14:51 cacampu solved Problem0077 (Line: 14)
2026/06/20 00:43:36 hyahoitaro solved Problem0069 (Line: 2)
2026/06/20 00:42:01 hyahoitaro solved Problem0042 (Line: 2)
2026/06/20 00:40:25 __char__ solved Problem0085 (Line: 6)
2026/06/20 00:29:25 srtubaki solved Problem0080 (Line: 2)
2026/06/20 00:28:29 srtubaki solved Problem0050 (Line: 2)
2026/06/20 00:25:34 srtubaki solved Problem0062 (Line: 2)
2026/06/20 00:23:15 takanen solved Problem0069 (Line: 3)
2026/06/20 00:20:17 srtubaki solved Problem0061 (Line: 2)
2026/06/20 00:17:14 __char__ solved Problem0069 (Line: 2)
2026/06/20 00:11:04 srtubaki solved Problem0069 (Line: 2)
2026/06/20 00:10:32 srtubaki solved Problem0069 (Line: 3)
2026/06/20 00:10:25 cacampu solved Problem0013 (Line: 10)
2026/06/19 23:57:07 srtubaki solved Problem0035 (Line: 1)
2026/06/19 23:56:42 srtubaki solved Problem0078 (Line: 1)
2026/06/19 23:56:15 srtubaki solved Problem0049 (Line: 1)
2026/06/19 23:55:57 srtubaki solved Problem0045 (Line: 1)
2026/06/19 16:09:40 awooo0000 solved Problem0008 (Line: 3)
2026/06/19 16:05:59 awooo0000 solved Problem0007 (Line: 3)
2026/06/19 16:05:25 awooo0000 solved Problem0007 (Line: 4)

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.