Submission #1870585


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(){

  int txa, tya, txb, tyb, t, v, n;
  cin >> txa >> tya >> txb >> tyb >> t >> v;
  cin >> n;
  vi x, y;
  int xtmp, ytmp;
  vi 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){
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;


  return 0;
}

Submission Info

Submission Time
Task C - 浮気調査
User rhd_20034
Language C++14 (GCC 5.4.1)
Score 0
Code Size 2626 Byte
Status CE

Compile Error

./Main.cpp: In function ‘ll StringToInt(std::string)’:
./Main.cpp:61:21: error: ‘strcpy’ was not declared in this scope
   strcpy(x,a.c_str()); sscanf(x,"%lld",&res);
                     ^