結果
| 問題 | No.3728 Half and Half, and Double |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-19 17:09:39 |
| 言語 | C++23(gcc16) (gcc 16.1.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 15 ms / 2,000 ms |
| + 70µs | |
| コード長 | 847 bytes |
| 記録 | |
| コンパイル時間 | 3,860 ms |
| コンパイル使用メモリ | 348,044 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-19 17:09:47 |
| 合計ジャッジ時間 | 5,078 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 33 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int N;
cin >> N;
if(N <= 2) {
cout << "-1\n";
return 0;
}
N *= 2;
for(int i = 0; i < N; i++) {
for(int j = 0; j < N; j++) {
if(i == 0) {
cout << "A";
}
else if(j == N - 1) {
cout << "A";
}
else if(i <= N / 2) {
cout << "B";
}
else if(i == N / 2 + 1) {
if(j < N / 2 - 1) {
cout << "A";
}
else {
cout << "B";
}
}
else {
cout << "A";
}
}
cout << "\n";
}
return 0;
}