Submission #44498158
Source Code Expand
N,M = gets.split.map(&:to_i)
S = gets.chomp.chars
C = gets.split.map(&:to_i)
LC = (0..M).map{|c|
i = C.rindex c
next S[i] if i
}
puts S.zip(C).map{|c1,m|
c0,LC[m] = LC[m],c1
next c0
}*''
Submission Info
| Submission Time | |
|---|---|
| Task | C - Rotate Colored Subsequence |
| User | ds14050 |
| Language | Ruby (ruby 3.2.2) |
| Score | 0 |
| Code Size | 202 Byte |
| Status | TLE |
| Exec Time | 2209 ms |
| Memory | 50120 KiB |
Judge Result
| Set Name | Sample | All | ||||||
|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 300 | ||||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt, 024.txt, 025.txt, 026.txt, example0.txt, example1.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 47 ms | 17204 KiB |
| 001.txt | AC | 126 ms | 49172 KiB |
| 002.txt | TLE | 2209 ms | 41156 KiB |
| 003.txt | AC | 130 ms | 49200 KiB |
| 004.txt | AC | 137 ms | 49628 KiB |
| 005.txt | AC | 1704 ms | 50120 KiB |
| 006.txt | TLE | 2004 ms | 23792 KiB |
| 007.txt | TLE | 2208 ms | 25084 KiB |
| 008.txt | TLE | 2209 ms | 26964 KiB |
| 009.txt | TLE | 2209 ms | 40416 KiB |
| 010.txt | AC | 539 ms | 50056 KiB |
| 011.txt | AC | 137 ms | 49656 KiB |
| 012.txt | AC | 136 ms | 49628 KiB |
| 013.txt | AC | 134 ms | 49328 KiB |
| 014.txt | AC | 134 ms | 49324 KiB |
| 015.txt | AC | 131 ms | 49300 KiB |
| 016.txt | AC | 133 ms | 46788 KiB |
| 017.txt | AC | 131 ms | 49652 KiB |
| 018.txt | AC | 129 ms | 46816 KiB |
| 019.txt | AC | 130 ms | 49292 KiB |
| 020.txt | AC | 130 ms | 49288 KiB |
| 021.txt | AC | 132 ms | 49264 KiB |
| 022.txt | AC | 130 ms | 49280 KiB |
| 023.txt | AC | 130 ms | 49404 KiB |
| 024.txt | AC | 129 ms | 49216 KiB |
| 025.txt | AC | 126 ms | 49172 KiB |
| 026.txt | AC | 125 ms | 49132 KiB |
| example0.txt | AC | 45 ms | 17320 KiB |
| example1.txt | AC | 45 ms | 17144 KiB |