結果
| 問題 | No.5007 Steiner Space Travel | 
| コンテスト | |
| ユーザー |  ococonomy1 | 
| 提出日時 | 2023-04-26 23:27:24 | 
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 1,864 bytes | 
| コンパイル時間 | 1,659 ms | 
| コンパイル使用メモリ | 111,572 KB | 
| 実行使用メモリ | 4,372 KB | 
| スコア | 3,596,852 | 
| 最終ジャッジ日時 | 2023-04-26 23:27:28 | 
| 合計ジャッジ時間 | 3,937 ms | 
| ジャッジサーバーID (参考情報) | judge15 / judge13 | 
| 純コード判定しない問題か言語 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 30 | 
ソースコード
//#pragma GCC target("avx2")
//#pragma GCC optimize("O3")
//#pragma GCC optimize("unroll-loops")
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <cassert>
#include <cmath>
#include <tuple>
#include <queue>
#include <bitset>
using namespace std;
using lg = long long;
#define TEST clog << "TEST" << endl
#define IINF 2147483647
#define LLINF 9223372036854775807LL
#define AMARI 998244353
#define TEMOTO ((sizeof(long double) == 16) ? false : true)
#define TIME_LIMIT 980 * (TEMOTO ? 1 : 1000)
#define el '\n'
#define El '\n'
int wakusei_num, station_num;
class planet {
public:
    int x;
    int y;
    int num;
    
};
bool hikaku_x(planet a, planet b) {
    return a.x < b.x;
}
bool hikaku_rad(planet a, planet b) {
    return (atan2(a.y - 500, a.x - 500) < atan2(b.y - 500, b.x - 500));
}
class station {
public:
    int x;
    int y;
    int num;
};
#define MULTI_TEST_CASE false
void solve(void) {
    cin >> wakusei_num >> station_num;
    vector<planet> wakusei(wakusei_num);
    for (int i = 0; i < wakusei_num; i++) {
        cin >> wakusei[i].x >> wakusei[i].y;
        wakusei[i].num = i;
    }
    for (int i = 0; i < station_num; i++) {
        cout << "0 0" << El;
    }
    cout << wakusei_num + 1 << el;
    sort(wakusei.begin(), wakusei.end(), hikaku_rad);
    
    for (int i = 0; i < wakusei_num; i++) {
        if (!wakusei[i].num) {
            for (int j = i; j <= i + wakusei_num; j++) {
                cout << "1 " << wakusei[j % wakusei_num].num + 1 << el;
            }
            break;
        }
    }
    return;
}
void calc(void) {
    return;
}
int main(void) {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int t = 1;
    if (MULTI_TEST_CASE)cin >> t;
    while (t--) {
        solve();
    }
    calc();
    return 0;
}
            
            
            
        