Recent Submissions

2025/10/12 22:19:30 yao99 solved Problem0074 (Line: 8)
2025/10/12 22:04:53 yao99 solved Problem0073 (Line: 12)
2025/10/12 21:21:45 yao99 solved Problem0072 (Line: 10)
2025/10/12 18:00:37 yao99 solved Problem0071 (Line: 12)
2025/10/12 17:32:29 yao99 solved Problem0070 (Line: 23)
2025/10/12 16:49:09 yao99 solved Problem0069 (Line: 2)
2025/10/12 16:45:31 yao99 solved Problem0069 (Line: 3)
2025/10/12 16:34:07 yao99 solved Problem0068 (Line: 4)
2025/10/12 16:21:06 yao99 solved Problem0067 (Line: 8)
2025/10/12 15:54:05 yao99 solved Problem0066 (Line: 6)
2025/10/12 15:44:35 yao99 solved Problem0065 (Line: 8)
2025/10/12 15:42:20 yao99 solved Problem0064 (Line: 6)
2025/10/12 15:23:13 yao99 solved Problem0063 (Line: 3)
2025/10/12 15:21:32 yao99 solved Problem0062 (Line: 2)
2025/10/12 15:20:07 yao99 solved Problem0061 (Line: 2)
2025/10/12 15:13:48 yao99 solved Problem0060 (Line: 15)
2025/10/12 00:39:29 yao99 solved Problem0059 (Line: 8)
2025/10/12 00:28:00 yao99 solved Problem0052 (Line: 3)
2025/10/12 00:25:36 yao99 solved Problem0051 (Line: 3)
2025/10/12 00:23:01 yao99 solved Problem0050 (Line: 2)
2025/10/12 00:21:39 yao99 solved Problem0049 (Line: 1)
2025/10/12 00:19:07 yao99 solved Problem0048 (Line: 4)
2025/10/12 00:08:25 yao99 solved Problem0047 (Line: 17)
2025/10/09 19:15:33 ProfessorBarash solved Problem0006 (Line: 3)
2025/10/09 19:12:44 paleking solved Problem0008 (Line: 3)
2025/10/09 19:10:27 paleking solved Problem0007 (Line: 3)
2025/10/09 19:02:16 ProfessorBarash solved Problem0004 (Line: 3)
2025/10/09 19:01:22 ProfessorBarash solved Problem0003 (Line: 1)
2025/10/09 18:59:36 paleking solved Problem0006 (Line: 3)
2025/10/09 18:59:09 ProfessorBarash solved Problem0002 (Line: 1)
2025/10/09 18:58:21 ProfessorBarash solved Problem0001 (Line: 1)
2025/10/09 18:58:21 paleking solved Problem0005 (Line: 1)
2025/10/09 18:57:15 paleking solved Problem0004 (Line: 3)
2025/10/09 18:56:34 paleking solved Problem0003 (Line: 1)
2025/10/09 18:55:36 paleking solved Problem0002 (Line: 1)
2025/10/09 18:54:13 paleking solved Problem0001 (Line: 1)
2025/10/07 03:09:20 g_n_a solved Problem0006 (Line: 3)
2025/10/07 03:01:00 g_n_a solved Problem0005 (Line: 1)
2025/10/07 02:54:57 g_n_a solved Problem0004 (Line: 3)
2025/10/07 02:53:30 g_n_a solved Problem0003 (Line: 1)
2025/10/07 02:53:01 g_n_a solved Problem0002 (Line: 1)
2025/10/07 02:52:09 g_n_a solved Problem0001 (Line: 1)
2025/10/06 14:34:21 missa solved Problem0071 (Line: 15)
2025/10/06 13:52:05 missa solved Problem0069 (Line: 3)
2025/10/06 13:51:37 missa solved Problem0069 (Line: 3)
2025/10/05 13:36:55 missa solved Problem0042 (Line: 2)
2025/10/05 13:36:30 missa solved Problem0042 (Line: 5)
2025/10/05 13:31:03 missa solved Problem0041 (Line: 6)
2025/10/05 13:29:45 missa solved Problem0041 (Line: 12)
2025/10/05 13:28:32 missa solved Problem0023 (Line: 9)

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.