QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#342217 | #784. 旋转卡壳 | cxm1024# | 0 | 1ms | 3900kb | C++14 | 727b | 2024-03-01 09:48:58 | 2024-03-01 09:48:59 |
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-05-30 09:00:15]
- hack成功,自动添加数据
- (/hack/642)
- [2024-03-01 09:48:58]
- 提交
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ld long double
int n;
pair<int, int> a[500010];
ld dis(int i, int j) {
return sqrtl((a[i].first - a[j].first) * (a[i].first - a[j].first) + (a[i].second - a[j].second) * (a[i].second - a[j].second));
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i].first >> a[i].second;
int p = 1, q = 1;
ld res = 0;
for (int i = 0; i < n; i++) {
while (dis(i, p) < dis(i, (p + 1) % n))
p++;
while (dis(i, q) <= dis(i, (q + 1) % n))
q++;
res = max(res, max(dis(i, p), dis(i, q)));
}
cout << fixed << setprecision(7) << res << endl;
return 0;
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 10
Accepted
time: 1ms
memory: 3900kb
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.1895614
result:
ok found '274339223.1895614', expected '274339223.1895614', error '0.0000000'
Test #2:
score: 0
Accepted
time: 1ms
memory: 3752kb
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.9274906
result:
ok found '262687047.9274906', expected '262687047.9274906', error '0.0000000'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3892kb
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.6435897
result:
ok found '257868038.6435897', expected '257868038.6435897', error '0.0000000'
Test #4:
score: 0
Accepted
time: 1ms
memory: 3708kb
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.4804534
result:
ok found '259539672.4804534', expected '259539672.4804534', error '0.0000000'
Test #5:
score: 0
Accepted
time: 1ms
memory: 3896kb
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.4826219
result:
ok found '250217366.4826219', expected '250217366.4826218', error '0.0000000'
Test #6:
score: -10
Wrong Answer
time: 1ms
memory: 3860kb
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.6917825
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%