Submission #2718935
Source Code Expand
# # File : C.rb # Author : Kazune Takahashi # Created : 2018-6-23 21:01:02 # Powered by Visual Studio Code # n, k = gets.chomp.split(" ").map{|i| i.to_i} a = gets.chomp.split(" ").map{|i| i.to_i} ind = 0 for i in 0...a.size if (a[i] == 1) ind = i break end end f = i l = a.size - i - 1 puts (f + k - 2) / (k - 1) + (l + k - 2) / (k - 1)
Submission Info
Submission Time | |
---|---|
Task | C - Minimization |
User | kazunetakahashi |
Language | Ruby (2.3.3) |
Score | 0 |
Code Size | 383 Byte |
Status | WA |
Exec Time | 48 ms |
Memory | 8708 KB |
Compile Error
./Main.rb:8: warning: assigned but unused variable - n
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 | 23 ms | 4476 KB |
10.txt | AC | 39 ms | 7172 KB |
2.txt | AC | 48 ms | 8708 KB |
3.txt | AC | 32 ms | 5636 KB |
4.txt | WA | 43 ms | 8452 KB |
5.txt | WA | 47 ms | 8708 KB |
6.txt | WA | 45 ms | 8708 KB |
7.txt | AC | 10 ms | 2172 KB |
8.txt | AC | 44 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 |