Submission #44267337
Source Code Expand
(N,M),*WL = $<.map{|ln| ln.split.map(&:to_i) }
WL.map!{|w,l| [w-1,l-1] }
W2L = WL.group_by{|w,|w}.transform_values{|wls| wls.map{_2} }
F = lambda{|i|
(W2L[i]||[]).sum(&F)|1<<i
}
p (N.times.find{|i|
(W2L[i]||[]).sum(&F)|1<<i == (1<<N)-1
}||-2)+1
Submission Info
| Submission Time | |
|---|---|
| Task | B - Who is Saikyo? |
| User | ds14050 |
| Language | Ruby (2.7.1) |
| Score | 0 |
| Code Size | 256 Byte |
| Status | TLE |
| Exec Time | 2206 ms |
| Memory | 14536 KiB |
Judge Result
| Set Name | Sample | All | ||||||
|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 300 | ||||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 02_min_00.txt, 02_min_01.txt, 02_min_02.txt, 03_corner_00.txt, 03_corner_01.txt, 03_corner_02.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 64 ms | 14196 KiB |
| 00_sample_01.txt | AC | 60 ms | 14024 KiB |
| 00_sample_02.txt | AC | 64 ms | 14140 KiB |
| 01_random_00.txt | TLE | 2206 ms | 14240 KiB |
| 01_random_01.txt | AC | 64 ms | 14208 KiB |
| 01_random_02.txt | AC | 65 ms | 14156 KiB |
| 01_random_03.txt | AC | 63 ms | 14136 KiB |
| 01_random_04.txt | TLE | 2206 ms | 14536 KiB |
| 01_random_05.txt | AC | 64 ms | 14100 KiB |
| 01_random_06.txt | TLE | 2206 ms | 14208 KiB |
| 01_random_07.txt | TLE | 2206 ms | 14208 KiB |
| 01_random_08.txt | AC | 60 ms | 14112 KiB |
| 01_random_09.txt | AC | 58 ms | 14016 KiB |
| 01_random_10.txt | AC | 61 ms | 14208 KiB |
| 01_random_11.txt | TLE | 2206 ms | 14284 KiB |
| 01_random_12.txt | TLE | 2206 ms | 14116 KiB |
| 01_random_13.txt | TLE | 2206 ms | 14216 KiB |
| 01_random_14.txt | TLE | 2206 ms | 14524 KiB |
| 01_random_15.txt | AC | 57 ms | 14132 KiB |
| 01_random_16.txt | AC | 57 ms | 14028 KiB |
| 02_min_00.txt | AC | 55 ms | 13984 KiB |
| 02_min_01.txt | AC | 55 ms | 14212 KiB |
| 02_min_02.txt | AC | 59 ms | 14240 KiB |
| 03_corner_00.txt | AC | 54 ms | 14052 KiB |
| 03_corner_01.txt | AC | 56 ms | 14104 KiB |
| 03_corner_02.txt | TLE | 2206 ms | 14412 KiB |