Submission #180683
Source Code Expand
#include<iostream> #include<cmath> using namespace std; int dist(int s_x, int s_y, int e_x, int e_y) { double r1,r2; r1=abs(s_x-e_x); r2=abs(s_y-e_y); return (int)ceil(sqrt(r1*r1+r2*r2)); } int main() { int xs,ys,xe,ye,t,v; cin >> xs >> ys >> xe >> ye >> t >> v; int n; cin >> n; int max_dist = t*v; bool f = false; for(int i=0;i<n;i++){ int xi,yi; cin >> xi >> yi; if(dist(xs,ys,xi,yi) + dist(xi,yi,xe,ye) <= max_dist)f = true; } if(f==true)cout << "YES" << endl; else cout << "NO" << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - ハンドルネーム |
User | s4ichi |
Language | C++ (G++ 4.6.4) |
Score | 0 |
Code Size | 589 Byte |
Status | WA |
Exec Time | 25 ms |
Memory | 920 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 0 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | test_aaaaaaaaaa.txt, test_myonmyon.txt, test_nemui.txt, test_onakasuita.txt, test_p.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | WA | 24 ms | 920 KB |
sample_02.txt | WA | 23 ms | 792 KB |
test_aaaaaaaaaa.txt | WA | 24 ms | 716 KB |
test_myonmyon.txt | WA | 24 ms | 716 KB |
test_nemui.txt | WA | 25 ms | 796 KB |
test_onakasuita.txt | WA | 23 ms | 788 KB |
test_p.txt | WA | 24 ms | 792 KB |