Submission #1870631


Source Code Expand

#include <iostream>
#include <cmath>
#include <algorithm>
#include <deque>
#include <vector>
#include <map>

using namespace std;

typedef long long ll;
typedef pair<int,int> pi;
typedef pair<ll,ll> pll;
typedef pair<string,string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pi> vpi;
typedef vector<ll> vll;
typedef vector<vll> vvll;

double EPS = 1e-9;
int INFi = 1000000005;
long long INFll = 1000000000000000005ll;
double PI = acos(-1);
int dirx[8] = {-1,0,0,1,-1,-1,1,1};
int diry[8] = {0,1,-1,0,-1,1,-1,1};

#define FOR(a,b,c) for (int (a)=(b);(a)<(c);++(a))
#define FORN(a,b,c) for (int (a)=(b);(a)<=(c);++(a))
#define FORD(a,b,c) for (int (a)=(b);(a)>=(c);--(a))
#define FORSQ(a,b,c) for (int (a)=(b);(a)*(a)<=(c);++(a))
#define FORC(a,b,c) for (char (a)=(b);(a)<=(c);++(a))
#define FOREACH(a,b) for (auto &(a) : (b))
#define REP(i,n) FOR(i,0,n)
#define REPN(i,n) FORN(i,1,n)
#define MAX(a,b) a = max(a,b)
#define MIN(a,b) a = min(a,b)
#define SQR(x) ((ll)(x) * (x))
#define RESET(a,b) memset(a,b,sizeof(a))
#define fi first
#define se second
// #define mp make_pair
// #define pb push_back
#define ALL(v) v.begin(),v.end()
#define ALLA(arr,sz) arr,arr+sz
#define SIZE(v) (int)v.size()
#define SORT(v) sort(ALL(v))
#define REVERSE(v) reverse(ALL(v))
#define SORTA(arr,sz) sort(ALLA(arr,sz))
#define REVERSEA(arr,sz) reverse(ALLA(arr,sz))
#define PERMUTE next_permutation
#define TC(t) while(t--)
//
// inline string IntToString(ll a){
//   char x[100];
//   sprintf(x,"%lld",a); string s = x;
//   return s;
// }
//
// inline ll StringToInt(string a){
//   char x[100]; ll res;
//   strcpy(x,a.c_str()); sscanf(x,"%lld",&res);
//   return res;
// }
//
// inline string GetString(void){
//   char x[1000005];
//   scanf("%s",x); string s = x;
//   return s;
// }
//
// inline string uppercase(string s){
//   int n = SIZE(s);
//   REP(i,n) if (s[i] >= 'a' && s[i] <= 'z') s[i] = s[i] - 'a' + 'A';
//   return s;
// }
//
// inline string lowercase(string s){
//   int n = SIZE(s);
//   REP(i,n) if (s[i] >= 'A' && s[i] <= 'Z') s[i] = s[i] - 'A' + 'a';
//   return s;
// }
//
//

int main(){

  ll txa, tya, txb, tyb, t, v;
  int n;
  cin >> txa >> tya >> txb >> tyb >> t >> v;
  cin >> n;
  vi x, y;
  int xtmp, ytmp;
  vll dis;
  REP(i,n){
    cin >> xtmp >> ytmp;
    x.push_back(xtmp);
    y.push_back(ytmp);
    dis.push_back(sqrt((xtmp-txa)*(xtmp-txa) + (ytmp-tya) * (ytmp-tya)) + sqrt((xtmp-txb)*(xtmp-txb) + (ytmp-tyb) * (ytmp-tyb)));
  }

  REP(i, n){
    if(dis[i] <= t * v + EPS){
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;


  return 0;
}

Submission Info

Submission Time
Task A - ハンドルネーム
User rhd_20034
Language C++14 (GCC 5.4.1)
Score 0
Code Size 2727 Byte
Status WA
Exec Time 4 ms
Memory 1148 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
WA × 7
Set Name Test Cases
All sample_01.txt, sample_02.txt, 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 4 ms 1148 KB
sample_02.txt WA 2 ms 892 KB
test_aaaaaaaaaa.txt WA 2 ms 892 KB
test_myonmyon.txt WA 2 ms 892 KB
test_nemui.txt WA 2 ms 892 KB
test_onakasuita.txt WA 2 ms 892 KB
test_p.txt WA 2 ms 892 KB