답안 #932253

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
932253 2024-02-23T06:36:46 Z hmm789 Shortcut (IOI16_shortcut) C++14
23 / 100
2000 ms 382548 KB
#include "shortcut.h"
#include <bits/stdc++.h>
using namespace std;
//#define int long long
#define INF 1000000000000000000
#define MOD 1000000007

#define int long long
vector<pair<int, int>> adj[2000000];
int dist[2000000], depth[2000000], p[2000000][21];

void dfs(int x, int pa, int d, int dep) {
    dist[x] = d;
    depth[x] = dep;
    p[x][0] = pa;
    for(int i = 1; i < 21; i++) {
        if(p[x][i-1] == -1) break;
        p[x][i] = p[p[x][i-1]][i-1];
    }
    for(auto i : adj[x]) if(i.first != pa) dfs(i.first, x, d+i.second, dep+1);
}

int lca(int a, int b) {
    if(depth[a] < depth[b]) swap(a, b);
    int h = depth[a]-depth[b];
    for(int i = 0; i < 21; i++) {
        if(h&(1<<i)) a = p[a][i];
    }
    if(a == b) return a;
    for(int i = 20; i >= 0; i--) {
        if(p[a][i] != p[b][i]) {
            a = p[a][i]; b = p[b][i];
        }
    }
    return p[a][0];
}

int dst(int x, int y) {
    return dist[x]+dist[y]-2*dist[lca(x,y)];
}
#undef int

long long find_shortcut(int n, std::vector<int> l, std::vector<int> d, int c) {
#define int long long
    int ans = INF;
    for(int k = 0; k < n-1; k++) {
        adj[k].push_back({k+1, l[k]});
        adj[k+1].push_back({k, l[k]});
    }
    for(int k = 0; k < n; k++) {
        adj[k].push_back({k+n, d[k]});
        adj[k+n].push_back({k, d[k]});
    }
    memset(p, -1, sizeof(p));
    dfs(0, -1, 0, 0);
    int ds2[2*n][2*n];
    for(int i = 0; i < 2*n; i++) for(int j = 0; j < 2*n; j++) ds2[i][j] = dst(i, j);
    for(int i = 0; i < n; i++) {
        for(int j = i+1; j < n; j++) {
            int tmp = 0;
            for(int k = 0; k < 2*n; k++) {
                for(int l = 0; l < 2*n; l++) {
                    tmp = max(tmp, min({ds2[k][l], ds2[k][i]+c+ds2[j][l], ds2[k][j]+c+ds2[i][l]}));
                }
            }
            ans = min(ans, tmp);
        }
    }
    return ans;
#undef int
}
# 결과 실행 시간 메모리 Grader output
1 Correct 92 ms 380752 KB n = 4, 80 is a correct answer
2 Correct 55 ms 380756 KB n = 9, 110 is a correct answer
3 Correct 53 ms 380748 KB n = 4, 21 is a correct answer
4 Correct 53 ms 380752 KB n = 3, 4 is a correct answer
5 Correct 52 ms 380752 KB n = 2, 62 is a correct answer
6 Correct 57 ms 380764 KB n = 2, 3 is a correct answer
7 Correct 53 ms 380756 KB n = 3, 29 is a correct answer
8 Correct 54 ms 380752 KB n = 2, 3 is a correct answer
9 Correct 55 ms 381008 KB n = 2, 3 is a correct answer
10 Correct 54 ms 380752 KB n = 2, 2000000001 is a correct answer
11 Correct 54 ms 380756 KB n = 2, 3000000000 is a correct answer
12 Correct 55 ms 380672 KB n = 3, 3000000000 is a correct answer
13 Correct 59 ms 380756 KB n = 3, 3000000000 is a correct answer
14 Correct 54 ms 380752 KB n = 4, 3000000001 is a correct answer
15 Correct 52 ms 380624 KB n = 4, 4000000000 is a correct answer
16 Correct 53 ms 380572 KB n = 5, 4000000000 is a correct answer
17 Correct 54 ms 380752 KB n = 10, 1000000343 is a correct answer
18 Correct 53 ms 380616 KB n = 10, 3189 is a correct answer
19 Correct 55 ms 380952 KB n = 10, 7000000000 is a correct answer
20 Correct 53 ms 380756 KB n = 5, 12 is a correct answer
21 Correct 52 ms 380584 KB n = 5, 25 is a correct answer
22 Correct 53 ms 380752 KB n = 2, 122 is a correct answer
23 Correct 52 ms 380664 KB n = 10, 117 is a correct answer
24 Correct 53 ms 380756 KB n = 10, 336 is a correct answer
25 Correct 54 ms 380740 KB n = 10, 438 is a correct answer
26 Correct 53 ms 380756 KB n = 10, 206 is a correct answer
27 Correct 53 ms 380784 KB n = 10, 636 is a correct answer
28 Correct 54 ms 380756 KB n = 4, 2399 is a correct answer
29 Correct 53 ms 380684 KB n = 10, 10992 is a correct answer
30 Correct 52 ms 380672 KB n = 10, 3112 is a correct answer
31 Correct 315 ms 381008 KB n = 100, 51000000001 is a correct answer
32 Correct 71 ms 380752 KB n = 50, 197881272 is a correct answer
33 Correct 330 ms 381104 KB n = 100, 20969 is a correct answer
34 Correct 314 ms 381108 KB n = 100, 20969 is a correct answer
35 Correct 337 ms 381160 KB n = 100, 52000000000 is a correct answer
36 Correct 315 ms 381008 KB n = 100, 285 is a correct answer
37 Correct 317 ms 381108 KB n = 100, 21272 is a correct answer
38 Correct 316 ms 381108 KB n = 100, 12161 is a correct answer
# 결과 실행 시간 메모리 Grader output
1 Correct 92 ms 380752 KB n = 4, 80 is a correct answer
2 Correct 55 ms 380756 KB n = 9, 110 is a correct answer
3 Correct 53 ms 380748 KB n = 4, 21 is a correct answer
4 Correct 53 ms 380752 KB n = 3, 4 is a correct answer
5 Correct 52 ms 380752 KB n = 2, 62 is a correct answer
6 Correct 57 ms 380764 KB n = 2, 3 is a correct answer
7 Correct 53 ms 380756 KB n = 3, 29 is a correct answer
8 Correct 54 ms 380752 KB n = 2, 3 is a correct answer
9 Correct 55 ms 381008 KB n = 2, 3 is a correct answer
10 Correct 54 ms 380752 KB n = 2, 2000000001 is a correct answer
11 Correct 54 ms 380756 KB n = 2, 3000000000 is a correct answer
12 Correct 55 ms 380672 KB n = 3, 3000000000 is a correct answer
13 Correct 59 ms 380756 KB n = 3, 3000000000 is a correct answer
14 Correct 54 ms 380752 KB n = 4, 3000000001 is a correct answer
15 Correct 52 ms 380624 KB n = 4, 4000000000 is a correct answer
16 Correct 53 ms 380572 KB n = 5, 4000000000 is a correct answer
17 Correct 54 ms 380752 KB n = 10, 1000000343 is a correct answer
18 Correct 53 ms 380616 KB n = 10, 3189 is a correct answer
19 Correct 55 ms 380952 KB n = 10, 7000000000 is a correct answer
20 Correct 53 ms 380756 KB n = 5, 12 is a correct answer
21 Correct 52 ms 380584 KB n = 5, 25 is a correct answer
22 Correct 53 ms 380752 KB n = 2, 122 is a correct answer
23 Correct 52 ms 380664 KB n = 10, 117 is a correct answer
24 Correct 53 ms 380756 KB n = 10, 336 is a correct answer
25 Correct 54 ms 380740 KB n = 10, 438 is a correct answer
26 Correct 53 ms 380756 KB n = 10, 206 is a correct answer
27 Correct 53 ms 380784 KB n = 10, 636 is a correct answer
28 Correct 54 ms 380756 KB n = 4, 2399 is a correct answer
29 Correct 53 ms 380684 KB n = 10, 10992 is a correct answer
30 Correct 52 ms 380672 KB n = 10, 3112 is a correct answer
31 Correct 315 ms 381008 KB n = 100, 51000000001 is a correct answer
32 Correct 71 ms 380752 KB n = 50, 197881272 is a correct answer
33 Correct 330 ms 381104 KB n = 100, 20969 is a correct answer
34 Correct 314 ms 381108 KB n = 100, 20969 is a correct answer
35 Correct 337 ms 381160 KB n = 100, 52000000000 is a correct answer
36 Correct 315 ms 381008 KB n = 100, 285 is a correct answer
37 Correct 317 ms 381108 KB n = 100, 21272 is a correct answer
38 Correct 316 ms 381108 KB n = 100, 12161 is a correct answer
39 Correct 53 ms 380756 KB n = 2, 62 is a correct answer
40 Correct 53 ms 380752 KB n = 2, 3 is a correct answer
41 Correct 57 ms 380752 KB n = 3, 29 is a correct answer
42 Correct 52 ms 380768 KB n = 2, 3 is a correct answer
43 Correct 57 ms 380672 KB n = 2, 3 is a correct answer
44 Correct 54 ms 380780 KB n = 2, 2000000001 is a correct answer
45 Correct 56 ms 381008 KB n = 2, 3000000000 is a correct answer
46 Correct 52 ms 380788 KB n = 3, 3000000000 is a correct answer
47 Correct 53 ms 380752 KB n = 3, 3000000000 is a correct answer
48 Correct 54 ms 380752 KB n = 4, 3000000001 is a correct answer
49 Correct 54 ms 380608 KB n = 4, 4000000000 is a correct answer
50 Correct 53 ms 380752 KB n = 5, 4000000000 is a correct answer
51 Correct 53 ms 380676 KB n = 10, 1000000343 is a correct answer
52 Correct 55 ms 380756 KB n = 10, 3189 is a correct answer
53 Correct 55 ms 380732 KB n = 10, 7000000000 is a correct answer
54 Correct 55 ms 380568 KB n = 5, 12 is a correct answer
55 Correct 54 ms 380616 KB n = 5, 25 is a correct answer
56 Correct 57 ms 380628 KB n = 2, 122 is a correct answer
57 Correct 54 ms 380632 KB n = 10, 117 is a correct answer
58 Correct 54 ms 380684 KB n = 10, 336 is a correct answer
59 Correct 54 ms 380668 KB n = 10, 438 is a correct answer
60 Correct 54 ms 380756 KB n = 10, 206 is a correct answer
61 Correct 53 ms 380756 KB n = 10, 636 is a correct answer
62 Correct 55 ms 380756 KB n = 4, 2399 is a correct answer
63 Correct 52 ms 380628 KB n = 10, 10992 is a correct answer
64 Correct 52 ms 380640 KB n = 10, 3112 is a correct answer
65 Correct 321 ms 380984 KB n = 100, 51000000001 is a correct answer
66 Correct 72 ms 380756 KB n = 50, 197881272 is a correct answer
67 Correct 315 ms 381104 KB n = 100, 20969 is a correct answer
68 Correct 316 ms 381112 KB n = 100, 20969 is a correct answer
69 Correct 314 ms 381016 KB n = 100, 52000000000 is a correct answer
70 Correct 314 ms 381108 KB n = 100, 285 is a correct answer
71 Correct 322 ms 381064 KB n = 100, 21272 is a correct answer
72 Correct 316 ms 381016 KB n = 100, 12161 is a correct answer
# 결과 실행 시간 메모리 Grader output
1 Correct 92 ms 380752 KB n = 4, 80 is a correct answer
2 Correct 55 ms 380756 KB n = 9, 110 is a correct answer
3 Correct 53 ms 380748 KB n = 4, 21 is a correct answer
4 Correct 53 ms 380752 KB n = 3, 4 is a correct answer
5 Correct 52 ms 380752 KB n = 2, 62 is a correct answer
6 Correct 57 ms 380764 KB n = 2, 3 is a correct answer
7 Correct 53 ms 380756 KB n = 3, 29 is a correct answer
8 Correct 54 ms 380752 KB n = 2, 3 is a correct answer
9 Correct 55 ms 381008 KB n = 2, 3 is a correct answer
10 Correct 54 ms 380752 KB n = 2, 2000000001 is a correct answer
11 Correct 54 ms 380756 KB n = 2, 3000000000 is a correct answer
12 Correct 55 ms 380672 KB n = 3, 3000000000 is a correct answer
13 Correct 59 ms 380756 KB n = 3, 3000000000 is a correct answer
14 Correct 54 ms 380752 KB n = 4, 3000000001 is a correct answer
15 Correct 52 ms 380624 KB n = 4, 4000000000 is a correct answer
16 Correct 53 ms 380572 KB n = 5, 4000000000 is a correct answer
17 Correct 54 ms 380752 KB n = 10, 1000000343 is a correct answer
18 Correct 53 ms 380616 KB n = 10, 3189 is a correct answer
19 Correct 55 ms 380952 KB n = 10, 7000000000 is a correct answer
20 Correct 53 ms 380756 KB n = 5, 12 is a correct answer
21 Correct 52 ms 380584 KB n = 5, 25 is a correct answer
22 Correct 53 ms 380752 KB n = 2, 122 is a correct answer
23 Correct 52 ms 380664 KB n = 10, 117 is a correct answer
24 Correct 53 ms 380756 KB n = 10, 336 is a correct answer
25 Correct 54 ms 380740 KB n = 10, 438 is a correct answer
26 Correct 53 ms 380756 KB n = 10, 206 is a correct answer
27 Correct 53 ms 380784 KB n = 10, 636 is a correct answer
28 Correct 54 ms 380756 KB n = 4, 2399 is a correct answer
29 Correct 53 ms 380684 KB n = 10, 10992 is a correct answer
30 Correct 52 ms 380672 KB n = 10, 3112 is a correct answer
31 Correct 315 ms 381008 KB n = 100, 51000000001 is a correct answer
32 Correct 71 ms 380752 KB n = 50, 197881272 is a correct answer
33 Correct 330 ms 381104 KB n = 100, 20969 is a correct answer
34 Correct 314 ms 381108 KB n = 100, 20969 is a correct answer
35 Correct 337 ms 381160 KB n = 100, 52000000000 is a correct answer
36 Correct 315 ms 381008 KB n = 100, 285 is a correct answer
37 Correct 317 ms 381108 KB n = 100, 21272 is a correct answer
38 Correct 316 ms 381108 KB n = 100, 12161 is a correct answer
39 Correct 53 ms 380756 KB n = 2, 62 is a correct answer
40 Correct 53 ms 380752 KB n = 2, 3 is a correct answer
41 Correct 57 ms 380752 KB n = 3, 29 is a correct answer
42 Correct 52 ms 380768 KB n = 2, 3 is a correct answer
43 Correct 57 ms 380672 KB n = 2, 3 is a correct answer
44 Correct 54 ms 380780 KB n = 2, 2000000001 is a correct answer
45 Correct 56 ms 381008 KB n = 2, 3000000000 is a correct answer
46 Correct 52 ms 380788 KB n = 3, 3000000000 is a correct answer
47 Correct 53 ms 380752 KB n = 3, 3000000000 is a correct answer
48 Correct 54 ms 380752 KB n = 4, 3000000001 is a correct answer
49 Correct 54 ms 380608 KB n = 4, 4000000000 is a correct answer
50 Correct 53 ms 380752 KB n = 5, 4000000000 is a correct answer
51 Correct 53 ms 380676 KB n = 10, 1000000343 is a correct answer
52 Correct 55 ms 380756 KB n = 10, 3189 is a correct answer
53 Correct 55 ms 380732 KB n = 10, 7000000000 is a correct answer
54 Correct 55 ms 380568 KB n = 5, 12 is a correct answer
55 Correct 54 ms 380616 KB n = 5, 25 is a correct answer
56 Correct 57 ms 380628 KB n = 2, 122 is a correct answer
57 Correct 54 ms 380632 KB n = 10, 117 is a correct answer
58 Correct 54 ms 380684 KB n = 10, 336 is a correct answer
59 Correct 54 ms 380668 KB n = 10, 438 is a correct answer
60 Correct 54 ms 380756 KB n = 10, 206 is a correct answer
61 Correct 53 ms 380756 KB n = 10, 636 is a correct answer
62 Correct 55 ms 380756 KB n = 4, 2399 is a correct answer
63 Correct 52 ms 380628 KB n = 10, 10992 is a correct answer
64 Correct 52 ms 380640 KB n = 10, 3112 is a correct answer
65 Correct 321 ms 380984 KB n = 100, 51000000001 is a correct answer
66 Correct 72 ms 380756 KB n = 50, 197881272 is a correct answer
67 Correct 315 ms 381104 KB n = 100, 20969 is a correct answer
68 Correct 316 ms 381112 KB n = 100, 20969 is a correct answer
69 Correct 314 ms 381016 KB n = 100, 52000000000 is a correct answer
70 Correct 314 ms 381108 KB n = 100, 285 is a correct answer
71 Correct 322 ms 381064 KB n = 100, 21272 is a correct answer
72 Correct 316 ms 381016 KB n = 100, 12161 is a correct answer
73 Execution timed out 2061 ms 382548 KB Time limit exceeded
74 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 92 ms 380752 KB n = 4, 80 is a correct answer
2 Correct 55 ms 380756 KB n = 9, 110 is a correct answer
3 Correct 53 ms 380748 KB n = 4, 21 is a correct answer
4 Correct 53 ms 380752 KB n = 3, 4 is a correct answer
5 Correct 52 ms 380752 KB n = 2, 62 is a correct answer
6 Correct 57 ms 380764 KB n = 2, 3 is a correct answer
7 Correct 53 ms 380756 KB n = 3, 29 is a correct answer
8 Correct 54 ms 380752 KB n = 2, 3 is a correct answer
9 Correct 55 ms 381008 KB n = 2, 3 is a correct answer
10 Correct 54 ms 380752 KB n = 2, 2000000001 is a correct answer
11 Correct 54 ms 380756 KB n = 2, 3000000000 is a correct answer
12 Correct 55 ms 380672 KB n = 3, 3000000000 is a correct answer
13 Correct 59 ms 380756 KB n = 3, 3000000000 is a correct answer
14 Correct 54 ms 380752 KB n = 4, 3000000001 is a correct answer
15 Correct 52 ms 380624 KB n = 4, 4000000000 is a correct answer
16 Correct 53 ms 380572 KB n = 5, 4000000000 is a correct answer
17 Correct 54 ms 380752 KB n = 10, 1000000343 is a correct answer
18 Correct 53 ms 380616 KB n = 10, 3189 is a correct answer
19 Correct 55 ms 380952 KB n = 10, 7000000000 is a correct answer
20 Correct 53 ms 380756 KB n = 5, 12 is a correct answer
21 Correct 52 ms 380584 KB n = 5, 25 is a correct answer
22 Correct 53 ms 380752 KB n = 2, 122 is a correct answer
23 Correct 52 ms 380664 KB n = 10, 117 is a correct answer
24 Correct 53 ms 380756 KB n = 10, 336 is a correct answer
25 Correct 54 ms 380740 KB n = 10, 438 is a correct answer
26 Correct 53 ms 380756 KB n = 10, 206 is a correct answer
27 Correct 53 ms 380784 KB n = 10, 636 is a correct answer
28 Correct 54 ms 380756 KB n = 4, 2399 is a correct answer
29 Correct 53 ms 380684 KB n = 10, 10992 is a correct answer
30 Correct 52 ms 380672 KB n = 10, 3112 is a correct answer
31 Correct 315 ms 381008 KB n = 100, 51000000001 is a correct answer
32 Correct 71 ms 380752 KB n = 50, 197881272 is a correct answer
33 Correct 330 ms 381104 KB n = 100, 20969 is a correct answer
34 Correct 314 ms 381108 KB n = 100, 20969 is a correct answer
35 Correct 337 ms 381160 KB n = 100, 52000000000 is a correct answer
36 Correct 315 ms 381008 KB n = 100, 285 is a correct answer
37 Correct 317 ms 381108 KB n = 100, 21272 is a correct answer
38 Correct 316 ms 381108 KB n = 100, 12161 is a correct answer
39 Correct 53 ms 380756 KB n = 2, 62 is a correct answer
40 Correct 53 ms 380752 KB n = 2, 3 is a correct answer
41 Correct 57 ms 380752 KB n = 3, 29 is a correct answer
42 Correct 52 ms 380768 KB n = 2, 3 is a correct answer
43 Correct 57 ms 380672 KB n = 2, 3 is a correct answer
44 Correct 54 ms 380780 KB n = 2, 2000000001 is a correct answer
45 Correct 56 ms 381008 KB n = 2, 3000000000 is a correct answer
46 Correct 52 ms 380788 KB n = 3, 3000000000 is a correct answer
47 Correct 53 ms 380752 KB n = 3, 3000000000 is a correct answer
48 Correct 54 ms 380752 KB n = 4, 3000000001 is a correct answer
49 Correct 54 ms 380608 KB n = 4, 4000000000 is a correct answer
50 Correct 53 ms 380752 KB n = 5, 4000000000 is a correct answer
51 Correct 53 ms 380676 KB n = 10, 1000000343 is a correct answer
52 Correct 55 ms 380756 KB n = 10, 3189 is a correct answer
53 Correct 55 ms 380732 KB n = 10, 7000000000 is a correct answer
54 Correct 55 ms 380568 KB n = 5, 12 is a correct answer
55 Correct 54 ms 380616 KB n = 5, 25 is a correct answer
56 Correct 57 ms 380628 KB n = 2, 122 is a correct answer
57 Correct 54 ms 380632 KB n = 10, 117 is a correct answer
58 Correct 54 ms 380684 KB n = 10, 336 is a correct answer
59 Correct 54 ms 380668 KB n = 10, 438 is a correct answer
60 Correct 54 ms 380756 KB n = 10, 206 is a correct answer
61 Correct 53 ms 380756 KB n = 10, 636 is a correct answer
62 Correct 55 ms 380756 KB n = 4, 2399 is a correct answer
63 Correct 52 ms 380628 KB n = 10, 10992 is a correct answer
64 Correct 52 ms 380640 KB n = 10, 3112 is a correct answer
65 Correct 321 ms 380984 KB n = 100, 51000000001 is a correct answer
66 Correct 72 ms 380756 KB n = 50, 197881272 is a correct answer
67 Correct 315 ms 381104 KB n = 100, 20969 is a correct answer
68 Correct 316 ms 381112 KB n = 100, 20969 is a correct answer
69 Correct 314 ms 381016 KB n = 100, 52000000000 is a correct answer
70 Correct 314 ms 381108 KB n = 100, 285 is a correct answer
71 Correct 322 ms 381064 KB n = 100, 21272 is a correct answer
72 Correct 316 ms 381016 KB n = 100, 12161 is a correct answer
73 Execution timed out 2061 ms 382548 KB Time limit exceeded
74 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 92 ms 380752 KB n = 4, 80 is a correct answer
2 Correct 55 ms 380756 KB n = 9, 110 is a correct answer
3 Correct 53 ms 380748 KB n = 4, 21 is a correct answer
4 Correct 53 ms 380752 KB n = 3, 4 is a correct answer
5 Correct 52 ms 380752 KB n = 2, 62 is a correct answer
6 Correct 57 ms 380764 KB n = 2, 3 is a correct answer
7 Correct 53 ms 380756 KB n = 3, 29 is a correct answer
8 Correct 54 ms 380752 KB n = 2, 3 is a correct answer
9 Correct 55 ms 381008 KB n = 2, 3 is a correct answer
10 Correct 54 ms 380752 KB n = 2, 2000000001 is a correct answer
11 Correct 54 ms 380756 KB n = 2, 3000000000 is a correct answer
12 Correct 55 ms 380672 KB n = 3, 3000000000 is a correct answer
13 Correct 59 ms 380756 KB n = 3, 3000000000 is a correct answer
14 Correct 54 ms 380752 KB n = 4, 3000000001 is a correct answer
15 Correct 52 ms 380624 KB n = 4, 4000000000 is a correct answer
16 Correct 53 ms 380572 KB n = 5, 4000000000 is a correct answer
17 Correct 54 ms 380752 KB n = 10, 1000000343 is a correct answer
18 Correct 53 ms 380616 KB n = 10, 3189 is a correct answer
19 Correct 55 ms 380952 KB n = 10, 7000000000 is a correct answer
20 Correct 53 ms 380756 KB n = 5, 12 is a correct answer
21 Correct 52 ms 380584 KB n = 5, 25 is a correct answer
22 Correct 53 ms 380752 KB n = 2, 122 is a correct answer
23 Correct 52 ms 380664 KB n = 10, 117 is a correct answer
24 Correct 53 ms 380756 KB n = 10, 336 is a correct answer
25 Correct 54 ms 380740 KB n = 10, 438 is a correct answer
26 Correct 53 ms 380756 KB n = 10, 206 is a correct answer
27 Correct 53 ms 380784 KB n = 10, 636 is a correct answer
28 Correct 54 ms 380756 KB n = 4, 2399 is a correct answer
29 Correct 53 ms 380684 KB n = 10, 10992 is a correct answer
30 Correct 52 ms 380672 KB n = 10, 3112 is a correct answer
31 Correct 315 ms 381008 KB n = 100, 51000000001 is a correct answer
32 Correct 71 ms 380752 KB n = 50, 197881272 is a correct answer
33 Correct 330 ms 381104 KB n = 100, 20969 is a correct answer
34 Correct 314 ms 381108 KB n = 100, 20969 is a correct answer
35 Correct 337 ms 381160 KB n = 100, 52000000000 is a correct answer
36 Correct 315 ms 381008 KB n = 100, 285 is a correct answer
37 Correct 317 ms 381108 KB n = 100, 21272 is a correct answer
38 Correct 316 ms 381108 KB n = 100, 12161 is a correct answer
39 Correct 53 ms 380756 KB n = 2, 62 is a correct answer
40 Correct 53 ms 380752 KB n = 2, 3 is a correct answer
41 Correct 57 ms 380752 KB n = 3, 29 is a correct answer
42 Correct 52 ms 380768 KB n = 2, 3 is a correct answer
43 Correct 57 ms 380672 KB n = 2, 3 is a correct answer
44 Correct 54 ms 380780 KB n = 2, 2000000001 is a correct answer
45 Correct 56 ms 381008 KB n = 2, 3000000000 is a correct answer
46 Correct 52 ms 380788 KB n = 3, 3000000000 is a correct answer
47 Correct 53 ms 380752 KB n = 3, 3000000000 is a correct answer
48 Correct 54 ms 380752 KB n = 4, 3000000001 is a correct answer
49 Correct 54 ms 380608 KB n = 4, 4000000000 is a correct answer
50 Correct 53 ms 380752 KB n = 5, 4000000000 is a correct answer
51 Correct 53 ms 380676 KB n = 10, 1000000343 is a correct answer
52 Correct 55 ms 380756 KB n = 10, 3189 is a correct answer
53 Correct 55 ms 380732 KB n = 10, 7000000000 is a correct answer
54 Correct 55 ms 380568 KB n = 5, 12 is a correct answer
55 Correct 54 ms 380616 KB n = 5, 25 is a correct answer
56 Correct 57 ms 380628 KB n = 2, 122 is a correct answer
57 Correct 54 ms 380632 KB n = 10, 117 is a correct answer
58 Correct 54 ms 380684 KB n = 10, 336 is a correct answer
59 Correct 54 ms 380668 KB n = 10, 438 is a correct answer
60 Correct 54 ms 380756 KB n = 10, 206 is a correct answer
61 Correct 53 ms 380756 KB n = 10, 636 is a correct answer
62 Correct 55 ms 380756 KB n = 4, 2399 is a correct answer
63 Correct 52 ms 380628 KB n = 10, 10992 is a correct answer
64 Correct 52 ms 380640 KB n = 10, 3112 is a correct answer
65 Correct 321 ms 380984 KB n = 100, 51000000001 is a correct answer
66 Correct 72 ms 380756 KB n = 50, 197881272 is a correct answer
67 Correct 315 ms 381104 KB n = 100, 20969 is a correct answer
68 Correct 316 ms 381112 KB n = 100, 20969 is a correct answer
69 Correct 314 ms 381016 KB n = 100, 52000000000 is a correct answer
70 Correct 314 ms 381108 KB n = 100, 285 is a correct answer
71 Correct 322 ms 381064 KB n = 100, 21272 is a correct answer
72 Correct 316 ms 381016 KB n = 100, 12161 is a correct answer
73 Execution timed out 2061 ms 382548 KB Time limit exceeded
74 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 92 ms 380752 KB n = 4, 80 is a correct answer
2 Correct 55 ms 380756 KB n = 9, 110 is a correct answer
3 Correct 53 ms 380748 KB n = 4, 21 is a correct answer
4 Correct 53 ms 380752 KB n = 3, 4 is a correct answer
5 Correct 52 ms 380752 KB n = 2, 62 is a correct answer
6 Correct 57 ms 380764 KB n = 2, 3 is a correct answer
7 Correct 53 ms 380756 KB n = 3, 29 is a correct answer
8 Correct 54 ms 380752 KB n = 2, 3 is a correct answer
9 Correct 55 ms 381008 KB n = 2, 3 is a correct answer
10 Correct 54 ms 380752 KB n = 2, 2000000001 is a correct answer
11 Correct 54 ms 380756 KB n = 2, 3000000000 is a correct answer
12 Correct 55 ms 380672 KB n = 3, 3000000000 is a correct answer
13 Correct 59 ms 380756 KB n = 3, 3000000000 is a correct answer
14 Correct 54 ms 380752 KB n = 4, 3000000001 is a correct answer
15 Correct 52 ms 380624 KB n = 4, 4000000000 is a correct answer
16 Correct 53 ms 380572 KB n = 5, 4000000000 is a correct answer
17 Correct 54 ms 380752 KB n = 10, 1000000343 is a correct answer
18 Correct 53 ms 380616 KB n = 10, 3189 is a correct answer
19 Correct 55 ms 380952 KB n = 10, 7000000000 is a correct answer
20 Correct 53 ms 380756 KB n = 5, 12 is a correct answer
21 Correct 52 ms 380584 KB n = 5, 25 is a correct answer
22 Correct 53 ms 380752 KB n = 2, 122 is a correct answer
23 Correct 52 ms 380664 KB n = 10, 117 is a correct answer
24 Correct 53 ms 380756 KB n = 10, 336 is a correct answer
25 Correct 54 ms 380740 KB n = 10, 438 is a correct answer
26 Correct 53 ms 380756 KB n = 10, 206 is a correct answer
27 Correct 53 ms 380784 KB n = 10, 636 is a correct answer
28 Correct 54 ms 380756 KB n = 4, 2399 is a correct answer
29 Correct 53 ms 380684 KB n = 10, 10992 is a correct answer
30 Correct 52 ms 380672 KB n = 10, 3112 is a correct answer
31 Correct 315 ms 381008 KB n = 100, 51000000001 is a correct answer
32 Correct 71 ms 380752 KB n = 50, 197881272 is a correct answer
33 Correct 330 ms 381104 KB n = 100, 20969 is a correct answer
34 Correct 314 ms 381108 KB n = 100, 20969 is a correct answer
35 Correct 337 ms 381160 KB n = 100, 52000000000 is a correct answer
36 Correct 315 ms 381008 KB n = 100, 285 is a correct answer
37 Correct 317 ms 381108 KB n = 100, 21272 is a correct answer
38 Correct 316 ms 381108 KB n = 100, 12161 is a correct answer
39 Correct 53 ms 380756 KB n = 2, 62 is a correct answer
40 Correct 53 ms 380752 KB n = 2, 3 is a correct answer
41 Correct 57 ms 380752 KB n = 3, 29 is a correct answer
42 Correct 52 ms 380768 KB n = 2, 3 is a correct answer
43 Correct 57 ms 380672 KB n = 2, 3 is a correct answer
44 Correct 54 ms 380780 KB n = 2, 2000000001 is a correct answer
45 Correct 56 ms 381008 KB n = 2, 3000000000 is a correct answer
46 Correct 52 ms 380788 KB n = 3, 3000000000 is a correct answer
47 Correct 53 ms 380752 KB n = 3, 3000000000 is a correct answer
48 Correct 54 ms 380752 KB n = 4, 3000000001 is a correct answer
49 Correct 54 ms 380608 KB n = 4, 4000000000 is a correct answer
50 Correct 53 ms 380752 KB n = 5, 4000000000 is a correct answer
51 Correct 53 ms 380676 KB n = 10, 1000000343 is a correct answer
52 Correct 55 ms 380756 KB n = 10, 3189 is a correct answer
53 Correct 55 ms 380732 KB n = 10, 7000000000 is a correct answer
54 Correct 55 ms 380568 KB n = 5, 12 is a correct answer
55 Correct 54 ms 380616 KB n = 5, 25 is a correct answer
56 Correct 57 ms 380628 KB n = 2, 122 is a correct answer
57 Correct 54 ms 380632 KB n = 10, 117 is a correct answer
58 Correct 54 ms 380684 KB n = 10, 336 is a correct answer
59 Correct 54 ms 380668 KB n = 10, 438 is a correct answer
60 Correct 54 ms 380756 KB n = 10, 206 is a correct answer
61 Correct 53 ms 380756 KB n = 10, 636 is a correct answer
62 Correct 55 ms 380756 KB n = 4, 2399 is a correct answer
63 Correct 52 ms 380628 KB n = 10, 10992 is a correct answer
64 Correct 52 ms 380640 KB n = 10, 3112 is a correct answer
65 Correct 321 ms 380984 KB n = 100, 51000000001 is a correct answer
66 Correct 72 ms 380756 KB n = 50, 197881272 is a correct answer
67 Correct 315 ms 381104 KB n = 100, 20969 is a correct answer
68 Correct 316 ms 381112 KB n = 100, 20969 is a correct answer
69 Correct 314 ms 381016 KB n = 100, 52000000000 is a correct answer
70 Correct 314 ms 381108 KB n = 100, 285 is a correct answer
71 Correct 322 ms 381064 KB n = 100, 21272 is a correct answer
72 Correct 316 ms 381016 KB n = 100, 12161 is a correct answer
73 Execution timed out 2061 ms 382548 KB Time limit exceeded
74 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 92 ms 380752 KB n = 4, 80 is a correct answer
2 Correct 55 ms 380756 KB n = 9, 110 is a correct answer
3 Correct 53 ms 380748 KB n = 4, 21 is a correct answer
4 Correct 53 ms 380752 KB n = 3, 4 is a correct answer
5 Correct 52 ms 380752 KB n = 2, 62 is a correct answer
6 Correct 57 ms 380764 KB n = 2, 3 is a correct answer
7 Correct 53 ms 380756 KB n = 3, 29 is a correct answer
8 Correct 54 ms 380752 KB n = 2, 3 is a correct answer
9 Correct 55 ms 381008 KB n = 2, 3 is a correct answer
10 Correct 54 ms 380752 KB n = 2, 2000000001 is a correct answer
11 Correct 54 ms 380756 KB n = 2, 3000000000 is a correct answer
12 Correct 55 ms 380672 KB n = 3, 3000000000 is a correct answer
13 Correct 59 ms 380756 KB n = 3, 3000000000 is a correct answer
14 Correct 54 ms 380752 KB n = 4, 3000000001 is a correct answer
15 Correct 52 ms 380624 KB n = 4, 4000000000 is a correct answer
16 Correct 53 ms 380572 KB n = 5, 4000000000 is a correct answer
17 Correct 54 ms 380752 KB n = 10, 1000000343 is a correct answer
18 Correct 53 ms 380616 KB n = 10, 3189 is a correct answer
19 Correct 55 ms 380952 KB n = 10, 7000000000 is a correct answer
20 Correct 53 ms 380756 KB n = 5, 12 is a correct answer
21 Correct 52 ms 380584 KB n = 5, 25 is a correct answer
22 Correct 53 ms 380752 KB n = 2, 122 is a correct answer
23 Correct 52 ms 380664 KB n = 10, 117 is a correct answer
24 Correct 53 ms 380756 KB n = 10, 336 is a correct answer
25 Correct 54 ms 380740 KB n = 10, 438 is a correct answer
26 Correct 53 ms 380756 KB n = 10, 206 is a correct answer
27 Correct 53 ms 380784 KB n = 10, 636 is a correct answer
28 Correct 54 ms 380756 KB n = 4, 2399 is a correct answer
29 Correct 53 ms 380684 KB n = 10, 10992 is a correct answer
30 Correct 52 ms 380672 KB n = 10, 3112 is a correct answer
31 Correct 315 ms 381008 KB n = 100, 51000000001 is a correct answer
32 Correct 71 ms 380752 KB n = 50, 197881272 is a correct answer
33 Correct 330 ms 381104 KB n = 100, 20969 is a correct answer
34 Correct 314 ms 381108 KB n = 100, 20969 is a correct answer
35 Correct 337 ms 381160 KB n = 100, 52000000000 is a correct answer
36 Correct 315 ms 381008 KB n = 100, 285 is a correct answer
37 Correct 317 ms 381108 KB n = 100, 21272 is a correct answer
38 Correct 316 ms 381108 KB n = 100, 12161 is a correct answer
39 Correct 53 ms 380756 KB n = 2, 62 is a correct answer
40 Correct 53 ms 380752 KB n = 2, 3 is a correct answer
41 Correct 57 ms 380752 KB n = 3, 29 is a correct answer
42 Correct 52 ms 380768 KB n = 2, 3 is a correct answer
43 Correct 57 ms 380672 KB n = 2, 3 is a correct answer
44 Correct 54 ms 380780 KB n = 2, 2000000001 is a correct answer
45 Correct 56 ms 381008 KB n = 2, 3000000000 is a correct answer
46 Correct 52 ms 380788 KB n = 3, 3000000000 is a correct answer
47 Correct 53 ms 380752 KB n = 3, 3000000000 is a correct answer
48 Correct 54 ms 380752 KB n = 4, 3000000001 is a correct answer
49 Correct 54 ms 380608 KB n = 4, 4000000000 is a correct answer
50 Correct 53 ms 380752 KB n = 5, 4000000000 is a correct answer
51 Correct 53 ms 380676 KB n = 10, 1000000343 is a correct answer
52 Correct 55 ms 380756 KB n = 10, 3189 is a correct answer
53 Correct 55 ms 380732 KB n = 10, 7000000000 is a correct answer
54 Correct 55 ms 380568 KB n = 5, 12 is a correct answer
55 Correct 54 ms 380616 KB n = 5, 25 is a correct answer
56 Correct 57 ms 380628 KB n = 2, 122 is a correct answer
57 Correct 54 ms 380632 KB n = 10, 117 is a correct answer
58 Correct 54 ms 380684 KB n = 10, 336 is a correct answer
59 Correct 54 ms 380668 KB n = 10, 438 is a correct answer
60 Correct 54 ms 380756 KB n = 10, 206 is a correct answer
61 Correct 53 ms 380756 KB n = 10, 636 is a correct answer
62 Correct 55 ms 380756 KB n = 4, 2399 is a correct answer
63 Correct 52 ms 380628 KB n = 10, 10992 is a correct answer
64 Correct 52 ms 380640 KB n = 10, 3112 is a correct answer
65 Correct 321 ms 380984 KB n = 100, 51000000001 is a correct answer
66 Correct 72 ms 380756 KB n = 50, 197881272 is a correct answer
67 Correct 315 ms 381104 KB n = 100, 20969 is a correct answer
68 Correct 316 ms 381112 KB n = 100, 20969 is a correct answer
69 Correct 314 ms 381016 KB n = 100, 52000000000 is a correct answer
70 Correct 314 ms 381108 KB n = 100, 285 is a correct answer
71 Correct 322 ms 381064 KB n = 100, 21272 is a correct answer
72 Correct 316 ms 381016 KB n = 100, 12161 is a correct answer
73 Execution timed out 2061 ms 382548 KB Time limit exceeded
74 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 92 ms 380752 KB n = 4, 80 is a correct answer
2 Correct 55 ms 380756 KB n = 9, 110 is a correct answer
3 Correct 53 ms 380748 KB n = 4, 21 is a correct answer
4 Correct 53 ms 380752 KB n = 3, 4 is a correct answer
5 Correct 52 ms 380752 KB n = 2, 62 is a correct answer
6 Correct 57 ms 380764 KB n = 2, 3 is a correct answer
7 Correct 53 ms 380756 KB n = 3, 29 is a correct answer
8 Correct 54 ms 380752 KB n = 2, 3 is a correct answer
9 Correct 55 ms 381008 KB n = 2, 3 is a correct answer
10 Correct 54 ms 380752 KB n = 2, 2000000001 is a correct answer
11 Correct 54 ms 380756 KB n = 2, 3000000000 is a correct answer
12 Correct 55 ms 380672 KB n = 3, 3000000000 is a correct answer
13 Correct 59 ms 380756 KB n = 3, 3000000000 is a correct answer
14 Correct 54 ms 380752 KB n = 4, 3000000001 is a correct answer
15 Correct 52 ms 380624 KB n = 4, 4000000000 is a correct answer
16 Correct 53 ms 380572 KB n = 5, 4000000000 is a correct answer
17 Correct 54 ms 380752 KB n = 10, 1000000343 is a correct answer
18 Correct 53 ms 380616 KB n = 10, 3189 is a correct answer
19 Correct 55 ms 380952 KB n = 10, 7000000000 is a correct answer
20 Correct 53 ms 380756 KB n = 5, 12 is a correct answer
21 Correct 52 ms 380584 KB n = 5, 25 is a correct answer
22 Correct 53 ms 380752 KB n = 2, 122 is a correct answer
23 Correct 52 ms 380664 KB n = 10, 117 is a correct answer
24 Correct 53 ms 380756 KB n = 10, 336 is a correct answer
25 Correct 54 ms 380740 KB n = 10, 438 is a correct answer
26 Correct 53 ms 380756 KB n = 10, 206 is a correct answer
27 Correct 53 ms 380784 KB n = 10, 636 is a correct answer
28 Correct 54 ms 380756 KB n = 4, 2399 is a correct answer
29 Correct 53 ms 380684 KB n = 10, 10992 is a correct answer
30 Correct 52 ms 380672 KB n = 10, 3112 is a correct answer
31 Correct 315 ms 381008 KB n = 100, 51000000001 is a correct answer
32 Correct 71 ms 380752 KB n = 50, 197881272 is a correct answer
33 Correct 330 ms 381104 KB n = 100, 20969 is a correct answer
34 Correct 314 ms 381108 KB n = 100, 20969 is a correct answer
35 Correct 337 ms 381160 KB n = 100, 52000000000 is a correct answer
36 Correct 315 ms 381008 KB n = 100, 285 is a correct answer
37 Correct 317 ms 381108 KB n = 100, 21272 is a correct answer
38 Correct 316 ms 381108 KB n = 100, 12161 is a correct answer
39 Correct 53 ms 380756 KB n = 2, 62 is a correct answer
40 Correct 53 ms 380752 KB n = 2, 3 is a correct answer
41 Correct 57 ms 380752 KB n = 3, 29 is a correct answer
42 Correct 52 ms 380768 KB n = 2, 3 is a correct answer
43 Correct 57 ms 380672 KB n = 2, 3 is a correct answer
44 Correct 54 ms 380780 KB n = 2, 2000000001 is a correct answer
45 Correct 56 ms 381008 KB n = 2, 3000000000 is a correct answer
46 Correct 52 ms 380788 KB n = 3, 3000000000 is a correct answer
47 Correct 53 ms 380752 KB n = 3, 3000000000 is a correct answer
48 Correct 54 ms 380752 KB n = 4, 3000000001 is a correct answer
49 Correct 54 ms 380608 KB n = 4, 4000000000 is a correct answer
50 Correct 53 ms 380752 KB n = 5, 4000000000 is a correct answer
51 Correct 53 ms 380676 KB n = 10, 1000000343 is a correct answer
52 Correct 55 ms 380756 KB n = 10, 3189 is a correct answer
53 Correct 55 ms 380732 KB n = 10, 7000000000 is a correct answer
54 Correct 55 ms 380568 KB n = 5, 12 is a correct answer
55 Correct 54 ms 380616 KB n = 5, 25 is a correct answer
56 Correct 57 ms 380628 KB n = 2, 122 is a correct answer
57 Correct 54 ms 380632 KB n = 10, 117 is a correct answer
58 Correct 54 ms 380684 KB n = 10, 336 is a correct answer
59 Correct 54 ms 380668 KB n = 10, 438 is a correct answer
60 Correct 54 ms 380756 KB n = 10, 206 is a correct answer
61 Correct 53 ms 380756 KB n = 10, 636 is a correct answer
62 Correct 55 ms 380756 KB n = 4, 2399 is a correct answer
63 Correct 52 ms 380628 KB n = 10, 10992 is a correct answer
64 Correct 52 ms 380640 KB n = 10, 3112 is a correct answer
65 Correct 321 ms 380984 KB n = 100, 51000000001 is a correct answer
66 Correct 72 ms 380756 KB n = 50, 197881272 is a correct answer
67 Correct 315 ms 381104 KB n = 100, 20969 is a correct answer
68 Correct 316 ms 381112 KB n = 100, 20969 is a correct answer
69 Correct 314 ms 381016 KB n = 100, 52000000000 is a correct answer
70 Correct 314 ms 381108 KB n = 100, 285 is a correct answer
71 Correct 322 ms 381064 KB n = 100, 21272 is a correct answer
72 Correct 316 ms 381016 KB n = 100, 12161 is a correct answer
73 Execution timed out 2061 ms 382548 KB Time limit exceeded
74 Halted 0 ms 0 KB -