結果
| 問題 | No.1764 Square | 
| コンテスト | |
| ユーザー |  ぷら | 
| 提出日時 | 2021-12-06 19:00:41 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 567 bytes | 
| コンパイル時間 | 1,970 ms | 
| コンパイル使用メモリ | 200,260 KB | 
| 最終ジャッジ日時 | 2025-01-26 05:55:57 | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 5 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
    vector<deque<int>>tmp(4);
    tmp[0].push_back(0);
    tmp[0].push_back(4);
    tmp[1].push_back(1);
    tmp[2].push_back(2);
    tmp[3].push_back(3);
    int K;
    cin >> K;
    for(int i = 0; i < K; i++) {
        int a = tmp[i%4].front();
        tmp[i%4].pop_front();
        tmp[(i+1)%4].push_back(a);
    }
    for(int i = 0; i < 4; i++) {
        while (!tmp[i].empty()) {
            cout << (char)((tmp[i].front()+'A'));
            tmp[i].pop_front();
        }
        cout << endl;
    }
}
            
            
            
        