結果
| 問題 | No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia |
| コンテスト | |
| ユーザー |
沙耶花
|
| 提出日時 | 2021-10-29 21:30:01 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 486 bytes |
| 記録 | |
| コンパイル時間 | 4,544 ms |
| コンパイル使用メモリ | 255,828 KB |
| 最終ジャッジ日時 | 2025-01-25 08:28:56 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 31 |
ソースコード
#include <stdio.h>
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using mint = modint998244353;
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf 10000000000000000
int main(){
int N,K;
cin>>N>>K;
vector<pair<long long,int>> v(N);
rep(i,N){
long long a,b;cin>>a>>b;
v[i] = make_pair(a-b,i);
}
sort(v.rbegin(),v.rend());
string ans(N,'B');
rep(i,K){
ans[v[i].second] = 'A';
}
cout<<ans<<endl;
return 0;
}
沙耶花