結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー Nzt3Nzt3
提出日時 2022-09-28 13:17:49
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 550 bytes
コンパイル時間 2,143 ms
コンパイル使用メモリ 208,984 KB
実行使用メモリ 9,380 KB
最終ジャッジ日時 2023-08-24 04:23:47
合計ジャッジ時間 13,637 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 2 ms
4,384 KB
testcase_16 AC 40 ms
6,140 KB
testcase_17 AC 73 ms
8,988 KB
testcase_18 AC 56 ms
7,544 KB
testcase_19 AC 23 ms
4,812 KB
testcase_20 AC 26 ms
5,224 KB
testcase_21 AC 76 ms
9,312 KB
testcase_22 AC 77 ms
9,380 KB
testcase_23 AC 77 ms
9,376 KB
testcase_24 AC 77 ms
9,236 KB
testcase_25 AC 76 ms
9,372 KB
testcase_26 AC 77 ms
9,272 KB
testcase_27 AC 77 ms
9,304 KB
testcase_28 AC 76 ms
9,380 KB
testcase_29 AC 76 ms
9,344 KB
testcase_30 AC 77 ms
9,340 KB
testcase_31 AC 76 ms
9,256 KB
testcase_32 AC 78 ms
9,236 KB
testcase_33 AC 80 ms
9,260 KB
testcase_34 AC 81 ms
9,284 KB
testcase_35 AC 81 ms
9,280 KB
testcase_36 AC 2 ms
4,380 KB
testcase_37 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int N,K;
  cin>>N>>K;
  vector<array<long long,2>>A(N);
  for(auto &i:A)cin>>i[0];
  for(auto &i:A)cin>>i[1];
  long long s=0;
  for(int i=0;i<N;i++)s+=A[i][1];
  vector<pair<long long,int>>D(N);
  for(int i=0;i<N;i++){
    D[i]={A[i][0]-A[i][1],i};
  }
  sort(D.begin(),D.end());
  reverse(D.begin(),D.end());
  vector<bool>B(N,true);
  for(int i=0;i<K;i++){
    B[D[i].second]=false;
  }
  for(auto i:B)cout<<(i?'B':'A');
  cout<<'\n';
}
0