結果

問題 No.1587 012 Matrix
ユーザー chestnut_68
提出日時 2021-07-08 22:43:26
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 17 ms / 1,000 ms
コード長 635 bytes
コンパイル時間 3,813 ms
コンパイル使用メモリ 229,668 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-01 12:57:19
合計ジャッジ時間 4,986 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using mint = modint1000000007;
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
const int MOD=1e9+7;
const long long INF = 1LL<<60;
int main(){
    int N;cin>>N;
    vector<vector<int>> A(N,vector<int>(N));
    rep(i,N){
        rep(j,N){
            if(i==j){
                if(i%2==0)A[i][j]=1;
                else A[i][j]=2;
            }
            else if(i>j){
                A[i][j]=0;
            }
            else{
                A[i][j]=2;
            }
            cout<<A[i][j];
            
        }
        cout<<endl;
    }
    
}
0