結果
問題 | No.2923 Mayor's Job |
ユーザー |
![]() |
提出日時 | 2024-10-17 00:23:54 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 642 bytes |
コンパイル時間 | 2,919 ms |
コンパイル使用メモリ | 250,264 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-17 00:23:59 |
合計ジャッジ時間 | 4,369 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 WA * 10 |
ソースコード
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { int n, k; cin >> n >> k; vector<ll> a(n); rep(i, n) cin >> a[i]; vector<pair<ll, ll>> v(n); rep(i, n) cin >> v[i].first >> v[i].second; int ans = n; rep(i, n) rep(j, n) { auto [x1, y1] = v[i]; auto [x2, y2] = v[j]; if ((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) <= k * k && a[i] < a[j]) { ans--; break; } } cout << ans << endl; return 0; }