結果
| 問題 | No.1764 Square | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2021-12-10 14:57:32 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 595 bytes | 
| コンパイル時間 | 1,731 ms | 
| コンパイル使用メモリ | 172,524 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-18 08:42:23 | 
| 合計ジャッジ時間 | 1,890 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 5 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define all(A) A.begin(),A.end()
using vll = vector<ll>;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
using Graph = vector<vector<ll>>;
int main() {
	vector<deque<char>> D(4);
	D[0].push_back('A');
	D[0].push_back('E');
	D[1].push_back('B');
	D[2].push_back('C');
	D[3].push_back('D');
	
	ll K;
	cin>>K;
	rep(i,K){
		char C=D[i%4].front();
		D[i%4].pop_front();
		D[(i+1)%4].push_back(C);
	}
	rep(i,4){
		while(!D[i].empty()){
			char C=D[i].front();
		D[i].pop_front();
		cout<<C;
		}
		cout<<endl;
	}
}
            
            
            
        