結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー rogi52rogi52
提出日時 2022-10-07 10:26:55
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 469 bytes
コンパイル時間 5,851 ms
コンパイル使用メモリ 206,440 KB
実行使用メモリ 6,664 KB
最終ジャッジ日時 2023-09-02 11:38:30
合計ジャッジ時間 14,620 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,384 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,384 KB
testcase_07 AC 2 ms
4,384 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 1 ms
4,384 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 2 ms
4,384 KB
testcase_13 AC 2 ms
4,384 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 1 ms
4,384 KB
testcase_16 AC 37 ms
4,888 KB
testcase_17 AC 67 ms
6,212 KB
testcase_18 AC 52 ms
5,468 KB
testcase_19 AC 22 ms
4,380 KB
testcase_20 AC 23 ms
4,384 KB
testcase_21 AC 71 ms
6,492 KB
testcase_22 AC 71 ms
6,484 KB
testcase_23 AC 71 ms
6,472 KB
testcase_24 AC 71 ms
6,432 KB
testcase_25 AC 71 ms
6,552 KB
testcase_26 AC 71 ms
6,484 KB
testcase_27 AC 71 ms
6,520 KB
testcase_28 AC 71 ms
6,436 KB
testcase_29 AC 71 ms
6,432 KB
testcase_30 AC 71 ms
6,496 KB
testcase_31 AC 71 ms
6,524 KB
testcase_32 AC 73 ms
6,420 KB
testcase_33 AC 71 ms
6,468 KB
testcase_34 AC 75 ms
6,436 KB
testcase_35 AC 75 ms
6,664 KB
testcase_36 AC 2 ms
4,384 KB
testcase_37 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    
    int N,K; cin >> N >> K;
    vector<int> A(N), B(N);
    rep(i,N) cin >> A[i];
    rep(i,N) cin >> B[i];

    string S(N, 'B');
    vector<pair<int,int>> C(N);
    rep(i,N) C[i] = {A[i] - B[i], i};
    sort(C.rbegin(), C.rend());
    rep(i,K) S[C[i].second] = 'A';
    cout << S << endl;
}
0