結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー yudedakoyudedako
提出日時 2022-01-25 13:39:14
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 1,928 ms / 2,000 ms
コード長 389 bytes
コンパイル時間 12,603 ms
コンパイル使用メモリ 272,856 KB
実行使用メモリ 110,444 KB
最終ジャッジ日時 2024-04-25 23:16:35
合計ジャッジ時間 71,255 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 890 ms
65,200 KB
testcase_01 AC 911 ms
65,260 KB
testcase_02 AC 902 ms
65,500 KB
testcase_03 AC 899 ms
65,340 KB
testcase_04 AC 891 ms
65,424 KB
testcase_05 AC 919 ms
65,228 KB
testcase_06 AC 901 ms
65,444 KB
testcase_07 AC 888 ms
65,472 KB
testcase_08 AC 904 ms
65,260 KB
testcase_09 AC 863 ms
65,340 KB
testcase_10 AC 848 ms
65,360 KB
testcase_11 AC 933 ms
65,316 KB
testcase_12 AC 873 ms
65,596 KB
testcase_13 AC 913 ms
65,444 KB
testcase_14 AC 901 ms
65,496 KB
testcase_15 AC 887 ms
65,440 KB
testcase_16 AC 1,504 ms
83,064 KB
testcase_17 AC 1,842 ms
101,976 KB
testcase_18 AC 1,630 ms
96,120 KB
testcase_19 AC 1,372 ms
72,680 KB
testcase_20 AC 1,425 ms
74,624 KB
testcase_21 AC 1,902 ms
106,380 KB
testcase_22 AC 1,928 ms
105,520 KB
testcase_23 AC 1,742 ms
110,212 KB
testcase_24 AC 1,927 ms
110,212 KB
testcase_25 AC 1,850 ms
110,328 KB
testcase_26 AC 1,847 ms
110,144 KB
testcase_27 AC 1,866 ms
105,300 KB
testcase_28 AC 1,740 ms
110,444 KB
testcase_29 AC 1,726 ms
110,240 KB
testcase_30 AC 1,924 ms
110,296 KB
testcase_31 AC 1,680 ms
105,316 KB
testcase_32 AC 1,536 ms
110,368 KB
testcase_33 AC 1,532 ms
110,132 KB
testcase_34 AC 1,509 ms
108,232 KB
testcase_35 AC 1,526 ms
107,816 KB
testcase_36 AC 873 ms
65,272 KB
testcase_37 AC 861 ms
65,364 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import scala.annotation.tailrec
import scala.io.StdIn.*




@main def main =
  val Array(n, k) = readLine().split(' ').map(_.toInt)
  val a = readLine().split(' ').map(_.toLong)
  val b = readLine().split(' ').map(_.toLong)
  val result = Array.fill(n){'B'}
  for i <- (0 until n).sortWith{(i, j) => (a(j) - b(j)) < (a(i) - b(i))}.take(k) do
    result(i) = 'A'
  println(result.mkString)
0