結果
問題 | No.501 穴と文字列 |
ユーザー |
![]() |
提出日時 | 2017-07-07 06:35:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 306 bytes |
コンパイル時間 | 1,546 ms |
コンパイル使用メモリ | 166,752 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-14 16:40:19 |
合計ジャッジ時間 | 2,225 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> #define REP(i,n,N) for(int i=(n);i<(int) N;i++) #define p(s) cout<<(s)<<endl using namespace std; int main() { int N,D; cin>>N>>D; string s=""; if(N<=D){ REP(i,0,2*N-D) s+='A'; REP(i,0,D-N) s+='B'; }else{ REP(i,0,D) s+='A'; REP(i,0,N-D) s+='C'; } p(s); return 0; }