Submission #33224936
Source Code Expand
N,K = gets.split.map(&:to_i)
SW = $<.map{|ln|
w,p = ln.split.map(&:to_i)
next w*p*100000000,w
}
p (0..10000000000).bsearch{|p|
SW.map{|s,w| s-w*p }.max(K).sum<0
}*1e-8
Submission Info
| Submission Time | |
|---|---|
| Task | D - 食塩水 |
| User | ds14050 |
| Language | Ruby (2.7.1) |
| Score | 100 |
| Code Size | 179 Byte |
| Status | AC |
| Exec Time | 67 ms |
| Memory | 14452 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | s0.txt, s1.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, s0.txt, s1.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 63 ms | 14216 KiB |
| 001.txt | AC | 56 ms | 14180 KiB |
| 002.txt | AC | 62 ms | 14052 KiB |
| 003.txt | AC | 58 ms | 14116 KiB |
| 004.txt | AC | 63 ms | 14084 KiB |
| 005.txt | AC | 66 ms | 14368 KiB |
| 006.txt | AC | 63 ms | 14204 KiB |
| 007.txt | AC | 61 ms | 14244 KiB |
| 008.txt | AC | 67 ms | 14408 KiB |
| 009.txt | AC | 62 ms | 14356 KiB |
| 010.txt | AC | 65 ms | 14252 KiB |
| 011.txt | AC | 59 ms | 14296 KiB |
| 012.txt | AC | 60 ms | 14204 KiB |
| 013.txt | AC | 58 ms | 14076 KiB |
| 014.txt | AC | 67 ms | 14452 KiB |
| 015.txt | AC | 62 ms | 14316 KiB |
| 016.txt | AC | 61 ms | 14180 KiB |
| 017.txt | AC | 62 ms | 14264 KiB |
| 018.txt | AC | 62 ms | 14300 KiB |
| 019.txt | AC | 61 ms | 14364 KiB |
| s0.txt | AC | 60 ms | 14268 KiB |
| s1.txt | AC | 58 ms | 14112 KiB |