結果

問題 No.1402 ビル街
ユーザー mtsdmtsd
提出日時 2021-02-19 22:57:46
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 3,153 ms
コード長 2,645 bytes
コンパイル時間 1,127 ms
コンパイル使用メモリ 116,672 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-15 04:10:45
合計ジャッジ時間 7,773 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 1 ms
4,352 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 2 ms
4,352 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 1 ms
4,352 KB
testcase_06 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <cstdint>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pii;
#define MP make_pair
#define PB push_back
#define inf 1000000007
#define rep(i,n) for(int i = 0; i < (int)(n); ++i)
#define all(x) (x).begin(),(x).end()

template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}
 
template<class T> inline bool chmax(T &a, T b){
    if(a<b){
        a = b;
        return true;
    }
    return false;
}

template<class T> inline bool chmin(T &a, T b){
    if(a>b){
        a = b;
        return true;
    }
    return false;
}
vector<int> res;

int dst[12][12];

int main(){
    int n;
    cin >> n;
    res.resize(n);
    // vector<int>v(n);
    // rep(i,n){
    //     v[i] = i+1;
    // }
    // int mi = inf;
    // do{
    //     vector<int> a(n+2);
    //     Fill(dst,inf);
    //     rep(i,n){
    //         a[i+1] = v[i];
    //     }
    //     a[0] = 2e9;
    //     a[n+1] = 2e9;
    //     for(int i=1;i<=n;i++){
    //         for(int j=i-1;j>=0;j++){
    //             if(a[j]>=a[i]){
    //                 dst[i][j] = 1;
    //                 dst[j][i] = 1;
    //                 break;
    //             }
    //         }
    //         for(int j=i+1;j<=n+1;j++){
    //             if(a[j]>=a[i]){
    //                 dst[i][j] = 1;
    //                 dst[j][i] = 1;
    //                 break;
    //             }
    //         }
    //     }
    //     rep(k,n+2){
    //         rep(i,n+2){
    //             rep(j,n+2){
    //                 chmin(dst[i][j],dst[i][k]+dst[k][j]);
    //             }
    //         }
    //     }
    //     int tmp = 0;
    //     rep(i,n){
    //         rep(j,n){
    //             tmp += dst[i+1][j+1];
    //         }
    //     }
    //     if(chmin(mi,tmp)){
    //         res = v;
    //     }
    // }while(next_permutation(all(v)));
    // rep(i,n){
    //     cout << res[i] << " ";
    // }
    // cout << endl;
    cout << 2000000000 << " ";
    rep(i,n){
        if(i!=n-1){
            cout << n-i << " ";
        }else{
            cout << n+1 << " ";
        }
    }
    cout << 2000000000 << "\n";
    return 0;
}
0