Submit | All submissions | Best solutions | Back to list |
REGEX026 - Dominoes |
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...
- 02
- 04 43
- 05 50
- 13 33 53
- 15 14 46
- 16 15 35 33
- 21 01 01 14
- 25 26 63 33
- 25 54 14 51 52
- 30 02 25 53 33
- 34 45 56 65 55
- 43 41 31 30 03
- 45 45 40 01 51
- 50 30 13 31 31 16
- 50 55 65 06 00 50
- 53 03 03 13 61 36
- 60 20 02 20 20 10 11
- 61 66 61 12 02 03 23
- 64 14 11 31 23 23 36 63
- 65 51 15 51 51 15 10 10 13 03
And none of these...
- 02 11
- 04 13
- 05 41
- 12 33 53
- 15 14 16
- 16 13 35 33
- 21 01 01 04
- 25 25 63 33
- 25 51 14 51 52
- 30 02 25 53 55
- 34 46 56 65 55
- 43 43 31 30 03
- 45 45 41 01 51
- 50 30 03 31 31 16
- 50 56 65 06 00 50
- 53 03 03 10 61 36
- 60 20 02 20 20 12 11
- 61 66 62 12 02 03 23
- 64 14 11 21 23 23 36 63
- 65 51 15 51 51 15 15 10 13 03
X = 10
The author of this problem is teukon.
Added by: | Piotr KÄ…kol |
Date: | 2016-02-23 |
Time limit: | 1s |
Source limit: | 1000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | TEXT |
Resource: | http://regex.alf.nu |