Submission #1532503


Source Code Expand

Copy
gets;s=3;gets.chop.gsub(/(.)\1/,?.).chars.chunk{|c|c>?.}.map{|k,v|n=~-v.size;s*=k ?2**n: 2*3**n};p s%(10**9+7)

Submission Info

Submission Time
Task D - Coloring Dominoes
User leafmoon
Language Ruby (2.3.3)
Score 0
Code Size 110 Byte
Status

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample1.txt, sample2.txt, sample3.txt
All 0 / 400 sample1.txt, sample2.txt, sample3.txt, 1.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 2.txt, 20.txt, 21.txt, 22.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, sample1.txt, sample2.txt, sample3.txt
Case Name Status Exec Time Memory
1.txt
10.txt
11.txt
12.txt
13.txt
14.txt
15.txt
16.txt
17.txt
18.txt
19.txt
2.txt
20.txt
21.txt
22.txt
3.txt
4.txt
5.txt
6.txt
7.txt
8.txt
9.txt
sample1.txt
sample2.txt
sample3.txt