結果
| 問題 |
No.501 穴と文字列
|
| コンテスト | |
| ユーザー |
forest3
|
| 提出日時 | 2025-03-25 13:58:15 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 353 bytes |
| コンパイル時間 | 1,572 ms |
| コンパイル使用メモリ | 163,064 KB |
| 実行使用メモリ | 7,324 KB |
| 最終ジャッジ日時 | 2025-03-25 13:58:18 |
| 合計ジャッジ時間 | 2,663 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <atcoder/fenwicktree>
using ll = long long;
#define rep(i, n) for(int i = 0; i < n; i++)
int main() {
int N, d;
cin >> N >> d;
string s;
if(N > d) {
s = string(d, 'A') + string(N - d, 'C');
}
else {
int d1 = d - N;
s = string(N - d1, 'A') + string(d1, 'B');
}
cout << s << endl;
}
forest3