結果

問題 No.1587 012 Matrix
ユーザー chocoruskchocorusk
提出日時 2021-07-08 22:36:49
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 15 ms / 1,000 ms
コード長 965 bytes
コンパイル時間 3,346 ms
コンパイル使用メモリ 187,348 KB
実行使用メモリ 4,620 KB
最終ジャッジ日時 2023-09-14 05:12:50
合計ジャッジ時間 4,158 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,464 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,468 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,448 KB
testcase_05 AC 2 ms
4,464 KB
testcase_06 AC 2 ms
4,384 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 3 ms
4,464 KB
testcase_10 AC 3 ms
4,404 KB
testcase_11 AC 3 ms
4,504 KB
testcase_12 AC 4 ms
4,380 KB
testcase_13 AC 5 ms
4,620 KB
testcase_14 AC 7 ms
4,396 KB
testcase_15 AC 8 ms
4,592 KB
testcase_16 AC 10 ms
4,400 KB
testcase_17 AC 11 ms
4,404 KB
testcase_18 AC 12 ms
4,388 KB
testcase_19 AC 13 ms
4,516 KB
testcase_20 AC 14 ms
4,408 KB
testcase_21 AC 15 ms
4,384 KB
testcase_22 AC 2 ms
4,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#include <time.h>
#include <stack>
#include <array>
#include <list>
#include <atcoder/all>
#define popcount __builtin_popcount
using namespace std;
using namespace atcoder;
typedef long long ll;
typedef pair<int, int> P;

int main()
{
    int ans[505][505]={};
    int n; cin>>n;
    for(int i=0; i<n/2; i++){
        for(int j=i; j<=n-1-i; j++){
            ans[n-1-i][j]=2;
            ans[j][n-1-i]=2;
        }
        ans[i][n-1-i]=1;
    }
    for(int i=0; i<n; i++){
        for(int j=0; j<n; j++){
            cout<<ans[i][j];
        }
        cout<<endl;
    }
    return 0;
}
0