結果

問題 No.904 サメトロ
ユーザー cielciel
提出日時 2019-01-24 06:50:50
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 153 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,544 KB
最終ジャッジ日時 2024-04-21 13:34:39
合計ジャッジ時間 10,244 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 198 ms
12,160 KB
testcase_01 AC 162 ms
12,416 KB
testcase_02 AC 313 ms
12,416 KB
testcase_03 AC 172 ms
12,416 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 190 ms
12,416 KB
testcase_08 WA -
testcase_09 AC 153 ms
12,288 KB
testcase_10 AC 187 ms
12,288 KB
testcase_11 AC 186 ms
12,544 KB
testcase_12 WA -
testcase_13 AC 160 ms
12,160 KB
testcase_14 AC 158 ms
12,288 KB
testcase_15 WA -
testcase_16 AC 192 ms
12,416 KB
testcase_17 WA -
testcase_18 AC 153 ms
12,288 KB
testcase_19 AC 165 ms
12,288 KB
testcase_20 AC 154 ms
12,032 KB
testcase_21 AC 172 ms
12,416 KB
testcase_22 AC 480 ms
12,288 KB
testcase_23 AC 175 ms
12,288 KB
testcase_24 AC 257 ms
12,288 KB
testcase_25 AC 155 ms
12,160 KB
testcase_26 AC 181 ms
12,416 KB
testcase_27 TLE -
testcase_28 AC 157 ms
12,288 KB
testcase_29 AC 157 ms
12,160 KB
testcase_30 AC 151 ms
12,288 KB
testcase_31 WA -
testcase_32 AC 156 ms
12,160 KB
testcase_33 AC 153 ms
12,288 KB
testcase_34 AC 158 ms
12,288 KB
testcase_35 AC 168 ms
12,288 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n=gets.to_i-1
a,b=$<.map{|e|e.split.map &:to_i}.transpose
sa,sb=[a,b].map(&:sum)
p (0..10**6).count{|x|
	x<=sb && (0...n).all?{|i|
		a[i]+b[i]<=x+sa
	}
}
0