結果
問題 | No.1764 Square |
ユーザー |
![]() |
提出日時 | 2024-06-12 16:56:08 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 595 bytes |
コンパイル時間 | 2,166 ms |
コンパイル使用メモリ | 198,596 KB |
最終ジャッジ日時 | 2025-02-21 21:18:59 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
#include <bits/stdc++.h>using namespace std;void fast_io() {ios_base::sync_with_stdio(false);cin.tie(nullptr);}int main() {fast_io();vector<deque<char>> dq(4);dq[0].push_back('A');dq[1].push_back('B');dq[2].push_back('C');dq[3].push_back('D');dq[0].push_back('E');int k;cin >> k;for (int i = 0; i < k; i++) {dq[(i + 1) % 4].push_back(dq[i % 4].front());dq[i % 4].pop_front();}for (int i = 0; i < 4; i++) {for (char c : dq[i]) {cout << c;}cout << "\n";}}