Submission #389016

# Submission time Handle Problem Language Result Execution time Memory
389016 2021-04-13T13:22:10 Z mehrdad_sohrabi Aliens (IOI16_aliens) C++14
25 / 100
2000 ms 24816 KB
// Black lives matter
#include <bits/stdc++.h>
#include "aliens.h"

/// 500 485 462 A4
using namespace std;
typedef long long int ll;
typedef complex<double> point;
typedef long double ld;
#define pb push_back
#define pii pair < ll , ll >
#define F first
#define S second
//#define endl '\n'
#define int long long
#define sync ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#define kill(x) return cout<<x<<'\n', 0;
const int N=5e3+10,M=1e6+100,inf=(ll)1e15;
ll dp[N][N];
ll A[M];
long long take_photos(int32_t n, int32_t m, int32_t k, std::vector<int32_t> r, std::vector<int32_t> c){
    for (int i=0;i<M;i++) A[i]=i;
    for (int i=0;i<n;i++){
        ll x=r[i],y=c[i];
        A[max(x,y)]=min(A[max(x,y)],min(x,y)-1);
    }
    vector <pii> B;
    for (int i=0;i<m;i++){
        if (A[i]<i){
            while(B.size() && B.back().F>=A[i]) B.pop_back();
            B.pb({A[i],i});
        }
    }
  //  for (auto u : B){
   //     cout << u.F << " " << u.S << endl;
    //}
    ll t=B.size();
    for (int i=1;i<=t;i++){
        dp[i][1]=(B[i-1].S-B[0].F)*(B[i-1].S-B[0].F);
    }
    for (int i=2;i<=k;i++){
        for (int j=1;j<=t;j++){
            dp[j][i]=inf;
            for (int l=1;l<=j;l++){
                ll z=0;
                if (l>1){
                    if (B[l-1].F<B[l-2].S){
                        z=(B[l-2].S-B[l-1].F)*((B[l-2].S-B[l-1].F));
                    }
                }
              //  cout << z << " " << j << " " << i dp[j][i] << endl;
                dp[j][i]=min(dp[j][i],dp[l-1][i-1]+(B[j-1].S-B[l-1].F)*(B[j-1].S-B[l-1].F)-z);
            }
        }
    }
    return dp[t][k];
}
/*
int32_t main() {
    int n, m, k;
    assert(3 == scanf("%d %d %d", &n, &m, &k));
    std::vector<int32_t> r(n), c(n);
    for (int i = 0; i < n; i++) {
        assert(2 == scanf("%d %d", &r[i], &c[i]));
    }
    long long ans = take_photos(n, m, k, r, c);


    printf("%lld\n", ans);
    return 0;
}
*/
/*
5 7 2
0 3
4 4
4 6
4 5
4 6
*/
//take_photos(5, 7, 2, [0, 4, 4, 4, 4], [3, 4, 6, 5, 6])
# Verdict Execution time Memory Grader output
1 Correct 4 ms 8012 KB Correct answer: answer = 4
2 Correct 4 ms 8012 KB Correct answer: answer = 4
3 Correct 4 ms 8140 KB Correct answer: answer = 4
4 Correct 4 ms 8140 KB Correct answer: answer = 12
5 Correct 4 ms 8140 KB Correct answer: answer = 52
6 Correct 4 ms 8140 KB Correct answer: answer = 210
7 Correct 4 ms 8112 KB Correct answer: answer = 88
8 Correct 4 ms 8140 KB Correct answer: answer = 7696
9 Correct 4 ms 8108 KB Correct answer: answer = 1
10 Correct 4 ms 8140 KB Correct answer: answer = 2374
11 Correct 4 ms 8144 KB Correct answer: answer = 9502
12 Correct 4 ms 8108 KB Correct answer: answer = 49
13 Correct 4 ms 8268 KB Correct answer: answer = 151
14 Correct 4 ms 8268 KB Correct answer: answer = 7550
15 Correct 4 ms 8140 KB Correct answer: answer = 7220
16 Correct 4 ms 8268 KB Correct answer: answer = 7550
17 Correct 4 ms 8144 KB Correct answer: answer = 10000
18 Correct 4 ms 8012 KB Correct answer: answer = 10000
19 Correct 4 ms 8140 KB Correct answer: answer = 624
20 Correct 4 ms 8012 KB Correct answer: answer = 10000
# Verdict Execution time Memory Grader output
1 Correct 4 ms 8012 KB Correct answer: answer = 1
2 Correct 4 ms 8136 KB Correct answer: answer = 4
3 Correct 4 ms 8012 KB Correct answer: answer = 1
4 Correct 4 ms 8112 KB Correct answer: answer = 5
5 Correct 5 ms 8140 KB Correct answer: answer = 41
6 Correct 4 ms 8140 KB Correct answer: answer = 71923
7 Correct 5 ms 8780 KB Correct answer: answer = 77137
8 Correct 49 ms 10396 KB Correct answer: answer = 764
9 Correct 5 ms 10188 KB Correct answer: answer = 250000
10 Correct 155 ms 12060 KB Correct answer: answer = 500
11 Correct 4 ms 8140 KB Correct answer: answer = 32
12 Correct 5 ms 10160 KB Correct answer: answer = 130050
13 Correct 19 ms 10344 KB Correct answer: answer = 5110
14 Correct 6 ms 9164 KB Correct answer: answer = 2626
15 Correct 10 ms 9292 KB Correct answer: answer = 796
16 Correct 14 ms 10276 KB Correct answer: answer = 7580
17 Correct 43 ms 10756 KB Correct answer: answer = 1904
18 Correct 5 ms 9676 KB Correct answer: answer = 996004
19 Correct 8 ms 9804 KB Correct answer: answer = 38817
20 Correct 22 ms 9964 KB Correct answer: answer = 4096
21 Correct 4 ms 8140 KB Correct answer: answer = 1
22 Correct 4 ms 8140 KB Correct answer: answer = 1
23 Correct 42 ms 10584 KB Correct answer: answer = 2040
24 Correct 4 ms 8140 KB Correct answer: answer = 2
# Verdict Execution time Memory Grader output
1 Correct 4 ms 8012 KB Correct answer: answer = 4
2 Correct 4 ms 8012 KB Correct answer: answer = 4
3 Correct 4 ms 8140 KB Correct answer: answer = 4
4 Correct 4 ms 8140 KB Correct answer: answer = 12
5 Correct 4 ms 8140 KB Correct answer: answer = 52
6 Correct 4 ms 8140 KB Correct answer: answer = 210
7 Correct 4 ms 8112 KB Correct answer: answer = 88
8 Correct 4 ms 8140 KB Correct answer: answer = 7696
9 Correct 4 ms 8108 KB Correct answer: answer = 1
10 Correct 4 ms 8140 KB Correct answer: answer = 2374
11 Correct 4 ms 8144 KB Correct answer: answer = 9502
12 Correct 4 ms 8108 KB Correct answer: answer = 49
13 Correct 4 ms 8268 KB Correct answer: answer = 151
14 Correct 4 ms 8268 KB Correct answer: answer = 7550
15 Correct 4 ms 8140 KB Correct answer: answer = 7220
16 Correct 4 ms 8268 KB Correct answer: answer = 7550
17 Correct 4 ms 8144 KB Correct answer: answer = 10000
18 Correct 4 ms 8012 KB Correct answer: answer = 10000
19 Correct 4 ms 8140 KB Correct answer: answer = 624
20 Correct 4 ms 8012 KB Correct answer: answer = 10000
21 Correct 4 ms 8012 KB Correct answer: answer = 1
22 Correct 4 ms 8136 KB Correct answer: answer = 4
23 Correct 4 ms 8012 KB Correct answer: answer = 1
24 Correct 4 ms 8112 KB Correct answer: answer = 5
25 Correct 5 ms 8140 KB Correct answer: answer = 41
26 Correct 4 ms 8140 KB Correct answer: answer = 71923
27 Correct 5 ms 8780 KB Correct answer: answer = 77137
28 Correct 49 ms 10396 KB Correct answer: answer = 764
29 Correct 5 ms 10188 KB Correct answer: answer = 250000
30 Correct 155 ms 12060 KB Correct answer: answer = 500
31 Correct 4 ms 8140 KB Correct answer: answer = 32
32 Correct 5 ms 10160 KB Correct answer: answer = 130050
33 Correct 19 ms 10344 KB Correct answer: answer = 5110
34 Correct 6 ms 9164 KB Correct answer: answer = 2626
35 Correct 10 ms 9292 KB Correct answer: answer = 796
36 Correct 14 ms 10276 KB Correct answer: answer = 7580
37 Correct 43 ms 10756 KB Correct answer: answer = 1904
38 Correct 5 ms 9676 KB Correct answer: answer = 996004
39 Correct 8 ms 9804 KB Correct answer: answer = 38817
40 Correct 22 ms 9964 KB Correct answer: answer = 4096
41 Correct 4 ms 8140 KB Correct answer: answer = 1
42 Correct 4 ms 8140 KB Correct answer: answer = 1
43 Correct 42 ms 10584 KB Correct answer: answer = 2040
44 Correct 4 ms 8140 KB Correct answer: answer = 2
45 Correct 4 ms 8140 KB Correct answer: answer = 4
46 Correct 4 ms 8140 KB Correct answer: answer = 9
47 Correct 4 ms 8116 KB Correct answer: answer = 9
48 Correct 4 ms 8140 KB Correct answer: answer = 21
49 Correct 4 ms 8140 KB Correct answer: answer = 71
50 Correct 4 ms 8140 KB Correct answer: answer = 77
51 Correct 4 ms 8012 KB Correct answer: answer = 400
52 Correct 4 ms 8140 KB Correct answer: answer = 996004
53 Correct 5 ms 8140 KB Correct answer: answer = 997310
54 Correct 4 ms 8140 KB Correct answer: answer = 990781
55 Correct 4 ms 8140 KB Correct answer: answer = 996545
56 Correct 4 ms 8140 KB Correct answer: answer = 484
57 Correct 4 ms 8140 KB Correct answer: answer = 484
58 Correct 6 ms 10172 KB Correct answer: answer = 63501
59 Correct 11 ms 10192 KB Correct answer: answer = 323501
60 Correct 40 ms 10536 KB Correct answer: answer = 752500
61 Correct 6 ms 9164 KB Correct answer: answer = 761480
62 Correct 20 ms 9440 KB Correct answer: answer = 758932
63 Correct 4 ms 8140 KB Correct answer: answer = 1000000
64 Correct 174 ms 12180 KB Correct answer: answer = 750500
65 Correct 4 ms 8140 KB Correct answer: answer = 1000000
66 Correct 4 ms 8140 KB Correct answer: answer = 250000
67 Correct 4 ms 8140 KB Correct answer: answer = 250000
68 Correct 4 ms 8140 KB Correct answer: answer = 1000000
69 Correct 4 ms 8140 KB Correct answer: answer = 994009
70 Correct 5 ms 8908 KB Correct answer: answer = 59315
71 Correct 8 ms 8912 KB Correct answer: answer = 25454
72 Correct 21 ms 9660 KB Correct answer: answer = 1504
73 Correct 4 ms 8524 KB Correct answer: answer = 37486
74 Correct 12 ms 9292 KB Correct answer: answer = 4284
75 Correct 5 ms 8396 KB Correct answer: answer = 158008
76 Correct 5 ms 8524 KB Correct answer: answer = 51860
77 Correct 4 ms 8396 KB Correct answer: answer = 12985
# Verdict Execution time Memory Grader output
1 Correct 4 ms 8012 KB Correct answer: answer = 4
2 Correct 4 ms 8012 KB Correct answer: answer = 4
3 Correct 4 ms 8140 KB Correct answer: answer = 4
4 Correct 4 ms 8140 KB Correct answer: answer = 12
5 Correct 4 ms 8140 KB Correct answer: answer = 52
6 Correct 4 ms 8140 KB Correct answer: answer = 210
7 Correct 4 ms 8112 KB Correct answer: answer = 88
8 Correct 4 ms 8140 KB Correct answer: answer = 7696
9 Correct 4 ms 8108 KB Correct answer: answer = 1
10 Correct 4 ms 8140 KB Correct answer: answer = 2374
11 Correct 4 ms 8144 KB Correct answer: answer = 9502
12 Correct 4 ms 8108 KB Correct answer: answer = 49
13 Correct 4 ms 8268 KB Correct answer: answer = 151
14 Correct 4 ms 8268 KB Correct answer: answer = 7550
15 Correct 4 ms 8140 KB Correct answer: answer = 7220
16 Correct 4 ms 8268 KB Correct answer: answer = 7550
17 Correct 4 ms 8144 KB Correct answer: answer = 10000
18 Correct 4 ms 8012 KB Correct answer: answer = 10000
19 Correct 4 ms 8140 KB Correct answer: answer = 624
20 Correct 4 ms 8012 KB Correct answer: answer = 10000
21 Correct 4 ms 8012 KB Correct answer: answer = 1
22 Correct 4 ms 8136 KB Correct answer: answer = 4
23 Correct 4 ms 8012 KB Correct answer: answer = 1
24 Correct 4 ms 8112 KB Correct answer: answer = 5
25 Correct 5 ms 8140 KB Correct answer: answer = 41
26 Correct 4 ms 8140 KB Correct answer: answer = 71923
27 Correct 5 ms 8780 KB Correct answer: answer = 77137
28 Correct 49 ms 10396 KB Correct answer: answer = 764
29 Correct 5 ms 10188 KB Correct answer: answer = 250000
30 Correct 155 ms 12060 KB Correct answer: answer = 500
31 Correct 4 ms 8140 KB Correct answer: answer = 32
32 Correct 5 ms 10160 KB Correct answer: answer = 130050
33 Correct 19 ms 10344 KB Correct answer: answer = 5110
34 Correct 6 ms 9164 KB Correct answer: answer = 2626
35 Correct 10 ms 9292 KB Correct answer: answer = 796
36 Correct 14 ms 10276 KB Correct answer: answer = 7580
37 Correct 43 ms 10756 KB Correct answer: answer = 1904
38 Correct 5 ms 9676 KB Correct answer: answer = 996004
39 Correct 8 ms 9804 KB Correct answer: answer = 38817
40 Correct 22 ms 9964 KB Correct answer: answer = 4096
41 Correct 4 ms 8140 KB Correct answer: answer = 1
42 Correct 4 ms 8140 KB Correct answer: answer = 1
43 Correct 42 ms 10584 KB Correct answer: answer = 2040
44 Correct 4 ms 8140 KB Correct answer: answer = 2
45 Correct 4 ms 8140 KB Correct answer: answer = 4
46 Correct 4 ms 8140 KB Correct answer: answer = 9
47 Correct 4 ms 8116 KB Correct answer: answer = 9
48 Correct 4 ms 8140 KB Correct answer: answer = 21
49 Correct 4 ms 8140 KB Correct answer: answer = 71
50 Correct 4 ms 8140 KB Correct answer: answer = 77
51 Correct 4 ms 8012 KB Correct answer: answer = 400
52 Correct 4 ms 8140 KB Correct answer: answer = 996004
53 Correct 5 ms 8140 KB Correct answer: answer = 997310
54 Correct 4 ms 8140 KB Correct answer: answer = 990781
55 Correct 4 ms 8140 KB Correct answer: answer = 996545
56 Correct 4 ms 8140 KB Correct answer: answer = 484
57 Correct 4 ms 8140 KB Correct answer: answer = 484
58 Correct 6 ms 10172 KB Correct answer: answer = 63501
59 Correct 11 ms 10192 KB Correct answer: answer = 323501
60 Correct 40 ms 10536 KB Correct answer: answer = 752500
61 Correct 6 ms 9164 KB Correct answer: answer = 761480
62 Correct 20 ms 9440 KB Correct answer: answer = 758932
63 Correct 4 ms 8140 KB Correct answer: answer = 1000000
64 Correct 174 ms 12180 KB Correct answer: answer = 750500
65 Correct 4 ms 8140 KB Correct answer: answer = 1000000
66 Correct 4 ms 8140 KB Correct answer: answer = 250000
67 Correct 4 ms 8140 KB Correct answer: answer = 250000
68 Correct 4 ms 8140 KB Correct answer: answer = 1000000
69 Correct 4 ms 8140 KB Correct answer: answer = 994009
70 Correct 5 ms 8908 KB Correct answer: answer = 59315
71 Correct 8 ms 8912 KB Correct answer: answer = 25454
72 Correct 21 ms 9660 KB Correct answer: answer = 1504
73 Correct 4 ms 8524 KB Correct answer: answer = 37486
74 Correct 12 ms 9292 KB Correct answer: answer = 4284
75 Correct 5 ms 8396 KB Correct answer: answer = 158008
76 Correct 5 ms 8524 KB Correct answer: answer = 51860
77 Correct 4 ms 8396 KB Correct answer: answer = 12985
78 Correct 7 ms 8248 KB Correct answer: answer = 997864126212
79 Correct 6 ms 8268 KB Correct answer: answer = 998608411647
80 Correct 9 ms 8636 KB Correct answer: answer = 995265560477
81 Correct 94 ms 24804 KB Correct answer: answer = 10125000
82 Correct 486 ms 24816 KB Correct answer: answer = 2291668
83 Correct 1259 ms 18076 KB Correct answer: answer = 42388
84 Execution timed out 2093 ms 19000 KB Time limit exceeded
85 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 8012 KB Correct answer: answer = 4
2 Correct 4 ms 8012 KB Correct answer: answer = 4
3 Correct 4 ms 8140 KB Correct answer: answer = 4
4 Correct 4 ms 8140 KB Correct answer: answer = 12
5 Correct 4 ms 8140 KB Correct answer: answer = 52
6 Correct 4 ms 8140 KB Correct answer: answer = 210
7 Correct 4 ms 8112 KB Correct answer: answer = 88
8 Correct 4 ms 8140 KB Correct answer: answer = 7696
9 Correct 4 ms 8108 KB Correct answer: answer = 1
10 Correct 4 ms 8140 KB Correct answer: answer = 2374
11 Correct 4 ms 8144 KB Correct answer: answer = 9502
12 Correct 4 ms 8108 KB Correct answer: answer = 49
13 Correct 4 ms 8268 KB Correct answer: answer = 151
14 Correct 4 ms 8268 KB Correct answer: answer = 7550
15 Correct 4 ms 8140 KB Correct answer: answer = 7220
16 Correct 4 ms 8268 KB Correct answer: answer = 7550
17 Correct 4 ms 8144 KB Correct answer: answer = 10000
18 Correct 4 ms 8012 KB Correct answer: answer = 10000
19 Correct 4 ms 8140 KB Correct answer: answer = 624
20 Correct 4 ms 8012 KB Correct answer: answer = 10000
21 Correct 4 ms 8012 KB Correct answer: answer = 1
22 Correct 4 ms 8136 KB Correct answer: answer = 4
23 Correct 4 ms 8012 KB Correct answer: answer = 1
24 Correct 4 ms 8112 KB Correct answer: answer = 5
25 Correct 5 ms 8140 KB Correct answer: answer = 41
26 Correct 4 ms 8140 KB Correct answer: answer = 71923
27 Correct 5 ms 8780 KB Correct answer: answer = 77137
28 Correct 49 ms 10396 KB Correct answer: answer = 764
29 Correct 5 ms 10188 KB Correct answer: answer = 250000
30 Correct 155 ms 12060 KB Correct answer: answer = 500
31 Correct 4 ms 8140 KB Correct answer: answer = 32
32 Correct 5 ms 10160 KB Correct answer: answer = 130050
33 Correct 19 ms 10344 KB Correct answer: answer = 5110
34 Correct 6 ms 9164 KB Correct answer: answer = 2626
35 Correct 10 ms 9292 KB Correct answer: answer = 796
36 Correct 14 ms 10276 KB Correct answer: answer = 7580
37 Correct 43 ms 10756 KB Correct answer: answer = 1904
38 Correct 5 ms 9676 KB Correct answer: answer = 996004
39 Correct 8 ms 9804 KB Correct answer: answer = 38817
40 Correct 22 ms 9964 KB Correct answer: answer = 4096
41 Correct 4 ms 8140 KB Correct answer: answer = 1
42 Correct 4 ms 8140 KB Correct answer: answer = 1
43 Correct 42 ms 10584 KB Correct answer: answer = 2040
44 Correct 4 ms 8140 KB Correct answer: answer = 2
45 Correct 4 ms 8140 KB Correct answer: answer = 4
46 Correct 4 ms 8140 KB Correct answer: answer = 9
47 Correct 4 ms 8116 KB Correct answer: answer = 9
48 Correct 4 ms 8140 KB Correct answer: answer = 21
49 Correct 4 ms 8140 KB Correct answer: answer = 71
50 Correct 4 ms 8140 KB Correct answer: answer = 77
51 Correct 4 ms 8012 KB Correct answer: answer = 400
52 Correct 4 ms 8140 KB Correct answer: answer = 996004
53 Correct 5 ms 8140 KB Correct answer: answer = 997310
54 Correct 4 ms 8140 KB Correct answer: answer = 990781
55 Correct 4 ms 8140 KB Correct answer: answer = 996545
56 Correct 4 ms 8140 KB Correct answer: answer = 484
57 Correct 4 ms 8140 KB Correct answer: answer = 484
58 Correct 6 ms 10172 KB Correct answer: answer = 63501
59 Correct 11 ms 10192 KB Correct answer: answer = 323501
60 Correct 40 ms 10536 KB Correct answer: answer = 752500
61 Correct 6 ms 9164 KB Correct answer: answer = 761480
62 Correct 20 ms 9440 KB Correct answer: answer = 758932
63 Correct 4 ms 8140 KB Correct answer: answer = 1000000
64 Correct 174 ms 12180 KB Correct answer: answer = 750500
65 Correct 4 ms 8140 KB Correct answer: answer = 1000000
66 Correct 4 ms 8140 KB Correct answer: answer = 250000
67 Correct 4 ms 8140 KB Correct answer: answer = 250000
68 Correct 4 ms 8140 KB Correct answer: answer = 1000000
69 Correct 4 ms 8140 KB Correct answer: answer = 994009
70 Correct 5 ms 8908 KB Correct answer: answer = 59315
71 Correct 8 ms 8912 KB Correct answer: answer = 25454
72 Correct 21 ms 9660 KB Correct answer: answer = 1504
73 Correct 4 ms 8524 KB Correct answer: answer = 37486
74 Correct 12 ms 9292 KB Correct answer: answer = 4284
75 Correct 5 ms 8396 KB Correct answer: answer = 158008
76 Correct 5 ms 8524 KB Correct answer: answer = 51860
77 Correct 4 ms 8396 KB Correct answer: answer = 12985
78 Correct 7 ms 8248 KB Correct answer: answer = 997864126212
79 Correct 6 ms 8268 KB Correct answer: answer = 998608411647
80 Correct 9 ms 8636 KB Correct answer: answer = 995265560477
81 Correct 94 ms 24804 KB Correct answer: answer = 10125000
82 Correct 486 ms 24816 KB Correct answer: answer = 2291668
83 Correct 1259 ms 18076 KB Correct answer: answer = 42388
84 Execution timed out 2093 ms 19000 KB Time limit exceeded
85 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 8012 KB Correct answer: answer = 4
2 Correct 4 ms 8012 KB Correct answer: answer = 4
3 Correct 4 ms 8140 KB Correct answer: answer = 4
4 Correct 4 ms 8140 KB Correct answer: answer = 12
5 Correct 4 ms 8140 KB Correct answer: answer = 52
6 Correct 4 ms 8140 KB Correct answer: answer = 210
7 Correct 4 ms 8112 KB Correct answer: answer = 88
8 Correct 4 ms 8140 KB Correct answer: answer = 7696
9 Correct 4 ms 8108 KB Correct answer: answer = 1
10 Correct 4 ms 8140 KB Correct answer: answer = 2374
11 Correct 4 ms 8144 KB Correct answer: answer = 9502
12 Correct 4 ms 8108 KB Correct answer: answer = 49
13 Correct 4 ms 8268 KB Correct answer: answer = 151
14 Correct 4 ms 8268 KB Correct answer: answer = 7550
15 Correct 4 ms 8140 KB Correct answer: answer = 7220
16 Correct 4 ms 8268 KB Correct answer: answer = 7550
17 Correct 4 ms 8144 KB Correct answer: answer = 10000
18 Correct 4 ms 8012 KB Correct answer: answer = 10000
19 Correct 4 ms 8140 KB Correct answer: answer = 624
20 Correct 4 ms 8012 KB Correct answer: answer = 10000
21 Correct 4 ms 8012 KB Correct answer: answer = 1
22 Correct 4 ms 8136 KB Correct answer: answer = 4
23 Correct 4 ms 8012 KB Correct answer: answer = 1
24 Correct 4 ms 8112 KB Correct answer: answer = 5
25 Correct 5 ms 8140 KB Correct answer: answer = 41
26 Correct 4 ms 8140 KB Correct answer: answer = 71923
27 Correct 5 ms 8780 KB Correct answer: answer = 77137
28 Correct 49 ms 10396 KB Correct answer: answer = 764
29 Correct 5 ms 10188 KB Correct answer: answer = 250000
30 Correct 155 ms 12060 KB Correct answer: answer = 500
31 Correct 4 ms 8140 KB Correct answer: answer = 32
32 Correct 5 ms 10160 KB Correct answer: answer = 130050
33 Correct 19 ms 10344 KB Correct answer: answer = 5110
34 Correct 6 ms 9164 KB Correct answer: answer = 2626
35 Correct 10 ms 9292 KB Correct answer: answer = 796
36 Correct 14 ms 10276 KB Correct answer: answer = 7580
37 Correct 43 ms 10756 KB Correct answer: answer = 1904
38 Correct 5 ms 9676 KB Correct answer: answer = 996004
39 Correct 8 ms 9804 KB Correct answer: answer = 38817
40 Correct 22 ms 9964 KB Correct answer: answer = 4096
41 Correct 4 ms 8140 KB Correct answer: answer = 1
42 Correct 4 ms 8140 KB Correct answer: answer = 1
43 Correct 42 ms 10584 KB Correct answer: answer = 2040
44 Correct 4 ms 8140 KB Correct answer: answer = 2
45 Correct 4 ms 8140 KB Correct answer: answer = 4
46 Correct 4 ms 8140 KB Correct answer: answer = 9
47 Correct 4 ms 8116 KB Correct answer: answer = 9
48 Correct 4 ms 8140 KB Correct answer: answer = 21
49 Correct 4 ms 8140 KB Correct answer: answer = 71
50 Correct 4 ms 8140 KB Correct answer: answer = 77
51 Correct 4 ms 8012 KB Correct answer: answer = 400
52 Correct 4 ms 8140 KB Correct answer: answer = 996004
53 Correct 5 ms 8140 KB Correct answer: answer = 997310
54 Correct 4 ms 8140 KB Correct answer: answer = 990781
55 Correct 4 ms 8140 KB Correct answer: answer = 996545
56 Correct 4 ms 8140 KB Correct answer: answer = 484
57 Correct 4 ms 8140 KB Correct answer: answer = 484
58 Correct 6 ms 10172 KB Correct answer: answer = 63501
59 Correct 11 ms 10192 KB Correct answer: answer = 323501
60 Correct 40 ms 10536 KB Correct answer: answer = 752500
61 Correct 6 ms 9164 KB Correct answer: answer = 761480
62 Correct 20 ms 9440 KB Correct answer: answer = 758932
63 Correct 4 ms 8140 KB Correct answer: answer = 1000000
64 Correct 174 ms 12180 KB Correct answer: answer = 750500
65 Correct 4 ms 8140 KB Correct answer: answer = 1000000
66 Correct 4 ms 8140 KB Correct answer: answer = 250000
67 Correct 4 ms 8140 KB Correct answer: answer = 250000
68 Correct 4 ms 8140 KB Correct answer: answer = 1000000
69 Correct 4 ms 8140 KB Correct answer: answer = 994009
70 Correct 5 ms 8908 KB Correct answer: answer = 59315
71 Correct 8 ms 8912 KB Correct answer: answer = 25454
72 Correct 21 ms 9660 KB Correct answer: answer = 1504
73 Correct 4 ms 8524 KB Correct answer: answer = 37486
74 Correct 12 ms 9292 KB Correct answer: answer = 4284
75 Correct 5 ms 8396 KB Correct answer: answer = 158008
76 Correct 5 ms 8524 KB Correct answer: answer = 51860
77 Correct 4 ms 8396 KB Correct answer: answer = 12985
78 Correct 7 ms 8248 KB Correct answer: answer = 997864126212
79 Correct 6 ms 8268 KB Correct answer: answer = 998608411647
80 Correct 9 ms 8636 KB Correct answer: answer = 995265560477
81 Correct 94 ms 24804 KB Correct answer: answer = 10125000
82 Correct 486 ms 24816 KB Correct answer: answer = 2291668
83 Correct 1259 ms 18076 KB Correct answer: answer = 42388
84 Execution timed out 2093 ms 19000 KB Time limit exceeded
85 Halted 0 ms 0 KB -