結果
| 問題 |
No.501 穴と文字列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-10-07 01:14:41 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 606 bytes |
| コンパイル時間 | 677 ms |
| コンパイル使用メモリ | 94,284 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-07 01:14:43 |
| 合計ジャッジ時間 | 1,705 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <set>
#include <unordered_set>
#include <cstring>
#include <queue>
#include <bitset>
#include <map>
#include <stack>
using namespace std;
int main(void)
{
cin.tie(0);
ios::sync_with_stdio(false);
int b = 0;
int n,d;
cin >> n >> d;
if(d > n)
{
int x = d - n;
for(int i=0;i<n;i++)
{
if(n-i <= x)
{
cout << 'B';
}
else
{
cout << 'A';
}
}
cout << '\n';
}
else
{
for(int i=0;i<d;i++)
{
cout << 'A';
}
for(int i=d;i<n;i++)
{
cout << 'C';
}
}
return 0;
}