Submission #790942
Source Code Expand
n, m = gets.chomp.split(" ").map(&:to_i)
xys = []
m.times do
x, y = gets.chomp.split(" ").map(&:to_i)
xys.push([x, y])
end
base = []
i = 1
n.times do
base.push(i)
i += 1
end
fini = base.permutation(n).to_a
xys.each do |xy|
fini.delete_if do |arr|
arr.index(xy[1]) < arr.index(xy[0])
end
end
puts fini.size
Submission Info
| Submission Time | |
|---|---|
| Task | D - 徒競走 |
| User | yokkun_s |
| Language | Ruby (2.3.3) |
| Score | 30 |
| Code Size | 342 Byte |
| Status | TLE |
| Exec Time | 3195 ms |
| Memory | 315004 KiB |
Judge Result
| Set Name | Sample | Subtask1 | All | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 30 / 30 | 0 / 70 | ||||||||||
| Status |
|
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 0_00.txt, 0_01.txt, 0_02.txt |
| Subtask1 | 0_00.txt, 0_01.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt, 1_08.txt, 1_09.txt, 1_10.txt, 1_11.txt, 1_12.txt |
| All | 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt, 1_08.txt, 1_09.txt, 1_10.txt, 1_11.txt, 1_12.txt, 2_00.txt, 2_01.txt, 2_02.txt, 2_03.txt, 2_04.txt, 2_05.txt, 2_06.txt, 2_07.txt, 2_08.txt, 2_09.txt, 2_10.txt, 2_11.txt, 2_12.txt, 2_13.txt, 2_14.txt, 2_15.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 0_00.txt | AC | 18 ms | 1788 KiB |
| 0_01.txt | AC | 18 ms | 1788 KiB |
| 0_02.txt | TLE | 3187 ms | 288508 KiB |
| 1_00.txt | AC | 17 ms | 1788 KiB |
| 1_01.txt | AC | 60 ms | 6780 KiB |
| 1_02.txt | AC | 84 ms | 6780 KiB |
| 1_03.txt | AC | 83 ms | 6780 KiB |
| 1_04.txt | AC | 81 ms | 6780 KiB |
| 1_05.txt | AC | 25 ms | 2172 KiB |
| 1_06.txt | AC | 25 ms | 2172 KiB |
| 1_07.txt | AC | 25 ms | 2172 KiB |
| 1_08.txt | AC | 25 ms | 2172 KiB |
| 1_09.txt | AC | 75 ms | 6780 KiB |
| 1_10.txt | AC | 75 ms | 6780 KiB |
| 1_11.txt | AC | 60 ms | 6780 KiB |
| 1_12.txt | AC | 70 ms | 6780 KiB |
| 2_00.txt | TLE | 3190 ms | 291452 KiB |
| 2_01.txt | TLE | 3191 ms | 287228 KiB |
| 2_02.txt | TLE | 3191 ms | 292604 KiB |
| 2_03.txt | TLE | 3192 ms | 292860 KiB |
| 2_04.txt | TLE | 3194 ms | 315004 KiB |
| 2_05.txt | TLE | 3190 ms | 315004 KiB |
| 2_06.txt | TLE | 3195 ms | 315004 KiB |
| 2_07.txt | TLE | 3195 ms | 315004 KiB |
| 2_08.txt | TLE | 3194 ms | 292604 KiB |
| 2_09.txt | TLE | 3194 ms | 288636 KiB |
| 2_10.txt | TLE | 3193 ms | 290044 KiB |
| 2_11.txt | TLE | 3194 ms | 287228 KiB |
| 2_12.txt | TLE | 3193 ms | 287228 KiB |
| 2_13.txt | TLE | 3192 ms | 289148 KiB |
| 2_14.txt | TLE | 3193 ms | 287740 KiB |
| 2_15.txt | TLE | 3193 ms | 290172 KiB |