結果
| 問題 | No.501 穴と文字列 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-07 22:45:09 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 272µs | |
| コード長 | 309 bytes |
| 記録 | |
| コンパイル時間 | 315 ms |
| コンパイル使用メモリ | 79,752 KB |
| 実行使用メモリ | 9,900 KB |
| 最終ジャッジ日時 | 2026-10-03 13:47:48 |
| 合計ジャッジ時間 | 1,604 ms |
|
ジャッジサーバーID (参考情報) |
judge4_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <iostream>
#include <algorithm>
#include <utility>
#include <string>
using namespace std;
int main() {
int n, d;
cin >> n >> d;
string s;
if (d <= n) {
s = string(d, 'A') + string(n - d, 'C');
} else {
s = string(2 * n - d, 'A') + string(d - n, 'B');
}
cout << s << endl;
return 0;
}