結果
| 問題 | No.5020 Averaging |
| コンテスト | |
| ユーザー |
てんぷら
|
| 提出日時 | 2024-02-25 13:27:38 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 1,126 bytes |
| 記録 | |
| コンパイル時間 | 5,380 ms |
| コンパイル使用メモリ | 309,468 KB |
| 実行使用メモリ | 6,676 KB |
| スコア | 12,719,802 |
| 最終ジャッジ日時 | 2024-02-25 13:27:46 |
| 合計ジャッジ時間 | 7,626 ms |
|
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
| 純コード判定しない問題か言語 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
#include <atcoder/all>
#include <bits/stdc++.h>
using ll = long long;
using ull = unsigned long long;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define REP(i, m, n) for(int i = (int)(m); i < (int)(n); i++)
using namespace std;
using namespace atcoder;
using mint = modint998244353;
const int inf = 1000000007;
const ll longinf = 1ll << 60;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
vector<ll> a(n), b(n);
rep(i, n) cin >> a[i] >> b[i];
vector<pair<int, int>> query;
for(int i = 1; i <= 16; i *= 2) {
rep(j, 16 / i) {
int l = 2 * j * i, r = (2 * j + 1) * i;
ll x = (a[l] + a[r]) / 2;
ll y = (b[l] + b[r]) / 2;
a[l] = a[r] = x;
b[l] = b[r] = y;
query.push_back({l, r});
}
}
// cerr << a[0] << " " << b[0] << endl;
for(auto [l, r] : query) {
cout << l + 1 << " " << r + 1 << endl;
}
double score = 2000000 - 100000 * log10(max(abs(a[0] - (ll)5e17), abs(b[0] - (ll)5e17)) + 1);
cerr << score * 50 << endl;
return 0;
}
てんぷら