#39903: c++詳解


yp11251144@yphs.tp.edu.tw (704-38曾湛)

學校 : 臺北市私立延平高級中學
編號 : 237373
來源 : [203.72.178.1]
最後登入時間 :
2024-03-14 17:42:31
f338. 后羿射日(Archer) -- TOI2020年8月新手同好會 | From: [203.72.178.1] | 發表日期 : 2024-04-11 17:52

hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello
#include <bits/stdc++.h>
using namespace std;
 
int main()
{
int ax,ay,al,r;
cin>>ax>>ay>>al>>r;
int n;
cin>>n;
int sum=0;
for(int i=1; i<=n; i++){
int x,y,l,d;
cin>>x>>y>>l;
d=(ax-x)*(ax-x)+(ay-y)*(ay-y);
if((d<=r*r) && (al>=l)) sum+=1;
}
cout<<sum<<endl;
 
}
 
 
 
 
 
 
ZeroJudge Forum