結果

問題 No.1570 Blocks
ユーザー yuruhiyayuruhiya
提出日時 2021-06-27 15:52:18
言語 Crystal
(1.11.2)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 17,847 ms
コンパイル使用メモリ 258,104 KB
実行使用メモリ 12,664 KB
最終ジャッジ日時 2023-09-07 18:00:00
合計ジャッジ時間 21,456 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,544 KB
testcase_01 AC 2 ms
4,460 KB
testcase_02 AC 34 ms
9,552 KB
testcase_03 AC 42 ms
10,864 KB
testcase_04 AC 30 ms
9,144 KB
testcase_05 AC 32 ms
9,328 KB
testcase_06 AC 33 ms
9,588 KB
testcase_07 AC 7 ms
5,260 KB
testcase_08 AC 40 ms
10,640 KB
testcase_09 AC 46 ms
11,632 KB
testcase_10 AC 37 ms
10,380 KB
testcase_11 AC 41 ms
10,880 KB
testcase_12 AC 47 ms
11,932 KB
testcase_13 AC 47 ms
11,780 KB
testcase_14 AC 49 ms
11,876 KB
testcase_15 AC 24 ms
8,036 KB
testcase_16 AC 48 ms
11,856 KB
testcase_17 AC 22 ms
7,748 KB
testcase_18 AC 39 ms
10,504 KB
testcase_19 AC 23 ms
7,920 KB
testcase_20 AC 24 ms
7,996 KB
testcase_21 AC 36 ms
9,976 KB
testcase_22 AC 2 ms
4,456 KB
testcase_23 AC 3 ms
4,392 KB
testcase_24 AC 2 ms
4,388 KB
testcase_25 AC 2 ms
4,380 KB
testcase_26 AC 2 ms
4,532 KB
testcase_27 AC 2 ms
4,388 KB
testcase_28 AC 2 ms
4,384 KB
testcase_29 AC 2 ms
4,380 KB
testcase_30 AC 2 ms
4,380 KB
testcase_31 AC 3 ms
4,400 KB
testcase_32 AC 46 ms
11,708 KB
testcase_33 AC 47 ms
11,980 KB
testcase_34 AC 45 ms
11,528 KB
testcase_35 AC 47 ms
11,848 KB
testcase_36 AC 47 ms
11,776 KB
testcase_37 AC 46 ms
11,532 KB
testcase_38 AC 46 ms
11,568 KB
testcase_39 AC 48 ms
12,536 KB
testcase_40 AC 47 ms
11,640 KB
testcase_41 AC 47 ms
12,664 KB
testcase_42 AC 49 ms
12,024 KB
testcase_43 AC 49 ms
12,012 KB
testcase_44 AC 49 ms
12,276 KB
testcase_45 AC 50 ms
12,268 KB
testcase_46 AC 48 ms
12,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = read_line.to_i
sum = 0i64
puts (1..n).map {
  {Int64, Int64}.from read_line.split.map(&.to_i64)
}.sort_by { |a, b| a + b }.all? { |a, b|
  (sum <= b).tap { sum += a }
} ? "Yes" : "No"
0