Submission #3229266
Source Code Expand
n, k = gets.chomp.split(" ").map(&:to_i) a = gets.chomp.split(" ").map(&:to_i) placeOne = 0 for i in 0..(n-1) do if a[i] == 1 placeOne = i end end def devide (a, b) if a % b == 0 return a / b else return a / b + 1 end end p devide(placeOne, (k - 1)) + devide((n - placeOne - 1), (k - 1))
Submission Info
Submission Time | |
---|---|
Task | C - Minimization |
User | Kouch |
Language | Ruby (2.3.3) |
Score | 0 |
Code Size | 326 Byte |
Status | WA |
Exec Time | 49 ms |
Memory | 8708 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt, sample3.txt |
All | sample1.txt, sample2.txt, sample3.txt, 1.txt, 10.txt, 2.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 | AC | 24 ms | 4476 KB |
10.txt | AC | 40 ms | 7172 KB |
2.txt | AC | 49 ms | 8708 KB |
3.txt | AC | 32 ms | 5636 KB |
4.txt | WA | 48 ms | 8452 KB |
5.txt | WA | 49 ms | 8708 KB |
6.txt | WA | 49 ms | 8708 KB |
7.txt | AC | 10 ms | 2172 KB |
8.txt | AC | 43 ms | 7812 KB |
9.txt | WA | 7 ms | 1788 KB |
sample1.txt | AC | 7 ms | 1788 KB |
sample2.txt | AC | 7 ms | 1788 KB |
sample3.txt | AC | 7 ms | 1788 KB |