답안 #429145

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
429145 2021-06-15T17:49:06 Z JeanBombeur Aliens (IOI16_aliens) C++17
41 / 100
1060 ms 501588 KB
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include "aliens.h"
using namespace std;

//    <|°_°|>

const long long INFINI = (1LL << 60);
const int MAX_POINTS = (4001);
const int LOG = (40);

struct droite {
    long long pente, cst;
    int prix;
};

long long DP[MAX_POINTS][MAX_POINTS];

pair <long long, long long> Points[MAX_POINTS];
pair <int, int> Aliens[MAX_POINTS];

droite Deque[MAX_POINTS][MAX_POINTS];
int deb[MAX_POINTS];
int fin[MAX_POINTS];

int nbPoints = 0;

bool Compare(pair <int, int> a, pair <int, int> b) {
    if (a.first != b.first)
        return a.first < b.first;
    return a.second > b.second;
}

long double Inter(droite a, droite b) {
    if (a.pente == b.pente)
        return INFINI;
    if (a.pente < b.pente)
        swap(a, b);
    return (long double)(b.cst - a.cst) / (long double)(a.pente - b.pente);
}

void Insert(droite a, int id) {
    while (fin[id] > deb[id] + 1 && Inter(Deque[fin[id] - 2][id], a) <= Inter(Deque[fin[id] - 2][id], Deque[fin[id] - 1][id]))
        fin[id] --;
    Deque[fin[id] ++][id] = a;
    return;
}

pair <long long, int> GetMin(long long absc, int id) {
    while (fin[id] > deb[id] + 1 && (long double)absc >= Inter(Deque[deb[id]][id], Deque[deb[id] + 1][id]))
        deb[id] ++;
    return {Deque[deb[id]][id].pente * absc + Deque[deb[id]][id].cst, Deque[deb[id]][id].prix};
}

// pair <long long, int> FindDP(long long lambda) {
//     deb = 0, fin = 0;
//     pair <long long, int> DP = {0LL, 0};
//     Insert({- 2 * Points[0].first, Points[0].first * Points[0].first, 0});
//     for (int i = 0; i < nbPoints; i ++)
//     {
//         DP = GetMin(Points[i].second);
//         DP.first += Points[i].second * Points[i].second + lambda;
//         DP.second ++;
//         if (i + 1 < nbPoints)
//         {
//             long long d = max(0LL, Points[i].second - Points[i + 1].first);
//             Insert({- 2 * Points[i + 1].first,
//             Points[i + 1].first * Points[i + 1].first - d * d + DP.first, DP.second});
//         }
//     }
//     return DP;
// }

void Treat(int noeud) {
    for (int i = 1; i <= nbPoints; i ++)
    {
        DP[noeud][i] = GetMin(Points[noeud].second, i - 1).first + Points[noeud].second * Points[noeud].second;
    }
    if (noeud + 1 == nbPoints)
        return;
    for (int i = 1; i <= nbPoints; i ++)
    {
        long long d = max(0LL, Points[noeud].second - Points[noeud + 1].first);
        Insert({- 2 * Points[noeud + 1].first, Points[noeud + 1].first * Points[noeud + 1].first - d * d + DP[noeud][i], 0}, i);
    }
    return;
}

void DPDebile() {
    Insert({- 2 * Points[0].first, Points[0].first * Points[0].first, 0}, 0);
    for (int i = 0; i < nbPoints; i ++)
    {
        Treat(i);
    }
    return;
}

long long take_photos(int nbAliens, int tailleMax, int nbPhotos, vector<int> Lignes, vector<int> Colonnes) {
    
    tailleMax ++;
    
    for (int i = 0; i < nbAliens; i ++)
    {
        if (Lignes[i] > Colonnes[i])
            swap(Lignes[i], Colonnes[i]);
        Aliens[i] = {Lignes[i], Colonnes[i] + 1};
    }
    sort(Aliens, Aliens + nbAliens, Compare);
    
    for (int i = 0; i < nbAliens; i ++)
    {
        if (nbPoints == 0 || Aliens[i].second > (int)Points[nbPoints - 1].second)
            Points[nbPoints ++] = Aliens[i];
    }
    
    DPDebile();
    
    return DP[nbPoints - 1][min(nbPhotos, nbPoints)];
    /*
    long long lambda = -1;
    long long ans = 0;
    for (long long i = (1LL << LOG); i > 0; i /= 2)
    {
        pair <long long, int> DP = FindDP(lambda + i);
        if (DP.second <= nbPhotos)
            ans = DP.first - (lambda + i) * DP.second;
        else
            lambda += i;
    }
    return ans;*/
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Correct answer: answer = 4
2 Correct 1 ms 204 KB Correct answer: answer = 4
3 Correct 0 ms 204 KB Correct answer: answer = 4
4 Correct 1 ms 204 KB Correct answer: answer = 12
5 Correct 1 ms 332 KB Correct answer: answer = 52
6 Correct 1 ms 332 KB Correct answer: answer = 210
7 Correct 1 ms 204 KB Correct answer: answer = 88
8 Correct 1 ms 332 KB Correct answer: answer = 7696
9 Correct 1 ms 204 KB Correct answer: answer = 1
10 Correct 1 ms 332 KB Correct answer: answer = 2374
11 Correct 1 ms 332 KB Correct answer: answer = 9502
12 Correct 1 ms 204 KB Correct answer: answer = 49
13 Correct 1 ms 716 KB Correct answer: answer = 151
14 Correct 1 ms 716 KB Correct answer: answer = 7550
15 Correct 1 ms 460 KB Correct answer: answer = 7220
16 Correct 1 ms 716 KB Correct answer: answer = 7550
17 Correct 1 ms 204 KB Correct answer: answer = 10000
18 Correct 1 ms 204 KB Correct answer: answer = 10000
19 Correct 1 ms 460 KB Correct answer: answer = 624
20 Correct 1 ms 204 KB Correct answer: answer = 10000
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Correct answer: answer = 1
2 Correct 1 ms 204 KB Correct answer: answer = 4
3 Correct 1 ms 204 KB Correct answer: answer = 1
4 Correct 1 ms 332 KB Correct answer: answer = 5
5 Correct 1 ms 332 KB Correct answer: answer = 41
6 Correct 1 ms 460 KB Correct answer: answer = 71923
7 Correct 3 ms 2636 KB Correct answer: answer = 77137
8 Correct 9 ms 7756 KB Correct answer: answer = 764
9 Correct 14 ms 12248 KB Correct answer: answer = 250000
10 Correct 14 ms 12172 KB Correct answer: answer = 500
11 Correct 1 ms 332 KB Correct answer: answer = 32
12 Correct 17 ms 12108 KB Correct answer: answer = 130050
13 Correct 14 ms 12200 KB Correct answer: answer = 5110
14 Correct 5 ms 4428 KB Correct answer: answer = 2626
15 Correct 5 ms 4396 KB Correct answer: answer = 796
16 Correct 14 ms 12148 KB Correct answer: answer = 7580
17 Correct 14 ms 12236 KB Correct answer: answer = 1904
18 Correct 10 ms 7756 KB Correct answer: answer = 996004
19 Correct 12 ms 7856 KB Correct answer: answer = 38817
20 Correct 9 ms 7628 KB Correct answer: answer = 4096
21 Correct 1 ms 204 KB Correct answer: answer = 1
22 Correct 1 ms 332 KB Correct answer: answer = 1
23 Correct 16 ms 12124 KB Correct answer: answer = 2040
24 Correct 1 ms 332 KB Correct answer: answer = 2
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Correct answer: answer = 4
2 Correct 1 ms 204 KB Correct answer: answer = 4
3 Correct 0 ms 204 KB Correct answer: answer = 4
4 Correct 1 ms 204 KB Correct answer: answer = 12
5 Correct 1 ms 332 KB Correct answer: answer = 52
6 Correct 1 ms 332 KB Correct answer: answer = 210
7 Correct 1 ms 204 KB Correct answer: answer = 88
8 Correct 1 ms 332 KB Correct answer: answer = 7696
9 Correct 1 ms 204 KB Correct answer: answer = 1
10 Correct 1 ms 332 KB Correct answer: answer = 2374
11 Correct 1 ms 332 KB Correct answer: answer = 9502
12 Correct 1 ms 204 KB Correct answer: answer = 49
13 Correct 1 ms 716 KB Correct answer: answer = 151
14 Correct 1 ms 716 KB Correct answer: answer = 7550
15 Correct 1 ms 460 KB Correct answer: answer = 7220
16 Correct 1 ms 716 KB Correct answer: answer = 7550
17 Correct 1 ms 204 KB Correct answer: answer = 10000
18 Correct 1 ms 204 KB Correct answer: answer = 10000
19 Correct 1 ms 460 KB Correct answer: answer = 624
20 Correct 1 ms 204 KB Correct answer: answer = 10000
21 Correct 1 ms 204 KB Correct answer: answer = 1
22 Correct 1 ms 204 KB Correct answer: answer = 4
23 Correct 1 ms 204 KB Correct answer: answer = 1
24 Correct 1 ms 332 KB Correct answer: answer = 5
25 Correct 1 ms 332 KB Correct answer: answer = 41
26 Correct 1 ms 460 KB Correct answer: answer = 71923
27 Correct 3 ms 2636 KB Correct answer: answer = 77137
28 Correct 9 ms 7756 KB Correct answer: answer = 764
29 Correct 14 ms 12248 KB Correct answer: answer = 250000
30 Correct 14 ms 12172 KB Correct answer: answer = 500
31 Correct 1 ms 332 KB Correct answer: answer = 32
32 Correct 17 ms 12108 KB Correct answer: answer = 130050
33 Correct 14 ms 12200 KB Correct answer: answer = 5110
34 Correct 5 ms 4428 KB Correct answer: answer = 2626
35 Correct 5 ms 4396 KB Correct answer: answer = 796
36 Correct 14 ms 12148 KB Correct answer: answer = 7580
37 Correct 14 ms 12236 KB Correct answer: answer = 1904
38 Correct 10 ms 7756 KB Correct answer: answer = 996004
39 Correct 12 ms 7856 KB Correct answer: answer = 38817
40 Correct 9 ms 7628 KB Correct answer: answer = 4096
41 Correct 1 ms 204 KB Correct answer: answer = 1
42 Correct 1 ms 332 KB Correct answer: answer = 1
43 Correct 16 ms 12124 KB Correct answer: answer = 2040
44 Correct 1 ms 332 KB Correct answer: answer = 2
45 Correct 1 ms 204 KB Correct answer: answer = 4
46 Correct 1 ms 204 KB Correct answer: answer = 9
47 Correct 1 ms 204 KB Correct answer: answer = 9
48 Correct 1 ms 204 KB Correct answer: answer = 21
49 Correct 1 ms 332 KB Correct answer: answer = 71
50 Correct 1 ms 204 KB Correct answer: answer = 77
51 Correct 1 ms 204 KB Correct answer: answer = 400
52 Correct 1 ms 332 KB Correct answer: answer = 996004
53 Correct 1 ms 332 KB Correct answer: answer = 997310
54 Correct 2 ms 332 KB Correct answer: answer = 990781
55 Correct 1 ms 332 KB Correct answer: answer = 996545
56 Correct 1 ms 204 KB Correct answer: answer = 484
57 Correct 1 ms 332 KB Correct answer: answer = 484
58 Correct 14 ms 12192 KB Correct answer: answer = 63501
59 Correct 14 ms 12188 KB Correct answer: answer = 323501
60 Correct 14 ms 12236 KB Correct answer: answer = 752500
61 Correct 5 ms 3756 KB Correct answer: answer = 761480
62 Correct 4 ms 3788 KB Correct answer: answer = 758932
63 Correct 1 ms 332 KB Correct answer: answer = 1000000
64 Correct 16 ms 12240 KB Correct answer: answer = 750500
65 Correct 1 ms 332 KB Correct answer: answer = 1000000
66 Correct 1 ms 204 KB Correct answer: answer = 250000
67 Correct 1 ms 204 KB Correct answer: answer = 250000
68 Correct 1 ms 332 KB Correct answer: answer = 1000000
69 Correct 1 ms 332 KB Correct answer: answer = 994009
70 Correct 3 ms 2600 KB Correct answer: answer = 59315
71 Correct 3 ms 2508 KB Correct answer: answer = 25454
72 Correct 6 ms 5288 KB Correct answer: answer = 1504
73 Correct 1 ms 1356 KB Correct answer: answer = 37486
74 Correct 5 ms 4172 KB Correct answer: answer = 4284
75 Correct 1 ms 716 KB Correct answer: answer = 158008
76 Correct 1 ms 1100 KB Correct answer: answer = 51860
77 Correct 1 ms 1100 KB Correct answer: answer = 12985
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Correct answer: answer = 4
2 Correct 1 ms 204 KB Correct answer: answer = 4
3 Correct 0 ms 204 KB Correct answer: answer = 4
4 Correct 1 ms 204 KB Correct answer: answer = 12
5 Correct 1 ms 332 KB Correct answer: answer = 52
6 Correct 1 ms 332 KB Correct answer: answer = 210
7 Correct 1 ms 204 KB Correct answer: answer = 88
8 Correct 1 ms 332 KB Correct answer: answer = 7696
9 Correct 1 ms 204 KB Correct answer: answer = 1
10 Correct 1 ms 332 KB Correct answer: answer = 2374
11 Correct 1 ms 332 KB Correct answer: answer = 9502
12 Correct 1 ms 204 KB Correct answer: answer = 49
13 Correct 1 ms 716 KB Correct answer: answer = 151
14 Correct 1 ms 716 KB Correct answer: answer = 7550
15 Correct 1 ms 460 KB Correct answer: answer = 7220
16 Correct 1 ms 716 KB Correct answer: answer = 7550
17 Correct 1 ms 204 KB Correct answer: answer = 10000
18 Correct 1 ms 204 KB Correct answer: answer = 10000
19 Correct 1 ms 460 KB Correct answer: answer = 624
20 Correct 1 ms 204 KB Correct answer: answer = 10000
21 Correct 1 ms 204 KB Correct answer: answer = 1
22 Correct 1 ms 204 KB Correct answer: answer = 4
23 Correct 1 ms 204 KB Correct answer: answer = 1
24 Correct 1 ms 332 KB Correct answer: answer = 5
25 Correct 1 ms 332 KB Correct answer: answer = 41
26 Correct 1 ms 460 KB Correct answer: answer = 71923
27 Correct 3 ms 2636 KB Correct answer: answer = 77137
28 Correct 9 ms 7756 KB Correct answer: answer = 764
29 Correct 14 ms 12248 KB Correct answer: answer = 250000
30 Correct 14 ms 12172 KB Correct answer: answer = 500
31 Correct 1 ms 332 KB Correct answer: answer = 32
32 Correct 17 ms 12108 KB Correct answer: answer = 130050
33 Correct 14 ms 12200 KB Correct answer: answer = 5110
34 Correct 5 ms 4428 KB Correct answer: answer = 2626
35 Correct 5 ms 4396 KB Correct answer: answer = 796
36 Correct 14 ms 12148 KB Correct answer: answer = 7580
37 Correct 14 ms 12236 KB Correct answer: answer = 1904
38 Correct 10 ms 7756 KB Correct answer: answer = 996004
39 Correct 12 ms 7856 KB Correct answer: answer = 38817
40 Correct 9 ms 7628 KB Correct answer: answer = 4096
41 Correct 1 ms 204 KB Correct answer: answer = 1
42 Correct 1 ms 332 KB Correct answer: answer = 1
43 Correct 16 ms 12124 KB Correct answer: answer = 2040
44 Correct 1 ms 332 KB Correct answer: answer = 2
45 Correct 1 ms 204 KB Correct answer: answer = 4
46 Correct 1 ms 204 KB Correct answer: answer = 9
47 Correct 1 ms 204 KB Correct answer: answer = 9
48 Correct 1 ms 204 KB Correct answer: answer = 21
49 Correct 1 ms 332 KB Correct answer: answer = 71
50 Correct 1 ms 204 KB Correct answer: answer = 77
51 Correct 1 ms 204 KB Correct answer: answer = 400
52 Correct 1 ms 332 KB Correct answer: answer = 996004
53 Correct 1 ms 332 KB Correct answer: answer = 997310
54 Correct 2 ms 332 KB Correct answer: answer = 990781
55 Correct 1 ms 332 KB Correct answer: answer = 996545
56 Correct 1 ms 204 KB Correct answer: answer = 484
57 Correct 1 ms 332 KB Correct answer: answer = 484
58 Correct 14 ms 12192 KB Correct answer: answer = 63501
59 Correct 14 ms 12188 KB Correct answer: answer = 323501
60 Correct 14 ms 12236 KB Correct answer: answer = 752500
61 Correct 5 ms 3756 KB Correct answer: answer = 761480
62 Correct 4 ms 3788 KB Correct answer: answer = 758932
63 Correct 1 ms 332 KB Correct answer: answer = 1000000
64 Correct 16 ms 12240 KB Correct answer: answer = 750500
65 Correct 1 ms 332 KB Correct answer: answer = 1000000
66 Correct 1 ms 204 KB Correct answer: answer = 250000
67 Correct 1 ms 204 KB Correct answer: answer = 250000
68 Correct 1 ms 332 KB Correct answer: answer = 1000000
69 Correct 1 ms 332 KB Correct answer: answer = 994009
70 Correct 3 ms 2600 KB Correct answer: answer = 59315
71 Correct 3 ms 2508 KB Correct answer: answer = 25454
72 Correct 6 ms 5288 KB Correct answer: answer = 1504
73 Correct 1 ms 1356 KB Correct answer: answer = 37486
74 Correct 5 ms 4172 KB Correct answer: answer = 4284
75 Correct 1 ms 716 KB Correct answer: answer = 158008
76 Correct 1 ms 1100 KB Correct answer: answer = 51860
77 Correct 1 ms 1100 KB Correct answer: answer = 12985
78 Correct 3 ms 460 KB Correct answer: answer = 997864126212
79 Correct 3 ms 460 KB Correct answer: answer = 998608411647
80 Correct 3 ms 588 KB Correct answer: answer = 995265560477
81 Correct 779 ms 501100 KB Correct answer: answer = 10125000
82 Correct 757 ms 501148 KB Correct answer: answer = 2291668
83 Correct 198 ms 148256 KB Correct answer: answer = 42388
84 Correct 195 ms 148280 KB Correct answer: answer = 10318
85 Correct 201 ms 148268 KB Correct answer: answer = 3416
86 Correct 1018 ms 446548 KB Correct answer: answer = 331708193881
87 Correct 1004 ms 447512 KB Correct answer: answer = 2861193756
88 Correct 1014 ms 448708 KB Correct answer: answer = 114646930
89 Correct 734 ms 501508 KB Correct answer: answer = 9280921
90 Correct 753 ms 501588 KB Correct answer: answer = 999984053400
91 Correct 1060 ms 431520 KB Correct answer: answer = 750935949134
92 Correct 2 ms 332 KB Correct answer: answer = 1000000000000
93 Correct 2 ms 460 KB Correct answer: answer = 998762383161
94 Correct 954 ms 432104 KB Correct answer: answer = 23017412908
95 Correct 3 ms 1228 KB Correct answer: answer = 728143410622
96 Correct 1 ms 332 KB Correct answer: answer = 2
97 Correct 745 ms 501488 KB Correct answer: answer = 1824916
98 Correct 930 ms 468188 KB Correct answer: answer = 10680029
99 Correct 899 ms 485764 KB Correct answer: answer = 18351700
100 Correct 753 ms 501432 KB Correct answer: answer = 16040026
101 Correct 16 ms 11232 KB Correct answer: answer = 253968628325
102 Correct 215 ms 128256 KB Correct answer: answer = 10267
103 Correct 903 ms 498300 KB Correct answer: answer = 2582408
104 Correct 2 ms 588 KB Correct answer: answer = 78024964781
105 Correct 3 ms 972 KB Correct answer: answer = 9866346457
106 Correct 15 ms 10484 KB Correct answer: answer = 3327720949
107 Correct 6 ms 4300 KB Correct answer: answer = 86064128360
108 Correct 32 ms 21572 KB Correct answer: answer = 12698259150
109 Correct 682 ms 298108 KB Correct answer: answer = 1185259288
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Correct answer: answer = 4
2 Correct 1 ms 204 KB Correct answer: answer = 4
3 Correct 0 ms 204 KB Correct answer: answer = 4
4 Correct 1 ms 204 KB Correct answer: answer = 12
5 Correct 1 ms 332 KB Correct answer: answer = 52
6 Correct 1 ms 332 KB Correct answer: answer = 210
7 Correct 1 ms 204 KB Correct answer: answer = 88
8 Correct 1 ms 332 KB Correct answer: answer = 7696
9 Correct 1 ms 204 KB Correct answer: answer = 1
10 Correct 1 ms 332 KB Correct answer: answer = 2374
11 Correct 1 ms 332 KB Correct answer: answer = 9502
12 Correct 1 ms 204 KB Correct answer: answer = 49
13 Correct 1 ms 716 KB Correct answer: answer = 151
14 Correct 1 ms 716 KB Correct answer: answer = 7550
15 Correct 1 ms 460 KB Correct answer: answer = 7220
16 Correct 1 ms 716 KB Correct answer: answer = 7550
17 Correct 1 ms 204 KB Correct answer: answer = 10000
18 Correct 1 ms 204 KB Correct answer: answer = 10000
19 Correct 1 ms 460 KB Correct answer: answer = 624
20 Correct 1 ms 204 KB Correct answer: answer = 10000
21 Correct 1 ms 204 KB Correct answer: answer = 1
22 Correct 1 ms 204 KB Correct answer: answer = 4
23 Correct 1 ms 204 KB Correct answer: answer = 1
24 Correct 1 ms 332 KB Correct answer: answer = 5
25 Correct 1 ms 332 KB Correct answer: answer = 41
26 Correct 1 ms 460 KB Correct answer: answer = 71923
27 Correct 3 ms 2636 KB Correct answer: answer = 77137
28 Correct 9 ms 7756 KB Correct answer: answer = 764
29 Correct 14 ms 12248 KB Correct answer: answer = 250000
30 Correct 14 ms 12172 KB Correct answer: answer = 500
31 Correct 1 ms 332 KB Correct answer: answer = 32
32 Correct 17 ms 12108 KB Correct answer: answer = 130050
33 Correct 14 ms 12200 KB Correct answer: answer = 5110
34 Correct 5 ms 4428 KB Correct answer: answer = 2626
35 Correct 5 ms 4396 KB Correct answer: answer = 796
36 Correct 14 ms 12148 KB Correct answer: answer = 7580
37 Correct 14 ms 12236 KB Correct answer: answer = 1904
38 Correct 10 ms 7756 KB Correct answer: answer = 996004
39 Correct 12 ms 7856 KB Correct answer: answer = 38817
40 Correct 9 ms 7628 KB Correct answer: answer = 4096
41 Correct 1 ms 204 KB Correct answer: answer = 1
42 Correct 1 ms 332 KB Correct answer: answer = 1
43 Correct 16 ms 12124 KB Correct answer: answer = 2040
44 Correct 1 ms 332 KB Correct answer: answer = 2
45 Correct 1 ms 204 KB Correct answer: answer = 4
46 Correct 1 ms 204 KB Correct answer: answer = 9
47 Correct 1 ms 204 KB Correct answer: answer = 9
48 Correct 1 ms 204 KB Correct answer: answer = 21
49 Correct 1 ms 332 KB Correct answer: answer = 71
50 Correct 1 ms 204 KB Correct answer: answer = 77
51 Correct 1 ms 204 KB Correct answer: answer = 400
52 Correct 1 ms 332 KB Correct answer: answer = 996004
53 Correct 1 ms 332 KB Correct answer: answer = 997310
54 Correct 2 ms 332 KB Correct answer: answer = 990781
55 Correct 1 ms 332 KB Correct answer: answer = 996545
56 Correct 1 ms 204 KB Correct answer: answer = 484
57 Correct 1 ms 332 KB Correct answer: answer = 484
58 Correct 14 ms 12192 KB Correct answer: answer = 63501
59 Correct 14 ms 12188 KB Correct answer: answer = 323501
60 Correct 14 ms 12236 KB Correct answer: answer = 752500
61 Correct 5 ms 3756 KB Correct answer: answer = 761480
62 Correct 4 ms 3788 KB Correct answer: answer = 758932
63 Correct 1 ms 332 KB Correct answer: answer = 1000000
64 Correct 16 ms 12240 KB Correct answer: answer = 750500
65 Correct 1 ms 332 KB Correct answer: answer = 1000000
66 Correct 1 ms 204 KB Correct answer: answer = 250000
67 Correct 1 ms 204 KB Correct answer: answer = 250000
68 Correct 1 ms 332 KB Correct answer: answer = 1000000
69 Correct 1 ms 332 KB Correct answer: answer = 994009
70 Correct 3 ms 2600 KB Correct answer: answer = 59315
71 Correct 3 ms 2508 KB Correct answer: answer = 25454
72 Correct 6 ms 5288 KB Correct answer: answer = 1504
73 Correct 1 ms 1356 KB Correct answer: answer = 37486
74 Correct 5 ms 4172 KB Correct answer: answer = 4284
75 Correct 1 ms 716 KB Correct answer: answer = 158008
76 Correct 1 ms 1100 KB Correct answer: answer = 51860
77 Correct 1 ms 1100 KB Correct answer: answer = 12985
78 Correct 3 ms 460 KB Correct answer: answer = 997864126212
79 Correct 3 ms 460 KB Correct answer: answer = 998608411647
80 Correct 3 ms 588 KB Correct answer: answer = 995265560477
81 Correct 779 ms 501100 KB Correct answer: answer = 10125000
82 Correct 757 ms 501148 KB Correct answer: answer = 2291668
83 Correct 198 ms 148256 KB Correct answer: answer = 42388
84 Correct 195 ms 148280 KB Correct answer: answer = 10318
85 Correct 201 ms 148268 KB Correct answer: answer = 3416
86 Correct 1018 ms 446548 KB Correct answer: answer = 331708193881
87 Correct 1004 ms 447512 KB Correct answer: answer = 2861193756
88 Correct 1014 ms 448708 KB Correct answer: answer = 114646930
89 Correct 734 ms 501508 KB Correct answer: answer = 9280921
90 Correct 753 ms 501588 KB Correct answer: answer = 999984053400
91 Correct 1060 ms 431520 KB Correct answer: answer = 750935949134
92 Correct 2 ms 332 KB Correct answer: answer = 1000000000000
93 Correct 2 ms 460 KB Correct answer: answer = 998762383161
94 Correct 954 ms 432104 KB Correct answer: answer = 23017412908
95 Correct 3 ms 1228 KB Correct answer: answer = 728143410622
96 Correct 1 ms 332 KB Correct answer: answer = 2
97 Correct 745 ms 501488 KB Correct answer: answer = 1824916
98 Correct 930 ms 468188 KB Correct answer: answer = 10680029
99 Correct 899 ms 485764 KB Correct answer: answer = 18351700
100 Correct 753 ms 501432 KB Correct answer: answer = 16040026
101 Correct 16 ms 11232 KB Correct answer: answer = 253968628325
102 Correct 215 ms 128256 KB Correct answer: answer = 10267
103 Correct 903 ms 498300 KB Correct answer: answer = 2582408
104 Correct 2 ms 588 KB Correct answer: answer = 78024964781
105 Correct 3 ms 972 KB Correct answer: answer = 9866346457
106 Correct 15 ms 10484 KB Correct answer: answer = 3327720949
107 Correct 6 ms 4300 KB Correct answer: answer = 86064128360
108 Correct 32 ms 21572 KB Correct answer: answer = 12698259150
109 Correct 682 ms 298108 KB Correct answer: answer = 1185259288
110 Correct 19 ms 2168 KB Correct answer: answer = 999889968863
111 Correct 21 ms 2164 KB Correct answer: answer = 999861384931
112 Correct 20 ms 2128 KB Correct answer: answer = 999811809929
113 Correct 19 ms 2128 KB Correct answer: answer = 999869756441
114 Runtime error 43 ms 3504 KB Execution killed with signal 11
115 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Correct answer: answer = 4
2 Correct 1 ms 204 KB Correct answer: answer = 4
3 Correct 0 ms 204 KB Correct answer: answer = 4
4 Correct 1 ms 204 KB Correct answer: answer = 12
5 Correct 1 ms 332 KB Correct answer: answer = 52
6 Correct 1 ms 332 KB Correct answer: answer = 210
7 Correct 1 ms 204 KB Correct answer: answer = 88
8 Correct 1 ms 332 KB Correct answer: answer = 7696
9 Correct 1 ms 204 KB Correct answer: answer = 1
10 Correct 1 ms 332 KB Correct answer: answer = 2374
11 Correct 1 ms 332 KB Correct answer: answer = 9502
12 Correct 1 ms 204 KB Correct answer: answer = 49
13 Correct 1 ms 716 KB Correct answer: answer = 151
14 Correct 1 ms 716 KB Correct answer: answer = 7550
15 Correct 1 ms 460 KB Correct answer: answer = 7220
16 Correct 1 ms 716 KB Correct answer: answer = 7550
17 Correct 1 ms 204 KB Correct answer: answer = 10000
18 Correct 1 ms 204 KB Correct answer: answer = 10000
19 Correct 1 ms 460 KB Correct answer: answer = 624
20 Correct 1 ms 204 KB Correct answer: answer = 10000
21 Correct 1 ms 204 KB Correct answer: answer = 1
22 Correct 1 ms 204 KB Correct answer: answer = 4
23 Correct 1 ms 204 KB Correct answer: answer = 1
24 Correct 1 ms 332 KB Correct answer: answer = 5
25 Correct 1 ms 332 KB Correct answer: answer = 41
26 Correct 1 ms 460 KB Correct answer: answer = 71923
27 Correct 3 ms 2636 KB Correct answer: answer = 77137
28 Correct 9 ms 7756 KB Correct answer: answer = 764
29 Correct 14 ms 12248 KB Correct answer: answer = 250000
30 Correct 14 ms 12172 KB Correct answer: answer = 500
31 Correct 1 ms 332 KB Correct answer: answer = 32
32 Correct 17 ms 12108 KB Correct answer: answer = 130050
33 Correct 14 ms 12200 KB Correct answer: answer = 5110
34 Correct 5 ms 4428 KB Correct answer: answer = 2626
35 Correct 5 ms 4396 KB Correct answer: answer = 796
36 Correct 14 ms 12148 KB Correct answer: answer = 7580
37 Correct 14 ms 12236 KB Correct answer: answer = 1904
38 Correct 10 ms 7756 KB Correct answer: answer = 996004
39 Correct 12 ms 7856 KB Correct answer: answer = 38817
40 Correct 9 ms 7628 KB Correct answer: answer = 4096
41 Correct 1 ms 204 KB Correct answer: answer = 1
42 Correct 1 ms 332 KB Correct answer: answer = 1
43 Correct 16 ms 12124 KB Correct answer: answer = 2040
44 Correct 1 ms 332 KB Correct answer: answer = 2
45 Correct 1 ms 204 KB Correct answer: answer = 4
46 Correct 1 ms 204 KB Correct answer: answer = 9
47 Correct 1 ms 204 KB Correct answer: answer = 9
48 Correct 1 ms 204 KB Correct answer: answer = 21
49 Correct 1 ms 332 KB Correct answer: answer = 71
50 Correct 1 ms 204 KB Correct answer: answer = 77
51 Correct 1 ms 204 KB Correct answer: answer = 400
52 Correct 1 ms 332 KB Correct answer: answer = 996004
53 Correct 1 ms 332 KB Correct answer: answer = 997310
54 Correct 2 ms 332 KB Correct answer: answer = 990781
55 Correct 1 ms 332 KB Correct answer: answer = 996545
56 Correct 1 ms 204 KB Correct answer: answer = 484
57 Correct 1 ms 332 KB Correct answer: answer = 484
58 Correct 14 ms 12192 KB Correct answer: answer = 63501
59 Correct 14 ms 12188 KB Correct answer: answer = 323501
60 Correct 14 ms 12236 KB Correct answer: answer = 752500
61 Correct 5 ms 3756 KB Correct answer: answer = 761480
62 Correct 4 ms 3788 KB Correct answer: answer = 758932
63 Correct 1 ms 332 KB Correct answer: answer = 1000000
64 Correct 16 ms 12240 KB Correct answer: answer = 750500
65 Correct 1 ms 332 KB Correct answer: answer = 1000000
66 Correct 1 ms 204 KB Correct answer: answer = 250000
67 Correct 1 ms 204 KB Correct answer: answer = 250000
68 Correct 1 ms 332 KB Correct answer: answer = 1000000
69 Correct 1 ms 332 KB Correct answer: answer = 994009
70 Correct 3 ms 2600 KB Correct answer: answer = 59315
71 Correct 3 ms 2508 KB Correct answer: answer = 25454
72 Correct 6 ms 5288 KB Correct answer: answer = 1504
73 Correct 1 ms 1356 KB Correct answer: answer = 37486
74 Correct 5 ms 4172 KB Correct answer: answer = 4284
75 Correct 1 ms 716 KB Correct answer: answer = 158008
76 Correct 1 ms 1100 KB Correct answer: answer = 51860
77 Correct 1 ms 1100 KB Correct answer: answer = 12985
78 Correct 3 ms 460 KB Correct answer: answer = 997864126212
79 Correct 3 ms 460 KB Correct answer: answer = 998608411647
80 Correct 3 ms 588 KB Correct answer: answer = 995265560477
81 Correct 779 ms 501100 KB Correct answer: answer = 10125000
82 Correct 757 ms 501148 KB Correct answer: answer = 2291668
83 Correct 198 ms 148256 KB Correct answer: answer = 42388
84 Correct 195 ms 148280 KB Correct answer: answer = 10318
85 Correct 201 ms 148268 KB Correct answer: answer = 3416
86 Correct 1018 ms 446548 KB Correct answer: answer = 331708193881
87 Correct 1004 ms 447512 KB Correct answer: answer = 2861193756
88 Correct 1014 ms 448708 KB Correct answer: answer = 114646930
89 Correct 734 ms 501508 KB Correct answer: answer = 9280921
90 Correct 753 ms 501588 KB Correct answer: answer = 999984053400
91 Correct 1060 ms 431520 KB Correct answer: answer = 750935949134
92 Correct 2 ms 332 KB Correct answer: answer = 1000000000000
93 Correct 2 ms 460 KB Correct answer: answer = 998762383161
94 Correct 954 ms 432104 KB Correct answer: answer = 23017412908
95 Correct 3 ms 1228 KB Correct answer: answer = 728143410622
96 Correct 1 ms 332 KB Correct answer: answer = 2
97 Correct 745 ms 501488 KB Correct answer: answer = 1824916
98 Correct 930 ms 468188 KB Correct answer: answer = 10680029
99 Correct 899 ms 485764 KB Correct answer: answer = 18351700
100 Correct 753 ms 501432 KB Correct answer: answer = 16040026
101 Correct 16 ms 11232 KB Correct answer: answer = 253968628325
102 Correct 215 ms 128256 KB Correct answer: answer = 10267
103 Correct 903 ms 498300 KB Correct answer: answer = 2582408
104 Correct 2 ms 588 KB Correct answer: answer = 78024964781
105 Correct 3 ms 972 KB Correct answer: answer = 9866346457
106 Correct 15 ms 10484 KB Correct answer: answer = 3327720949
107 Correct 6 ms 4300 KB Correct answer: answer = 86064128360
108 Correct 32 ms 21572 KB Correct answer: answer = 12698259150
109 Correct 682 ms 298108 KB Correct answer: answer = 1185259288
110 Correct 19 ms 2168 KB Correct answer: answer = 999889968863
111 Correct 21 ms 2164 KB Correct answer: answer = 999861384931
112 Correct 20 ms 2128 KB Correct answer: answer = 999811809929
113 Correct 19 ms 2128 KB Correct answer: answer = 999869756441
114 Runtime error 43 ms 3504 KB Execution killed with signal 11
115 Halted 0 ms 0 KB -