Submission #56831

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
568312018-07-12 17:14:27dennisstar먼 별 (KOI16_dist)C++11
0 / 100
48 ms1256 KiB
#include <bits/stdc++.h>
#define round(x) (int)(x+0.5)
typedef long long LL;
int N, T;
int anst;
LL mxd=((1ll<<62)-1)*2+1;
int stk[60010];
struct data
{
int x, y, dx, dy;
int tx, ty;
bool operator <(const data &r)const {return tx==r.tx?ty<r.ty:tx<r.tx;}
}st[30010];
int cw(data a, data b, data c)
{
LL ii=(LL)(b.x-a.x)*(c.y-a.y)-(LL)(c.x-a.x)*(b.y-a.y);
return ii>0?1:ii==0?0:-1;
}
int cw(data a, data b, data c, data d)
{
LL ii=(LL)(d.y-c.y)*(b.x-a.x)-(LL)(b.y-a.y)*(d.x-c.x);
return ii>0?1:ii==0?0:-1;
}
long long dist(data a, data b)
{
LL x=(LL)a.tx-b.tx, y=(LL)a.ty-b.ty;
return x*x+y*y;
}
long long rtc(int T)
{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

dist.cpp: In function 'int main()':
dist.cpp:77:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %d", &N, &T);
  ~~~~~^~~~~~~~~~~~~~~~~
dist.cpp:78:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  for(i=0; i<N; i++) scanf("%d %d %d %d", &st[i].x, &st[i].y, &st[i].dx, &st[i].dy);
                     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...