結果
| 問題 | No.3728 Half and Half, and Double |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-19 15:02:09 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 4 ms / 2,000 ms |
| + 52µs | |
| コード長 | 641 bytes |
| 記録 | |
| コンパイル時間 | 2,090 ms |
| コンパイル使用メモリ | 334,024 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-19 15:02:19 |
| 合計ジャッジ時間 | 4,491 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 33 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin>>N;
if(N<=2){
cout<<-1<<"\n";
return 0;
}
vector<string> S(2*N,string(2*N,'A'));
ll F=(N*N*2);
for(int j=2*N-2;j>=0;j--){
for(int i=2*N-1;i>0;i--){
if(F>0){
S[i][j]='B';
F--;
if(F==0){
S[i-1][j]='B';
S[2*N-1][j]='A';
F=-1;
}
}
}
}
for(int i=0;i<2*N;i++)cout<<S[i]<<"\n";
}