結果
| 問題 | No.5023 Airlines Optimization |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-02-25 20:23:37 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 956 bytes |
| 記録 | |
| コンパイル時間 | 1,017 ms |
| コンパイル使用メモリ | 107,492 KB |
| 実行使用メモリ | 7,848 KB |
| スコア | 0 |
| 最終ジャッジ日時 | 2026-02-25 20:51:42 |
| 合計ジャッジ時間 | 5,650 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 100 |
ソースコード
#include <cmath>
#include <vector>
#include <iostream>
using namespace std;
string convert_int_time(int x) {
int h = x / 12 + 6;
int m = (x % 12) * 5;
string res;
res += h / 10 + '0';
res += h % 10 + '0';
res += ':';
res += m / 10 + '0';
res += m % 10 + '0';
return res;
}
int main() {
int N, R;
cin >> N >> R;
vector<int> X(N), Y(N), W(N);
for (int i = 0; i < N; i++) {
cin >> X[i] >> Y[i] >> W[i];
}
const int hub = 0;
const int K = 25;
for (int i = 0; i < K; i++) {
int p = i + (int)(i >= hub);
int d = ceil(hypot(X[p] - X[hub], Y[p] - Y[hub]) * 0.015 + 8);
int c = 180 / d;
cout << c << endl;
for (int j = 0; j < c; j++) {
int a = (j % 2 == 0 ? p : hub);
int s = j * d;
int b = (hub + p) - a;
int t = (j + 1) * d;
if (i == K - 1 && j == c - 1) {
s--;
t--; // wrong answer
}
cout << a + 1 << ' ' << convert_int_time(s) << ' ' << b + 1 << ' ' << convert_int_time(t) << endl;
}
}
return 0;
}