Submission #180674


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 C - 浮気調査
User s4ichi
Language C++ (G++ 4.6.4)
Score 0
Code Size 586 Byte
Status CE

Compile Error

./Main.cpp:1:1: error: ‘include’ does not name a type
./Main.cpp: In function ‘int main()’:
./Main.cpp:18:3: error: ‘cin’ was not declared in this scope
./Main.cpp:32:14: error: ‘cout’ was not declared in this scope
./Main.cpp:32:31: error: ‘endl’ was not declared in this scope
./Main.cpp:33:8: error: ‘cout’ was not declared in this scope
./Main.cpp:33:24: error: ‘endl’ was not declared in this scope