Recent Submissions

2022/01/23 01:51:44 sdfrew solved Problem0044 (Line: 7)
2022/01/23 01:42:10 sdfrew solved Problem0071 (Line: 14)
2022/01/23 01:34:36 sdfrew solved Problem0071 (Line: 14)
2022/01/23 01:00:42 sdfrew solved Problem0066 (Line: 8)
2022/01/22 21:50:52 sdfrew solved Problem0047 (Line: 21)
2022/01/22 21:46:34 sdfrew solved Problem0047 (Line: 22)
2022/01/22 21:45:40 sdfrew solved Problem0047 (Line: 23)
2022/01/22 18:55:16 sdfrew solved Problem0083 (Line: 23)
2022/01/22 18:30:00 sdfrew solved Problem0041 (Line: 13)
2022/01/22 15:46:55 sdfrew solved Problem0085 (Line: 6)
2022/01/22 07:35:02 lum1narie solved Problem0012 (Line: 11)
2022/01/22 07:34:23 lum1narie solved Problem0012 (Line: 12)
2022/01/21 23:16:13 sdfrew solved Problem0081 (Line: 7)
2022/01/21 22:35:03 sdfrew solved Problem0068 (Line: 9)
2022/01/21 19:09:55 DortyTheGreat solved Problem0064 (Line: 9)
2022/01/21 18:56:50 DortyTheGreat solved Problem0008 (Line: 3)
2022/01/21 18:52:57 DortyTheGreat solved Problem0007 (Line: 3)
2022/01/21 18:49:55 DortyTheGreat solved Problem0006 (Line: 3)
2022/01/21 18:48:34 DortyTheGreat solved Problem0005 (Line: 1)
2022/01/21 18:47:40 DortyTheGreat solved Problem0004 (Line: 3)
2022/01/21 18:47:09 DortyTheGreat solved Problem0003 (Line: 1)
2022/01/21 18:46:31 DortyTheGreat solved Problem0002 (Line: 1)
2022/01/21 18:44:42 DortyTheGreat solved Problem0001 (Line: 1)
2022/01/21 18:14:17 Gosunov solved Problem0008 (Line: 3)
2022/01/21 17:33:42 Gosunov solved Problem0007 (Line: 3)
2022/01/21 17:25:56 Gosunov solved Problem0006 (Line: 3)
2022/01/21 17:24:00 Gosunov solved Problem0005 (Line: 1)
2022/01/21 17:23:22 Gosunov solved Problem0004 (Line: 3)
2022/01/21 17:20:03 sdfrew solved Problem0012 (Line: 11)
2022/01/21 17:19:50 Gosunov solved Problem0003 (Line: 1)
2022/01/21 17:18:34 Gosunov solved Problem0002 (Line: 1)
2022/01/21 17:18:06 Gosunov solved Problem0001 (Line: 1)
2022/01/21 17:10:57 sdfrew solved Problem0012 (Line: 12)
2022/01/21 16:57:00 sdfrew solved Problem0085 (Line: 8)
2022/01/21 15:43:54 yifuwang solved Problem0017 (Line: 2)
2022/01/21 15:28:44 yifuwang solved Problem0045 (Line: 1)
2022/01/21 15:28:31 yifuwang solved Problem0035 (Line: 1)
2022/01/21 15:28:10 yifuwang solved Problem0016 (Line: 1)
2022/01/21 15:27:36 yifuwang solved Problem0049 (Line: 1)
2022/01/21 15:27:11 yifuwang solved Problem0078 (Line: 1)
2022/01/21 05:04:13 sdfrew solved Problem0064 (Line: 9)
2022/01/21 04:39:14 lexolordan solved Problem0017 (Line: 3)
2022/01/21 04:38:14 aleksandar_mil solved Problem0001 (Line: 1)
2022/01/21 04:26:34 lexolordan solved Problem0016 (Line: 1)
2022/01/21 04:20:21 lexolordan solved Problem0001 (Line: 1)
2022/01/20 22:44:35 sdfrew solved Problem0079 (Line: 5)
2022/01/20 16:24:58 sdfrew solved Problem0069 (Line: 2)
2022/01/20 00:18:17 jh05013 solved Problem0078 (Line: 1)
2022/01/19 23:22:26 sdfrew solved Problem0039 (Line: 9)
2022/01/19 22:31:14 sdfrew solved Problem0052 (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.