結果

問題 No.1169 Row and Column and Diagonal
ユーザー Californiumer
提出日時 2020-08-14 21:49:13
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 468 bytes
コンパイル時間 1,635 ms
コンパイル使用メモリ 169,888 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-10 14:58:35
合計ジャッジ時間 4,469 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
    int N;cin>>N;
    vector<int>V(0);
    for(int X=0;X<N;X++){
        V.push_back(X+1);
    }
    int M=0;
    do{
        for(int X=0;X<N;X++){
            if(X==N-1){
                cout<<V[X]<<endl;
            }
            else{
                cout<<V[X]<<" ";
            }
        }
        M++;
        if(M>=N){
            return 0;
        }
    }while (next_permutation(V.begin(), V.end()));
}
0