結果
| 問題 |
No.2923 Mayor's Job
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-14 13:38:52 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 16 ms / 2,000 ms |
| コード長 | 715 bytes |
| コンパイル時間 | 2,150 ms |
| コンパイル使用メモリ | 196,448 KB |
| 最終ジャッジ日時 | 2025-02-24 19:27:48 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#include<atcoder/modint>
using namespace atcoder;
using mint=modint998244353;
void solve(){
ll N,K;
cin>>N>>K;
vector<ll> H(N),X(N),Y(N);
for(int i=0;i<N;i++)cin>>H[i];
for(int i=0;i<N;i++)cin>>X[i]>>Y[i];
int an=0;
for(int i=0;i<N;i++){
bool OK=0;
for(int j=0;j<N;j++){
if(H[i]>=H[j])continue;
ll dx=X[i]-X[j];
ll dy=Y[i]-Y[j];
if(K*K>=dx*dx+dy*dy)OK=1;
}
if(!OK)an++;
}
cout<<an<<endl;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
// ll T;
// cin>>T;
// while(T--)
solve();
}