結果
| 問題 | No.1764 Square |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-21 09:21:02 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 578 bytes |
| 記録 | |
| コンパイル時間 | 2,960 ms |
| コンパイル使用メモリ | 276,292 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-07-04 04:46:56 |
| 合計ジャッジ時間 | 3,901 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;
int K;
queue<char> que[4];
int main() {
cin >> K;
que[0].push('A'); que[0].push('E');
que[1].push('B');
que[2].push('C');
que[3].push('D');
for (int i = 0; i < K; i++) {
int a = que[i % 4].front(); que[i % 4].pop();
que[(i + 1) % 4].push(a);
}
for (int i = 0; i < 4; i++) {
while (!que[i].empty()) {
int a = que[i].front(); que[i].pop();
cout << char(a);
}
cout << endl;
}
return 0;
}