QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#480482#784. 旋转卡壳lmeowdn#0 1ms3976kbC++141.6kb2024-07-16 16:03:212024-07-16 16:03:23

Judging History

你现在查看的是最新测评结果

  • [2024-10-16 12:18:36]
  • hack成功,自动添加数据
  • (/hack/1005)
  • [2024-09-24 16:55:39]
  • hack成功,自动添加数据
  • (/hack/888)
  • [2024-07-31 21:52:32]
  • hack成功,自动添加数据
  • (/hack/764)
  • [2024-07-31 21:47:53]
  • hack成功,自动添加数据
  • (/hack/763)
  • [2024-07-16 16:03:23]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:3976kb
  • [2024-07-16 16:03:21]
  • 提交

answer

//Shirasu Azusa 2024.7
#include <bits/stdc++.h>
#define fi first
#define se second
#define eb emplace_back
#define mp make_pair
using namespace std;
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
typedef __int128 i128;
template<class T,class S>
bool chmax(T &a,const S b) {return (a<b?a=b,1:0);}
template<class T,class S>
bool chmin(T &a,const S b) {return (a>b?a=b,1:0);}
int popcnt(int x) {return __builtin_popcount(x);}
int popcnt(ll x)  {return __builtin_popcountll(x);}
int topbit(int x) {return (x==0?-1:31-__builtin_clz(x));}
int topbit(ll x)  {return (x==0?-1:63-__builtin_clzll(x));}
int lowbit(int x) {return (x==0?-1:__builtin_ctz(x));}
int lowbit(ll x)  {return (x==0?-1:__builtin_ctzll(x));}

#define int long long
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define per(i,a,b) for(int i=(a);i>=(b);i--)
typedef pair<int,int> pii;  
typedef vector<int> vi;
typedef vector<pii> vp;
typedef tuple<int,int,int> tiii;
int read() {
  int x=0,w=1; char c=getchar(); 
  while(!isdigit(c)) {if(c=='-') w=-1; c=getchar();}
  while(isdigit(c)) {x=x*10+(c-'0'); c=getchar();} 
  return x*w;
}

const int N=5e5+5;
const ld eps=1e-10;

struct vec {ld x,y;};
vector<vec> a;

ld dis(vec a,vec b) {
  return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));
}

signed main() {
  int n=read();
  rep(i,0,n-1) {
    vec x; x.x=read(), x.y=read();
    a.eb(x);
  }
  int j=1; ld ans=0;
  rep(i,0,n-1) {
    while(dis(a[i],a[j])<dis(a[i],a[j+1])+eps) j++;
    chmax(ans,dis(a[i],a[j]));
  }
  printf("%.8Lf\n",ans);
  return 0;
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 10
Accepted
time: 1ms
memory: 3944kb

input:

1000
0 0
-997615 -8573
-1988394 -28911
-2726572 -44296
-3491635 -60392
-4419752 -82814
-5298550 -105946
-5723430 -118453
-6608257 -147267
-7034966 -161982
-7563964 -181682
-8507871 -222865
-9499799 -271846
-10090186 -303547
-10400262 -322989
-10614073 -339725
-11081438 -378596
-11791568 -439127
-127...

output:

274339223.18956139

result:

ok found '274339223.1895614', expected '274339223.1895614', error '0.0000000'

Test #2:

score: 0
Accepted
time: 1ms
memory: 3972kb

input:

1000
0 0
-887614 -1937
-1459359 -3808
-2421409 -24096
-3273181 -48456
-3917594 -76664
-4402753 -100164
-5375022 -150897
-5993935 -192089
-6587159 -238825
-7549680 -333298
-8330993 -416479
-9244392 -515027
-10010900 -598589
-10374584 -640275
-10767641 -686907
-11173081 -741316
-11821952 -833327
-1260...

output:

262687047.92749063

result:

ok found '262687047.9274906', expected '262687047.9274906', error '0.0000000'

Test #3:

score: 0
Accepted
time: 1ms
memory: 3808kb

input:

1000
0 0
-631055 -2758
-1328409 -7463
-2248672 -20536
-2412978 -23564
-2659543 -28441
-3383179 -43406
-4183375 -64326
-4856658 -88337
-5799682 -134822
-6757348 -189404
-7132846 -212164
-7563226 -242116
-8368716 -300012
-9321463 -381770
-9831821 -432746
-10409503 -491057
-11360852 -607259
-11874199 -...

output:

257868038.64358969

result:

ok found '257868038.6435897', expected '257868038.6435897', error '0.0000000'

Test #4:

score: 0
Accepted
time: 0ms
memory: 3976kb

input:

1000
0 0
-48652 -588
-951356 -20091
-1517426 -33325
-1965414 -51971
-2466111 -74904
-3046762 -103888
-3555833 -132002
-3976901 -156059
-4972848 -245498
-5921476 -332492
-6353035 -375491
-7327511 -496188
-7939064 -575429
-8842272 -694656
-9246222 -756797
-9771758 -860630
-10633761 -1031205
-10981774 ...

output:

259539672.48045339

result:

ok found '259539672.4804534', expected '259539672.4804534', error '0.0000000'

Test #5:

score: 0
Accepted
time: 1ms
memory: 3820kb

input:

1000
0 0
-456569 -2668
-1141521 -7887
-1270801 -8967
-1971135 -21206
-2919889 -38188
-3903859 -71231
-4752603 -107450
-5508682 -143873
-6214620 -183392
-6718977 -212193
-7452291 -271600
-8408796 -354998
-9261882 -432674
-9528618 -457608
-10099091 -513153
-10320120 -535958
-11067358 -614356
-12050731...

output:

250217366.48262185

result:

ok found '250217366.4826218', expected '250217366.4826218', error '0.0000000'

Test #6:

score: -10
Wrong Answer
time: 0ms
memory: 3976kb

input:

1000
0 0
-794019 -17307
-1389128 -41522
-1928884 -68000
-2530256 -103641
-3335109 -158872
-4273633 -225636
-4655012 -253747
-5584931 -329387
-6190262 -382029
-6657521 -422826
-7445510 -497270
-8092482 -562235
-8879759 -646264
-9688106 -745847
-10545954 -857573
-11350736 -962711
-12106702 -1066386
-1...

output:

256129171.69178249

result:

wrong answer 1st numbers differ - expected: '256130723.0053680', found: '256129171.6917825', error = '0.0000061'

Subtask #2:

score: 0
Skipped

Dependency #1:

0%

Subtask #3:

score: 0
Skipped

Dependency #1:

0%