結果

問題 No.5007 Steiner Space Travel
ユーザー tanakatanaka
提出日時 2022-07-30 14:43:27
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 4,287 bytes
コンパイル時間 1,504 ms
実行使用メモリ 5,160 KB
スコア 1,222,026
最終ジャッジ日時 2022-07-30 14:43:36
合計ジャッジ時間 3,318 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,904 KB
testcase_01 AC 1 ms
5,156 KB
testcase_02 AC 1 ms
4,904 KB
testcase_03 AC 2 ms
4,904 KB
testcase_04 AC 2 ms
5,160 KB
testcase_05 AC 2 ms
4,904 KB
testcase_06 AC 2 ms
4,900 KB
testcase_07 AC 1 ms
3,464 KB
testcase_08 AC 1 ms
5,160 KB
testcase_09 AC 1 ms
5,156 KB
testcase_10 AC 1 ms
4,904 KB
testcase_11 AC 2 ms
4,900 KB
testcase_12 AC 2 ms
5,160 KB
testcase_13 AC 2 ms
4,904 KB
testcase_14 AC 2 ms
4,900 KB
testcase_15 AC 2 ms
5,156 KB
testcase_16 AC 2 ms
5,160 KB
testcase_17 AC 2 ms
5,156 KB
testcase_18 AC 2 ms
4,900 KB
testcase_19 AC 2 ms
4,904 KB
testcase_20 AC 2 ms
5,160 KB
testcase_21 AC 2 ms
5,160 KB
testcase_22 AC 2 ms
5,156 KB
testcase_23 AC 2 ms
4,904 KB
testcase_24 AC 2 ms
4,900 KB
testcase_25 AC 2 ms
4,904 KB
testcase_26 AC 2 ms
4,904 KB
testcase_27 AC 1 ms
4,904 KB
testcase_28 AC 2 ms
4,900 KB
testcase_29 AC 1 ms
4,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep3(i, n, m) for (int i = m; i < (int)(n); i++)
#define repr(i, n) for (int i = n-1; i >= 0; i--)
#define all(v) v.begin(), v.end()
#define SP << " " 
#define ll long long

using namespace std;

//定数周り
int imax=2147483647;
ll lmax=9223372036854775807;

//焼きなましの定数
double TIME_LIMIT=980;
double start_temp=2000.0;
double end_temp=10.0;

//入力など
int n, m;
int a[100], b[100];
int c[8], d[8];
int v=99;
vector<int> t(99), r(99);

//乱数の準備
int seed=1;
//auto seed=(unsigned)time(NULL);
mt19937_64 mt(seed);

void inpt(){
    cin>> n >> m;
    rep(i, 100){
        cin>> a[i] >> b[i];
        // a[i]=mt()%1001;
        // b[i]=mt()%1001;
    }
}

void init(){
    rep(i, 99){
        t[i]=1;
        r[i]=i+2;
    }
    shuffle(all(r), mt);
    rep(i, 8){
        c[i]=mt()%1001;
        d[i]=mt()%1001;
    }
}

//初回用スコアの計算
// void init_score(){
//     rep(i, n){
//         // cout<< "(x, y)= " << x[i] SP << y[i] <<endl;
//         // cout<< x[i]/(20000/sec)+sec/2 SP << y[i]/(20000/sec)+sec/2 <<endl;
//         //bo[int((x[i]+10000)/20000.0*(sec))][int((y[i]+10000)/20000.0*(sec))]++;
//         int xx, yy;
//         rep(j, sec){
//             if((py[j]-y[i])*(py[j+1]-y[i])<=0){
//                 xx=j+1;
//                 break;
//             }
//         }
//         rep(j, sec){
//             if((px[j+sec+1]-x[i])*(px[j+sec+2]-x[i])<=0){
//                 yy=j+1;
//                 break;
//             }
//         }
//         // if(xx<0 || sec<xx || yy<0 || sec<<yy){
//         //     d[1]=100000000;
//         // }else{
//         //     bo[xx][yy]++;
//         // }
//         bo[xx][yy]++;
//     }
//     rep(i, sec+1) rep(j, sec+1) d[bo[i][j]]++;

//     // rep(i, sec+1){
//     //     rep(j, sec+1){
//     //         cout<< bo[i][j] SP;
//     //     }
//     //     cout<< endl;
//     // }
//     // rep(i, 5001){
//     //     if(d[i]) cout<< "(i, cnt)= " << i SP << d[i] <<endl;
//     // }
// }

// void score(){
//     int cor=0;
//     int ev=0;
//     rep3(i, 11, 1){
//         cor+=min(a[i], d[i]);
//         //cor-=abs(a[i]-d[i]);
//     }
//     rep3(i, 50, 11){
//         ev+=d[i]*i*i;
//         cor-=d[i];
//     }
//     psco=round(1000000.0*cor/sua);
//     pev=ev;
// }

void print_ans(){
    rep(i, 8) cout<< c[i] SP << d[i] <<endl;
    cout<< t.size()+2 <<endl;
    cout<< 1 SP << 1 <<endl;
    rep(i, t.size()) cout<< t[i] SP << r[i] <<endl;
    cout<< 1 SP << 1 <<endl;
}

int main(){

    //開始時間の計測
    std::chrono::system_clock::time_point start, current;
    start = chrono::system_clock::now();

    //入力
    inpt();
    //初期状態の計算
    init();
    print_ans();
    return 0;

    //焼きなまし
    int lp=0;
    // while (true) { // 時間の許す限り回す
    //     lp++;
    //     //cout<< lp <<endl;
    //     current = chrono::system_clock::now(); // 現在時刻
    //     if (chrono::duration_cast<chrono::milliseconds>(current - start).count() > TIME_LIMIT) break;
    //     //if(lp==20000) break;

    //     int type=mt()%4+1;
    //     if(type==1){
    //         // 惑星訪問の順番入れ替え
    //         
    //     }else if(){
    //         // ステーション移動
    //         
    //     }else if(){
    //         // ステーション移動
    //         
    //     }else if(){
    //         // ステーション移動
    //         
    //     }
    //     init_score();
    //     score();

    //     // 温度関数
    //     double temp = start_temp + (end_temp - start_temp) * chrono::duration_cast<chrono::milliseconds>(current - start).count() / TIME_LIMIT;
    //     // 遷移確率関数(最大化の場合)
    //     double prob = exp((psco-nsco)/temp);

    //     if (prob > (mt()%imax)/(double)imax) { // 確率probで遷移する
    //     //if (nsco<psco) {
    //         nsco=psco;
    //         nev=pev;
    //     }else{
    //         if(type==1){
    //             py[idx]-=del;
    //             qy[idx]-=del;
    //         }else{
    //             px[idx]-=del;
    //             qx[idx]-=del;
    //         }
    //     }
    // }

    print_ans();

	return 0;
}
0