結果

問題 No.1402 ビル街
ユーザー chocoruskchocorusk
提出日時 2021-02-20 00:18:28
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 3,153 ms
コード長 1,013 bytes
コンパイル時間 1,330 ms
コンパイル使用メモリ 127,860 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 02:29:30
合計ジャッジ時間 8,743 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 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>
#define popcount __builtin_popcount
using namespace std;
typedef long long ll;
typedef pair<int, int> P;

int main()
{
    int n;
    cin>>n;
    const int MAX=2000000000;
    if(n==1){
        cout<<MAX<<" "<<2<<" "<<MAX<<endl;
        return 0;
    }
    if(n==2){
        cout<<MAX<<" "<<2<<" "<<3<<" "<<MAX<<endl;
        return 0;
    }
    cout<<MAX<<" ";
    cout<<n/2+2<<" ";
    for(int i=0; i<n/2-1; i++) cout<<n/2-i<<" ";
    cout<<n/2+1<<" ";
    for(int i=0; i<n-3-(n/2-1); i++) cout<<i+2<<" ";
    cout<<n/2+2<<" ";
    cout<<MAX<<endl;
    return 0;
}
0