Submission #40750806


Source Code Expand

N = gets.to_i
S = gets.bytes
g0 = [[*0...N]]
p (0..).find{|k|
	g1 = []
	g0.each{|is|
		g = is.group_by{|i| S[i+k] }
		g.delete 10
		g.each_value{|is| g1<<is if is[0]+k<is[-1] }
	}
	g0 = g1
	next ! g0[0]
}

Submission Info

Submission Time
Task E - Who Says a Pun?
User ds14050
Language Ruby (2.7.1)
Score 500
Code Size 218 Byte
Status AC
Exec Time 1688 ms
Memory 61716 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 500 / 500
Status
AC × 3
AC × 70
Set Name Test Cases
Sample 00-sample-00, 00-sample-01, 00-sample-02
All 00-sample-00, 00-sample-01, 00-sample-02, 01-handmade-03, 01-handmade-04, 01-handmade-05, 01-handmade-06, 01-handmade-07, 01-handmade-08, 01-handmade-09, 01-handmade-10, 01-handmade-11, 01-handmade-12, 02-binary-13, 02-binary-14, 02-binary-15, 02-binary-16, 02-binary-17, 02-binary-18, 02-binary-19, 02-binary-20, 02-binary-21, 02-binary-22, 02-binary-23, 03-BigRandom-24, 03-BigRandom-25, 03-BigRandom-26, 03-BigRandom-27, 03-BigRandom-28, 03-BigRandom-29, 03-BigRandom-30, 03-BigRandom-31, 03-BigRandom-32, 03-BigRandom-33, 03-BigRandom-34, 03-BigRandom-35, 03-BigRandom-36, 03-BigRandom-37, 03-BigRandom-38, 03-BigRandom-39, 03-BigRandom-40, 03-BigRandom-41, 03-BigRandom-42, 03-BigRandom-43, 03-BigRandom-44, 03-BigRandom-45, 03-BigRandom-46, 03-BigRandom-47, 03-BigRandom-48, 03-BigRandom-49, 03-BigRandom-50, 03-BigRandom-51, 03-BigRandom-52, 03-BigRandom-53, 03-BigRandom-54, 04-zero-55, 04-zero-56, 05-AllRandom-57, 05-AllRandom-58, 05-AllRandom-59, 05-AllRandom-60, 05-AllRandom-61, 05-AllRandom-62, 05-AllRandom-63, 05-AllRandom-64, 05-AllRandom-65, 05-AllRandom-66, 05-AllRandom-67, 05-AllRandom-68, 05-AllRandom-69
Case Name Status Exec Time Memory
00-sample-00 AC 59 ms 14196 KiB
00-sample-01 AC 55 ms 14184 KiB
00-sample-02 AC 57 ms 14188 KiB
01-handmade-03 AC 703 ms 61716 KiB
01-handmade-04 AC 357 ms 40020 KiB
01-handmade-05 AC 1688 ms 16492 KiB
01-handmade-06 AC 1674 ms 16484 KiB
01-handmade-07 AC 1679 ms 16404 KiB
01-handmade-08 AC 711 ms 45968 KiB
01-handmade-09 AC 100 ms 19732 KiB
01-handmade-10 AC 94 ms 19256 KiB
01-handmade-11 AC 442 ms 46764 KiB
01-handmade-12 AC 474 ms 49064 KiB
02-binary-13 AC 68 ms 14976 KiB
02-binary-14 AC 71 ms 15304 KiB
02-binary-15 AC 66 ms 14904 KiB
02-binary-16 AC 66 ms 15136 KiB
02-binary-17 AC 71 ms 15224 KiB
02-binary-18 AC 70 ms 15320 KiB
02-binary-19 AC 64 ms 14828 KiB
02-binary-20 AC 67 ms 14828 KiB
02-binary-21 AC 63 ms 15000 KiB
02-binary-22 AC 60 ms 14944 KiB
02-binary-23 AC 63 ms 14652 KiB
03-BigRandom-24 AC 1366 ms 16216 KiB
03-BigRandom-25 AC 1365 ms 16164 KiB
03-BigRandom-26 AC 1030 ms 16360 KiB
03-BigRandom-27 AC 1116 ms 16176 KiB
03-BigRandom-28 AC 766 ms 15284 KiB
03-BigRandom-29 AC 942 ms 16248 KiB
03-BigRandom-30 AC 703 ms 15312 KiB
03-BigRandom-31 AC 1145 ms 16316 KiB
03-BigRandom-32 AC 982 ms 15572 KiB
03-BigRandom-33 AC 751 ms 15352 KiB
03-BigRandom-34 AC 1572 ms 16000 KiB
03-BigRandom-35 AC 739 ms 15352 KiB
03-BigRandom-36 AC 1210 ms 16576 KiB
03-BigRandom-37 AC 1387 ms 16256 KiB
03-BigRandom-38 AC 1118 ms 16472 KiB
03-BigRandom-39 AC 1587 ms 16360 KiB
03-BigRandom-40 AC 705 ms 15404 KiB
03-BigRandom-41 AC 1303 ms 16408 KiB
03-BigRandom-42 AC 1392 ms 16256 KiB
03-BigRandom-43 AC 1380 ms 16124 KiB
03-BigRandom-44 AC 978 ms 16076 KiB
03-BigRandom-45 AC 792 ms 15492 KiB
03-BigRandom-46 AC 784 ms 16068 KiB
03-BigRandom-47 AC 1048 ms 16420 KiB
03-BigRandom-48 AC 1373 ms 16360 KiB
03-BigRandom-49 AC 906 ms 16288 KiB
03-BigRandom-50 AC 965 ms 16328 KiB
03-BigRandom-51 AC 1483 ms 16680 KiB
03-BigRandom-52 AC 960 ms 16272 KiB
03-BigRandom-53 AC 1063 ms 16452 KiB
03-BigRandom-54 AC 1337 ms 16312 KiB
04-zero-55 AC 54 ms 14132 KiB
04-zero-56 AC 56 ms 14200 KiB
05-AllRandom-57 AC 60 ms 14420 KiB
05-AllRandom-58 AC 58 ms 14520 KiB
05-AllRandom-59 AC 58 ms 14552 KiB
05-AllRandom-60 AC 58 ms 14420 KiB
05-AllRandom-61 AC 60 ms 14432 KiB
05-AllRandom-62 AC 62 ms 14532 KiB
05-AllRandom-63 AC 56 ms 14456 KiB
05-AllRandom-64 AC 59 ms 14444 KiB
05-AllRandom-65 AC 59 ms 14424 KiB
05-AllRandom-66 AC 59 ms 14412 KiB
05-AllRandom-67 AC 58 ms 14424 KiB
05-AllRandom-68 AC 60 ms 14528 KiB
05-AllRandom-69 AC 58 ms 14664 KiB