编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#24089 #1012. L. 注重风控,风火轮模型 Wrong Answer 0 15 ms 280 K C++ 11 / 2.3 K nocriz🦆 2020-03-20 20:45:12
显示原始代码
//#include<bits/stdc++.h>
#include <set>
#include <map>
#include <stack>
#include <cmath>
#include <ctime>
#include <queue>
#include <cstdio>
#include <string>
#include <vector>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <unordered_map>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<int, ll> pil;
#define X first
#define Y second
#define pb push_back
inline ll gcd(ll a, ll b) {
    while (b != 0) {
        ll c = a % b;
        a = b;
        b = c;
    }
    return a < 0 ? -a : a;
}
inline ll lcm(ll a, ll b) { return (a * b) / gcd(a, b); }
inline ll lowbit(ll x) { return x & (-x); }
const double PI = 3.14159265358979323846;
const int inf = 0x3f3f3f3f;
const ll INF = 0x3f3f3f3f3f3f3f3f;
const ll mod = 998244353;
inline char nc() {
    static char buf[1 << 21], *p1 = buf, *p2 = buf;
    return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2) ? EOF : *p1++;
}
inline ll rd() {
    //#define getchar nc
    ll x = 0, f = 1;
    char ch = getchar();
    while (ch < '0' || ch > '9') {
        if (ch == '-')
            f = -1;
        ch = getchar();
    }
    while (ch >= '0' && ch <= '9') {
        x = (x << 3) + (x << 1) + (ch ^ 48);
        ch = getchar();
    }
    return x * f;
}
const double eps = 1e-8;
const int M = 1e5 + 10;
const int N = 1e6 + 10;
struct Node {
    double x, y;
} p[N];
double r;
double dis(Node a, Node b) { return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)); }
double dis2(Node a, Node b) { return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y); }
int main() {
    int n = rd();
    r = rd();
    for (int i = 1; i <= n; i++) p[i].x = rd(), p[i].y = rd();
    p[n + 1] = p[1];
    double ans = 0;
    for (int i = 1; i <= n - 1; i++) {
        double o1 = acos(dis(p[i], p[i + 1]) / (2 * r));
        double fenzi = dis2(p[i], p[i + 1]) + dis2(p[i + 1], p[i + 2]) - dis2(p[i], p[i + 2]);
        double fenmu = 2 * dis(p[i], p[i + 1]) * dis(p[i + 1], p[i + 2]);
        double o = acos(fenzi / fenmu);
        double bet = acos(dis(p[i + 1], p[i + 2]) / (2 * r));
        double ar = o1 + bet - o;
        if (ar >= 0)
            ans += ar * dis(p[1], p[i + 1]);
    }
    printf("%.7f\n", ans);
}
子任务 #1
Wrong Answer
得分:0
测试点 #1
Wrong Answer
得分:0
用时:3 ms
内存:240 KiB

输入文件(1.in

3 35941
583.04714 3121.03022
1806.86186 1416.16563
4984.18545 200.02605

答案文件(1.ans

15854.07033788921762607060

用户输出

0.0000000

Special Judge 信息

Error(15854.07033788921762607060) too large

系统信息

Exited with return code 0
测试点 #2
Wrong Answer
得分:0
用时:4 ms
内存:272 KiB

输入文件(2.in

15 21331
504.05781 3250.88951
1718.34697 1497.03649
3702.66308 378.64555
4424.20987 234.65996
4821.3
<235 bytes omitted>

答案文件(2.ans

29335.84794469948246842250

用户输出

193032.1959381

Special Judge 信息

Error(163696.34799340051753802072) too large

系统信息

Exited with return code 0
测试点 #3
Wrong Answer
得分:0
用时:2 ms
内存:280 KiB

输入文件(3.in

15 35155
1903.22247 1332.58007
2542.13948 884.86186
4344.54468 244.96285
5745.72528 258.28156
7454.5
<234 bytes omitted>

答案文件(3.ans

32799.81410184111882699654

用户输出

689113.4485941

Special Judge 信息

Error(656313.63449225888115279304) too large

系统信息

Exited with return code 0
测试点 #4
Wrong Answer
得分:0
用时:3 ms
内存:244 KiB

输入文件(4.in

100 21315
202.73110 4838.10150
207.03370 4740.24226
222.70360 4533.69633
233.73077 4431.95278
304.67
<2075 bytes omitted>

答案文件(4.ans

29761.25504531784099526703

用户输出

1239267.4792116

Special Judge 信息

Error(1209506.22416628215898981580) too large

系统信息

Exited with return code 0
测试点 #5
Wrong Answer
得分:0
用时:3 ms
内存:236 KiB

输入文件(5.in

100 34201
202.23054 4853.68467
206.74735 4745.58106
289.91929 4075.26238
488.79146 3360.18368
513.94
<2079 bytes omitted>

答案文件(5.ans

32998.22863424615934491158

用户输出

3120021.7891326

Special Judge 信息

Error(3087023.56049835384055768372) too large

系统信息

Exited with return code 0