답안 #912371

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
912371 2024-01-19T10:25:40 Z vjudge1 Wish (LMIO19_noras) C++17
38 / 100
86 ms 724 KB
//Bismillahir-Rahmanir-Rahim

#include <bits/stdc++.h>
//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("O1,O2,O3,Ofast,unroll-loops")
//#pragma GCC target("sse,sse2,sse3,sse4,sse4.1,sse4.2,popcnt,avx,avx2")

#define pb push_back
#define pii pair <int, int>
#define pll pair <long long, long long>
#define pld pair <long double, long double>
#define ll long long
#define ld long double
#define x first
#define y second
#define all(v) v.begin(),v.end()
#define sz(s) (int)s.size()
#define skip continue
#define bpop(x) (ll)__builtin_popcountll(x)

using namespace std;

const int N = 5e3 + 7;
const int K = 400;
const int maxA = 1e7 + 7;
const int inf = 1e9 + 7;
const ll INF = 1e18 + 7;
const ll MOD = 998244353;
const ld eps = 1e-9;

pii dir[] = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}};

//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int n, R;
pii a[N], cur[N], slope[N];
ld dist(pii x, pii O) {
    return sqrt(1.0L * (x.x - O.x) * (x.x - O.x) + 1.0L * (x.y - O.y) * (x.y - O.y));
}
void solve() {
    cin >> n >> R;
    for (int i = 1;i <= n;i++)cin >> a[i].x >> a[i].y >> slope[i].x >> slope[i].y, slope[i].x -= a[i].x, slope[i].y -= a[i].y, cur[i] = a[i];
    int ans = 0;
    for (int t = 1;t <= 2e4;t++) {
        int cnt = 0;
        for (int i = 1;i <= n;i++) {
            if (dist(cur[i], {0, 0}) <= R)cnt++;
        }
        ans = max(ans, cnt);
        for (int i = 1;i <= n;i++)cur[i].x += slope[i].x, cur[i].y += slope[i].y;
    }
    cout << ans;
}
signed main() {
    //srand(time(NULL));
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    //freopen("tests.in", "r", stdin);
    //freopen("milkorder.out", "w", stdout);
    int test = 1;
    //cin >> test;
    for (int t = 1;t <= test;t++) {
        //cout << "Case " << t << ": ";
        solve();
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 500 KB Output is correct
2 Correct 1 ms 500 KB Output is correct
3 Correct 75 ms 472 KB Output is correct
4 Correct 75 ms 472 KB Output is correct
5 Correct 73 ms 348 KB Output is correct
6 Correct 75 ms 348 KB Output is correct
7 Correct 73 ms 476 KB Output is correct
8 Correct 1 ms 344 KB Output is correct
9 Correct 1 ms 468 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Correct 2 ms 344 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 75 ms 348 KB Output is correct
15 Correct 76 ms 344 KB Output is correct
16 Correct 74 ms 344 KB Output is correct
17 Correct 76 ms 344 KB Output is correct
18 Correct 76 ms 348 KB Output is correct
19 Correct 75 ms 348 KB Output is correct
20 Correct 76 ms 348 KB Output is correct
21 Correct 75 ms 724 KB Output is correct
22 Correct 86 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 500 KB Output is correct
2 Correct 1 ms 500 KB Output is correct
3 Correct 75 ms 472 KB Output is correct
4 Correct 75 ms 472 KB Output is correct
5 Correct 73 ms 348 KB Output is correct
6 Correct 75 ms 348 KB Output is correct
7 Correct 73 ms 476 KB Output is correct
8 Correct 1 ms 344 KB Output is correct
9 Correct 1 ms 468 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Correct 2 ms 344 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 75 ms 348 KB Output is correct
15 Correct 76 ms 344 KB Output is correct
16 Correct 74 ms 344 KB Output is correct
17 Correct 76 ms 344 KB Output is correct
18 Correct 76 ms 348 KB Output is correct
19 Correct 75 ms 348 KB Output is correct
20 Correct 76 ms 348 KB Output is correct
21 Correct 75 ms 724 KB Output is correct
22 Correct 86 ms 348 KB Output is correct
23 Incorrect 2 ms 348 KB Output isn't correct
24 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 500 KB Output is correct
2 Correct 1 ms 500 KB Output is correct
3 Correct 75 ms 472 KB Output is correct
4 Correct 75 ms 472 KB Output is correct
5 Correct 73 ms 348 KB Output is correct
6 Correct 75 ms 348 KB Output is correct
7 Correct 73 ms 476 KB Output is correct
8 Correct 1 ms 344 KB Output is correct
9 Correct 1 ms 468 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Correct 2 ms 344 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 75 ms 348 KB Output is correct
15 Correct 76 ms 344 KB Output is correct
16 Correct 74 ms 344 KB Output is correct
17 Correct 76 ms 344 KB Output is correct
18 Correct 76 ms 348 KB Output is correct
19 Correct 75 ms 348 KB Output is correct
20 Correct 76 ms 348 KB Output is correct
21 Correct 75 ms 724 KB Output is correct
22 Correct 86 ms 348 KB Output is correct
23 Correct 1 ms 348 KB Output is correct
24 Correct 76 ms 348 KB Output is correct
25 Correct 77 ms 348 KB Output is correct
26 Correct 76 ms 344 KB Output is correct
27 Correct 74 ms 476 KB Output is correct
28 Correct 75 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 500 KB Output is correct
2 Correct 1 ms 500 KB Output is correct
3 Correct 75 ms 472 KB Output is correct
4 Correct 75 ms 472 KB Output is correct
5 Correct 73 ms 348 KB Output is correct
6 Correct 75 ms 348 KB Output is correct
7 Correct 73 ms 476 KB Output is correct
8 Correct 1 ms 344 KB Output is correct
9 Correct 1 ms 468 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Correct 2 ms 344 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 75 ms 348 KB Output is correct
15 Correct 76 ms 344 KB Output is correct
16 Correct 74 ms 344 KB Output is correct
17 Correct 76 ms 344 KB Output is correct
18 Correct 76 ms 348 KB Output is correct
19 Correct 75 ms 348 KB Output is correct
20 Correct 76 ms 348 KB Output is correct
21 Correct 75 ms 724 KB Output is correct
22 Correct 86 ms 348 KB Output is correct
23 Incorrect 2 ms 348 KB Output isn't correct
24 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 500 KB Output is correct
2 Correct 1 ms 500 KB Output is correct
3 Correct 75 ms 472 KB Output is correct
4 Correct 75 ms 472 KB Output is correct
5 Correct 73 ms 348 KB Output is correct
6 Correct 75 ms 348 KB Output is correct
7 Correct 73 ms 476 KB Output is correct
8 Correct 1 ms 344 KB Output is correct
9 Correct 1 ms 468 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Correct 2 ms 344 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 75 ms 348 KB Output is correct
15 Correct 76 ms 344 KB Output is correct
16 Correct 74 ms 344 KB Output is correct
17 Correct 76 ms 344 KB Output is correct
18 Correct 76 ms 348 KB Output is correct
19 Correct 75 ms 348 KB Output is correct
20 Correct 76 ms 348 KB Output is correct
21 Correct 75 ms 724 KB Output is correct
22 Correct 86 ms 348 KB Output is correct
23 Incorrect 2 ms 348 KB Output isn't correct
24 Halted 0 ms 0 KB -