Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

REGEX007 - Prime

This is a regex golf problem. You have to write a regex that matches all lines from one list and none from the second one. Matching is implemented as Perl's m//, so it's not a precise match. E.g. to match "SPOJ" you don't need regex /^SPOJ$/ since it's enough to write /PO/ or /J/.

The regexes submitted should be compatible with Perl regular expressions (version 5.20.1).

Score is calculated as follows: it's equal to the length of your regex and for every line from the first list that's not matched by your regex X points are added to your score. Analogically, for every line from the second list that's matched by your regex X points are added to your score. The lower your score is, the better. X often equals 10 but it's different in some problems. Check below this problem's X value.

To quickly check the quality of your solution visit the original regex golf project.

Please don't look for solutions for this problem online or at least don't post them here if you didn't come up with them on your own.

Match all of these...

  • xx
  • xxx
  • xxxxx
  • xxxxxxx
  • xxxxxxxxxxx
  • xxxxxxxxxxxxx
  • xxxxxxxxxxxxxxxxx
  • xxxxxxxxxxxxxxxxxxx
  • xxxxxxxxxxxxxxxxxxxxxxx
  • xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • xxxxxxxxxxxxxx... [31 chars]
  • xxxxxxxxxxxxxx... [37 chars]
  • xxxxxxxxxxxxxx... [41 chars]
  • xxxxxxxxxxxxxx... [43 chars]
  • xxxxxxxxxxxxxx... [47 chars]
  • xxxxxxxxxxxxxx... [53 chars]
  • xxxxxxxxxxxxxx... [59 chars]
  • xxxxxxxxxxxxxx... [61 chars]
  • xxxxxxxxxxxxxx... [67 chars]
  • xxxxxxxxxxxxxx... [71 chars]

And none of these...

  • xxxx
  • xxxxxx
  • xxxxxxxx
  • xxxxxxxxx
  • xxxxxxxxxx
  • xxxxxxxxxxxx
  • xxxxxxxxxxxxxx
  • xxxxxxxxxxxxxxx
  • xxxxxxxxxxxxxxxx
  • xxxxxxxxxxxxxxxxxx
  • xxxxxxxxxxxxxxxxxxxx
  • xxxxxxxxxxxxxxxxxxxxx
  • xxxxxxxxxxxxxxxxxxxxxx
  • xxxxxxxxxxxxxxxxxxxxxxxx
  • xxxxxxxxxxxxxxxxxxxxxxxxx
  • xxxxxxxxxxxxxxxxxxxxxxxxxx
  • xxxxxxxxxxxxxxxxxxxxxxxxxxx
  • xxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • xxxxxxxxxxxxxx... [30 chars]
  • xxxxxxxxxxxxxx... [32 chars]

X = 15


Added by:Piotr KÄ…kol
Date:2016-02-20
Time limit:1s
Source limit:1000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:TEXT
Resource:http://regex.alf.nu

hide comments
2022-10-02 03:10:34


Last edit: 2022-10-02 03:10:44
2022-04-29 15:14:27


Last edit: 2022-04-29 15:14:32
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.