結果

問題 No.1764 Square
コンテスト
ユーザー takabatake2911
提出日時 2021-12-30 23:15:55
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
RE  
実行時間 -
コード長 877 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 885 ms
コンパイル使用メモリ 176,268 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-04-23 17:54:57
合計ジャッジ時間 2,301 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 2 RE * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
typedef long long ll;
using namespace std;

int main() {
    string s = "EABCDEABCD";
    int n;
    cin >> n;
    string t = s.substr((5 - n / 4) % 5, 5);
    if (n % 4 == 0) {
        cout << t[1];
        cout << t[0] << endl;
        cout << t[2] << endl;
        cout << t[3] << endl;
        cout << t[4] << endl;
    }
    if (n % 4 == 1) {
        cout << t[0] << endl;
        cout << t[2];
        cout << t[1] << endl;
        cout << t[3] << endl;
        cout << t[4] << endl;
    }
    if (n % 4 == 2) {
        cout << t[0] << endl;
        cout << t[1] << endl;
        cout << t[3];
        cout << t[2] << endl;
        cout << t[4] << endl;
    }
    if (n % 4 == 3) {
        cout << t[0] << endl;
        cout << t[1] << endl;
        cout << t[2] << endl;
        cout << t[4];
        cout << t[3] << endl;
    }
    return 0;
}
0