結果

問題 No.1764 Square
ユーザー V_Melville
提出日時 2021-11-28 11:41:09
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 413 bytes
コンパイル時間 3,624 ms
コンパイル使用メモリ 254,356 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-01 04:25:22
合計ジャッジ時間 3,862 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)

using std::cin;
using std::cout;
using std::vector;
using std::deque;

int main() {
	vector<deque<char>> q{{'A', 'E'}, {'B'}, {'C'}, {'D'}}; 
	
	int k;
	cin >> k;
	
	rep(i, k) {
		char c = q[i%4].front(); 
		q[i%4].pop_front();
		q[(i+1)%4].push_back(c);
	}
	
	rep(i, 4) {
		for (char c : q[i]) cout << c;
		cout << '\n';
	}
	
	return 0;
}
0