結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 WA -
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 3 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 3 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 3 ms
4,348 KB
testcase_14 AC 3 ms
4,348 KB
testcase_15 AC 2 ms
4,348 KB
testcase_16 AC 102 ms
6,448 KB
testcase_17 AC 186 ms
9,088 KB
testcase_18 AC 142 ms
7,768 KB
testcase_19 AC 59 ms
5,128 KB
testcase_20 AC 65 ms
5,392 KB
testcase_21 AC 197 ms
9,616 KB
testcase_22 AC 198 ms
9,616 KB
testcase_23 AC 197 ms
9,616 KB
testcase_24 AC 199 ms
9,616 KB
testcase_25 AC 197 ms
9,616 KB
testcase_26 AC 197 ms
9,616 KB
testcase_27 AC 196 ms
9,616 KB
testcase_28 AC 198 ms
9,616 KB
testcase_29 AC 197 ms
9,616 KB
testcase_30 AC 196 ms
9,616 KB
testcase_31 WA -
testcase_32 AC 188 ms
9,616 KB
testcase_33 AC 187 ms
9,616 KB
testcase_34 AC 187 ms
9,616 KB
testcase_35 AC 190 ms
9,616 KB
testcase_36 AC 2 ms
4,348 KB
testcase_37 WA -
権限があれば一括ダウンロードができます

ソースコード

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;
    while(elem==c[n-m+cnt]) cnt++;
    rep(i,n){
        if(d[i]==elem&&cnt>0)  {out("A",""); cnt--;}
        else if(d[i]>elem)  out("A","");
        else    out("B","");
    }
    out("",endl);

    return 0;
}
0