結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー mnmmnm
提出日時 2022-06-12 00:45:14
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 706 bytes
コンパイル時間 1,233 ms
コンパイル使用メモリ 83,164 KB
実行使用メモリ 9,616 KB
最終ジャッジ日時 2023-10-23 17:20:41
合計ジャッジ時間 15,181 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,372 KB
testcase_13 AC 3 ms
4,372 KB
testcase_14 AC 2 ms
4,372 KB
testcase_15 AC 2 ms
4,372 KB
testcase_16 AC 102 ms
6,448 KB
testcase_17 AC 188 ms
9,088 KB
testcase_18 AC 143 ms
7,768 KB
testcase_19 AC 58 ms
5,128 KB
testcase_20 AC 65 ms
5,392 KB
testcase_21 AC 196 ms
9,616 KB
testcase_22 AC 198 ms
9,616 KB
testcase_23 AC 198 ms
9,616 KB
testcase_24 AC 197 ms
9,616 KB
testcase_25 AC 200 ms
9,616 KB
testcase_26 AC 203 ms
9,616 KB
testcase_27 AC 199 ms
9,616 KB
testcase_28 AC 198 ms
9,616 KB
testcase_29 AC 197 ms
9,616 KB
testcase_30 AC 198 ms
9,616 KB
testcase_31 AC 198 ms
9,616 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 2 ms
4,348 KB
testcase_37 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <tuple>
#include <bitset>

#define rep(i,n) for(i=0; i<n; ++i)
#define in(a) cin >> a
#define out(a,b) cout << a << b
using namespace std;
using lint = long long;

int main(void){
    lint i, j;
    lint n, m;
    in(n);
    in(m);
    vector<lint> a(n); vector<lint> b(n); vector<lint> c(n);
    rep(i,n)    in(a[i]);
    rep(i,n)    in(b[i]);
    rep(i,n)    c[i]=a[i]-b[i];
    vector<lint> d=c;
    sort(c.begin(), c.end());
    lint elem=c[n-m];
    int cnt=0;
    rep(i,n){
        if(d[i]>=elem&&cnt<m)  {out("A",""); cnt++;}
        else    out("B","");
    }
    out("",endl);

    return 0;
}
0