Submission #241977


Source Code Expand

Copy
niku = [0,0,0,0]
n = gets.to_i

n.times do |i|
	niku[i] = gets.to_i
end

niku.sort.reverse!

if niku[0] >= niku[1] + niku[2] + niku[3]
	puts niku[0]
elsif niku[0] + niku[3] >= niku[1] + niku[2]
	puts niku[0] + niku[3]
elsif
	puts niku[1] + niku[2]
end

Submission Info

Submission Time
Task A - 高橋君とお肉
User cocoa_dahlia
Language Ruby (1.9.3)
Score 0
Code Size 266 Byte
Status WA
Exec Time 70 ms
Memory 4228 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 100
Status
AC × 2
WA × 1
AC × 12
WA × 7
Set Name Test Cases
Sample subtask0-sample-01.txt, subtask0-sample-02.txt, subtask0-sample-03.txt
All subtask0-sample-01.txt, subtask0-sample-02.txt, subtask0-sample-03.txt, subtask1-01.txt, subtask1-02.txt, subtask1-03.txt, subtask1-04.txt, subtask1-05.txt, subtask1-06.txt, subtask1-07.txt, subtask1-08.txt, subtask1-09.txt, subtask1-10.txt, subtask1-11.txt, subtask1-12.txt, subtask1-13.txt, subtask1-14.txt, subtask1-15.txt, subtask1-16.txt
Case Name Status Exec Time Memory
subtask0-sample-01.txt AC 53 ms 4208 KB
subtask0-sample-02.txt WA 57 ms 4212 KB
subtask0-sample-03.txt AC 53 ms 4212 KB
subtask1-01.txt AC 53 ms 4212 KB
subtask1-02.txt AC 57 ms 4212 KB
subtask1-03.txt AC 53 ms 4212 KB
subtask1-04.txt AC 56 ms 4212 KB
subtask1-05.txt AC 55 ms 4212 KB
subtask1-06.txt WA 54 ms 4212 KB
subtask1-07.txt WA 54 ms 4208 KB
subtask1-08.txt AC 61 ms 4188 KB
subtask1-09.txt WA 59 ms 4208 KB
subtask1-10.txt WA 70 ms 4200 KB
subtask1-11.txt WA 70 ms 4228 KB
subtask1-12.txt WA 58 ms 4212 KB
subtask1-13.txt AC 55 ms 4212 KB
subtask1-14.txt AC 61 ms 4216 KB
subtask1-15.txt AC 56 ms 4212 KB
subtask1-16.txt AC 52 ms 4212 KB