답안 #30624

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
30624 2017-07-25T13:03:47 Z samir_droubi Aliens (IOI16_aliens) C++14
25 / 100
489 ms 118364 KB
#include "aliens.h"
#include <bits/stdc++.h>
#define pii pair<int,int>
#define ll long long
using namespace std;
bool cmp(pii x , pii y)
{
	if(x.first == y.first)return x.second > y.second;
	return x.first < y.first;
}
struct CHT{
	vector<ll>m;
	vector<ll>p;
	int it=0;
	bool check()
	{
		if(m.size() < 3)return false;
		int l1 = m.size() - 3;
		int l2 = m.size() - 2;
		int l3 = m.size() - 1;
		return 1LL*(p[l3] - p[l1]) * (m[l1] - m[l2]) < 1LL*(p[l2] - p[l1]) * (m[l1] - m[l3]);
	}
	void add(ll M,ll P)
	{
		m.push_back(M);
		p.push_back(P);
		while(check())
		{
			m.erase(m.end() - 2);
			p.erase(p.end() - 2);
		}
	}
	ll calc(ll x,int i)
	{
		return x * m[i] + p[i];
	}
	ll query(ll x)
	{
		if(it >= m.size() )it = m.size() - 1;
		while(it < m.size() - 1 && calc(x , it) >= calc(x , it + 1 ) ){
			++it;
		}
		return calc(x , it);
	}
}ds[4005];
long long take_photos(int n, int m, int k, std::vector<int> r, std::vector<int> c) {
   	vector<pii>tmp;
   	vector<pii>v;
   	for(int i = 0 ; i < n ; ++i)
   		tmp.push_back( { min( r[i], c[i] ) , max( r[i] , c[i] ) } );
   	sort( tmp.begin() , tmp.end() , cmp );

   	int last = -1;
   	for(int i = 0 ; i < n ; ++i)
   	{
   		if(tmp[i].second <= last)continue;
   		v.push_back( tmp[i] );
   		last = max(last , tmp[i].second);
   	}

   	ll ans = (1LL <<61);

   	for(int i= 0 ; i <= k; ++i)
   		ds[i].add(-2 * (v[0].first - 1) , (v[0].first - 1) * (v[0].first - 1) );

   	n = v.size();
   	for(int i = 0 ; i < n ; ++i)
   	{
   		ll l = v[i].first;
   		ll r = v[i].second;
   		for(int j = k ;  j >= 1 ; --j)
   		{
   			ll dp = ds[j - 1].query(r) +  r * r;
   			if(i == n - 1)ans = min(ans , dp);
   			if(i < n - 1)
   			{
   				ll L = v[i + 1].first;
   				ll mx = max(0LL , r - L + 1);
				ds[j].add( -2 * (L - 1) , (L - 1) * (L - 1) + dp - mx * mx );
   			}
   		}
   	}
   	return ans;
}

Compilation message

aliens.cpp: In member function 'long long int CHT::query(long long int)':
aliens.cpp:39:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if(it >= m.size() )it = m.size() - 1;
         ^
aliens.cpp:40:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   while(it < m.size() - 1 && calc(x , it) >= calc(x , it + 1 ) ){
            ^
aliens.cpp: In function 'long long int take_photos(int, int, int, std::vector<int>, std::vector<int>)':
aliens.cpp:69:9: warning: unused variable 'l' [-Wunused-variable]
      ll l = v[i].first;
         ^
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2240 KB Correct answer: answer = 4
2 Correct 0 ms 2240 KB Correct answer: answer = 4
3 Correct 0 ms 2240 KB Correct answer: answer = 4
4 Correct 0 ms 2240 KB Correct answer: answer = 12
5 Correct 0 ms 2240 KB Correct answer: answer = 52
6 Correct 0 ms 2240 KB Correct answer: answer = 210
7 Correct 0 ms 2240 KB Correct answer: answer = 88
8 Correct 0 ms 2240 KB Correct answer: answer = 7696
9 Correct 0 ms 2240 KB Correct answer: answer = 1
10 Correct 0 ms 2240 KB Correct answer: answer = 2374
11 Correct 0 ms 2240 KB Correct answer: answer = 9502
12 Correct 0 ms 2240 KB Correct answer: answer = 49
13 Correct 0 ms 2372 KB Correct answer: answer = 151
14 Correct 0 ms 2372 KB Correct answer: answer = 7550
15 Correct 0 ms 2240 KB Correct answer: answer = 7220
16 Correct 0 ms 2372 KB Correct answer: answer = 7550
17 Correct 0 ms 2240 KB Correct answer: answer = 10000
18 Correct 0 ms 2240 KB Correct answer: answer = 10000
19 Correct 0 ms 2240 KB Correct answer: answer = 624
20 Correct 0 ms 2240 KB Correct answer: answer = 10000
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2240 KB Correct answer: answer = 1
2 Correct 0 ms 2240 KB Correct answer: answer = 4
3 Correct 0 ms 2240 KB Correct answer: answer = 1
4 Correct 0 ms 2240 KB Correct answer: answer = 5
5 Correct 0 ms 2240 KB Correct answer: answer = 41
6 Correct 0 ms 2240 KB Correct answer: answer = 71923
7 Correct 0 ms 2240 KB Correct answer: answer = 77137
8 Correct 3 ms 3956 KB Correct answer: answer = 764
9 Correct 0 ms 2240 KB Correct answer: answer = 250000
10 Correct 6 ms 6332 KB Correct answer: answer = 500
11 Correct 0 ms 2240 KB Correct answer: answer = 32
12 Correct 0 ms 2240 KB Correct answer: answer = 130050
13 Correct 0 ms 2636 KB Correct answer: answer = 5110
14 Correct 0 ms 2372 KB Correct answer: answer = 2626
15 Correct 0 ms 2636 KB Correct answer: answer = 796
16 Correct 0 ms 2504 KB Correct answer: answer = 7580
17 Correct 0 ms 3296 KB Correct answer: answer = 1904
18 Correct 0 ms 2240 KB Correct answer: answer = 996004
19 Correct 0 ms 2372 KB Correct answer: answer = 38817
20 Correct 0 ms 2768 KB Correct answer: answer = 4096
21 Correct 0 ms 2240 KB Correct answer: answer = 1
22 Correct 0 ms 2240 KB Correct answer: answer = 1
23 Correct 0 ms 3296 KB Correct answer: answer = 2040
24 Correct 0 ms 2240 KB Correct answer: answer = 2
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2240 KB Correct answer: answer = 4
2 Correct 0 ms 2240 KB Correct answer: answer = 4
3 Correct 0 ms 2240 KB Correct answer: answer = 4
4 Correct 0 ms 2240 KB Correct answer: answer = 12
5 Correct 0 ms 2240 KB Correct answer: answer = 52
6 Correct 0 ms 2240 KB Correct answer: answer = 210
7 Correct 0 ms 2240 KB Correct answer: answer = 88
8 Correct 0 ms 2240 KB Correct answer: answer = 7696
9 Correct 0 ms 2240 KB Correct answer: answer = 1
10 Correct 0 ms 2240 KB Correct answer: answer = 2374
11 Correct 0 ms 2240 KB Correct answer: answer = 9502
12 Correct 0 ms 2240 KB Correct answer: answer = 49
13 Correct 0 ms 2372 KB Correct answer: answer = 151
14 Correct 0 ms 2372 KB Correct answer: answer = 7550
15 Correct 0 ms 2240 KB Correct answer: answer = 7220
16 Correct 0 ms 2372 KB Correct answer: answer = 7550
17 Correct 0 ms 2240 KB Correct answer: answer = 10000
18 Correct 0 ms 2240 KB Correct answer: answer = 10000
19 Correct 0 ms 2240 KB Correct answer: answer = 624
20 Correct 0 ms 2240 KB Correct answer: answer = 10000
21 Correct 0 ms 2240 KB Correct answer: answer = 1
22 Correct 0 ms 2240 KB Correct answer: answer = 4
23 Correct 0 ms 2240 KB Correct answer: answer = 1
24 Correct 0 ms 2240 KB Correct answer: answer = 5
25 Correct 0 ms 2240 KB Correct answer: answer = 41
26 Correct 0 ms 2240 KB Correct answer: answer = 71923
27 Correct 0 ms 2240 KB Correct answer: answer = 77137
28 Correct 3 ms 3956 KB Correct answer: answer = 764
29 Correct 0 ms 2240 KB Correct answer: answer = 250000
30 Correct 6 ms 6332 KB Correct answer: answer = 500
31 Correct 0 ms 2240 KB Correct answer: answer = 32
32 Correct 0 ms 2240 KB Correct answer: answer = 130050
33 Correct 0 ms 2636 KB Correct answer: answer = 5110
34 Correct 0 ms 2372 KB Correct answer: answer = 2626
35 Correct 0 ms 2636 KB Correct answer: answer = 796
36 Correct 0 ms 2504 KB Correct answer: answer = 7580
37 Correct 0 ms 3296 KB Correct answer: answer = 1904
38 Correct 0 ms 2240 KB Correct answer: answer = 996004
39 Correct 0 ms 2372 KB Correct answer: answer = 38817
40 Correct 0 ms 2768 KB Correct answer: answer = 4096
41 Correct 0 ms 2240 KB Correct answer: answer = 1
42 Correct 0 ms 2240 KB Correct answer: answer = 1
43 Correct 0 ms 3296 KB Correct answer: answer = 2040
44 Correct 0 ms 2240 KB Correct answer: answer = 2
45 Correct 0 ms 2240 KB Correct answer: answer = 4
46 Correct 0 ms 2240 KB Correct answer: answer = 9
47 Correct 0 ms 2240 KB Correct answer: answer = 9
48 Correct 0 ms 2240 KB Correct answer: answer = 21
49 Correct 0 ms 2240 KB Correct answer: answer = 71
50 Correct 0 ms 2240 KB Correct answer: answer = 77
51 Correct 0 ms 2240 KB Correct answer: answer = 400
52 Correct 0 ms 2240 KB Correct answer: answer = 996004
53 Correct 0 ms 2240 KB Correct answer: answer = 997310
54 Correct 0 ms 2240 KB Correct answer: answer = 990781
55 Correct 0 ms 2372 KB Correct answer: answer = 996545
56 Correct 0 ms 2240 KB Correct answer: answer = 484
57 Correct 0 ms 2240 KB Correct answer: answer = 484
58 Correct 0 ms 2372 KB Correct answer: answer = 63501
59 Correct 0 ms 2504 KB Correct answer: answer = 323501
60 Correct 0 ms 3032 KB Correct answer: answer = 752500
61 Correct 0 ms 2372 KB Correct answer: answer = 761480
62 Correct 0 ms 3032 KB Correct answer: answer = 758932
63 Correct 0 ms 2240 KB Correct answer: answer = 1000000
64 Correct 3 ms 6332 KB Correct answer: answer = 750500
65 Correct 0 ms 2240 KB Correct answer: answer = 1000000
66 Correct 0 ms 2240 KB Correct answer: answer = 250000
67 Correct 0 ms 2240 KB Correct answer: answer = 250000
68 Correct 0 ms 2240 KB Correct answer: answer = 1000000
69 Correct 0 ms 2240 KB Correct answer: answer = 994009
70 Correct 0 ms 2240 KB Correct answer: answer = 59315
71 Correct 0 ms 2504 KB Correct answer: answer = 25454
72 Correct 0 ms 3032 KB Correct answer: answer = 1504
73 Correct 0 ms 2372 KB Correct answer: answer = 37486
74 Correct 0 ms 2768 KB Correct answer: answer = 4284
75 Correct 0 ms 2636 KB Correct answer: answer = 158008
76 Correct 0 ms 2636 KB Correct answer: answer = 51860
77 Correct 0 ms 2372 KB Correct answer: answer = 12985
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2240 KB Correct answer: answer = 4
2 Correct 0 ms 2240 KB Correct answer: answer = 4
3 Correct 0 ms 2240 KB Correct answer: answer = 4
4 Correct 0 ms 2240 KB Correct answer: answer = 12
5 Correct 0 ms 2240 KB Correct answer: answer = 52
6 Correct 0 ms 2240 KB Correct answer: answer = 210
7 Correct 0 ms 2240 KB Correct answer: answer = 88
8 Correct 0 ms 2240 KB Correct answer: answer = 7696
9 Correct 0 ms 2240 KB Correct answer: answer = 1
10 Correct 0 ms 2240 KB Correct answer: answer = 2374
11 Correct 0 ms 2240 KB Correct answer: answer = 9502
12 Correct 0 ms 2240 KB Correct answer: answer = 49
13 Correct 0 ms 2372 KB Correct answer: answer = 151
14 Correct 0 ms 2372 KB Correct answer: answer = 7550
15 Correct 0 ms 2240 KB Correct answer: answer = 7220
16 Correct 0 ms 2372 KB Correct answer: answer = 7550
17 Correct 0 ms 2240 KB Correct answer: answer = 10000
18 Correct 0 ms 2240 KB Correct answer: answer = 10000
19 Correct 0 ms 2240 KB Correct answer: answer = 624
20 Correct 0 ms 2240 KB Correct answer: answer = 10000
21 Correct 0 ms 2240 KB Correct answer: answer = 1
22 Correct 0 ms 2240 KB Correct answer: answer = 4
23 Correct 0 ms 2240 KB Correct answer: answer = 1
24 Correct 0 ms 2240 KB Correct answer: answer = 5
25 Correct 0 ms 2240 KB Correct answer: answer = 41
26 Correct 0 ms 2240 KB Correct answer: answer = 71923
27 Correct 0 ms 2240 KB Correct answer: answer = 77137
28 Correct 3 ms 3956 KB Correct answer: answer = 764
29 Correct 0 ms 2240 KB Correct answer: answer = 250000
30 Correct 6 ms 6332 KB Correct answer: answer = 500
31 Correct 0 ms 2240 KB Correct answer: answer = 32
32 Correct 0 ms 2240 KB Correct answer: answer = 130050
33 Correct 0 ms 2636 KB Correct answer: answer = 5110
34 Correct 0 ms 2372 KB Correct answer: answer = 2626
35 Correct 0 ms 2636 KB Correct answer: answer = 796
36 Correct 0 ms 2504 KB Correct answer: answer = 7580
37 Correct 0 ms 3296 KB Correct answer: answer = 1904
38 Correct 0 ms 2240 KB Correct answer: answer = 996004
39 Correct 0 ms 2372 KB Correct answer: answer = 38817
40 Correct 0 ms 2768 KB Correct answer: answer = 4096
41 Correct 0 ms 2240 KB Correct answer: answer = 1
42 Correct 0 ms 2240 KB Correct answer: answer = 1
43 Correct 0 ms 3296 KB Correct answer: answer = 2040
44 Correct 0 ms 2240 KB Correct answer: answer = 2
45 Correct 0 ms 2240 KB Correct answer: answer = 4
46 Correct 0 ms 2240 KB Correct answer: answer = 9
47 Correct 0 ms 2240 KB Correct answer: answer = 9
48 Correct 0 ms 2240 KB Correct answer: answer = 21
49 Correct 0 ms 2240 KB Correct answer: answer = 71
50 Correct 0 ms 2240 KB Correct answer: answer = 77
51 Correct 0 ms 2240 KB Correct answer: answer = 400
52 Correct 0 ms 2240 KB Correct answer: answer = 996004
53 Correct 0 ms 2240 KB Correct answer: answer = 997310
54 Correct 0 ms 2240 KB Correct answer: answer = 990781
55 Correct 0 ms 2372 KB Correct answer: answer = 996545
56 Correct 0 ms 2240 KB Correct answer: answer = 484
57 Correct 0 ms 2240 KB Correct answer: answer = 484
58 Correct 0 ms 2372 KB Correct answer: answer = 63501
59 Correct 0 ms 2504 KB Correct answer: answer = 323501
60 Correct 0 ms 3032 KB Correct answer: answer = 752500
61 Correct 0 ms 2372 KB Correct answer: answer = 761480
62 Correct 0 ms 3032 KB Correct answer: answer = 758932
63 Correct 0 ms 2240 KB Correct answer: answer = 1000000
64 Correct 3 ms 6332 KB Correct answer: answer = 750500
65 Correct 0 ms 2240 KB Correct answer: answer = 1000000
66 Correct 0 ms 2240 KB Correct answer: answer = 250000
67 Correct 0 ms 2240 KB Correct answer: answer = 250000
68 Correct 0 ms 2240 KB Correct answer: answer = 1000000
69 Correct 0 ms 2240 KB Correct answer: answer = 994009
70 Correct 0 ms 2240 KB Correct answer: answer = 59315
71 Correct 0 ms 2504 KB Correct answer: answer = 25454
72 Correct 0 ms 3032 KB Correct answer: answer = 1504
73 Correct 0 ms 2372 KB Correct answer: answer = 37486
74 Correct 0 ms 2768 KB Correct answer: answer = 4284
75 Correct 0 ms 2636 KB Correct answer: answer = 158008
76 Correct 0 ms 2636 KB Correct answer: answer = 51860
77 Correct 0 ms 2372 KB Correct answer: answer = 12985
78 Correct 3 ms 2380 KB Correct answer: answer = 997864126212
79 Correct 0 ms 2380 KB Correct answer: answer = 998608411647
80 Correct 3 ms 3172 KB Correct answer: answer = 995265560477
81 Correct 0 ms 2524 KB Correct answer: answer = 10125000
82 Correct 3 ms 2952 KB Correct answer: answer = 2291668
83 Correct 9 ms 5564 KB Correct answer: answer = 42388
84 Correct 29 ms 15408 KB Correct answer: answer = 10318
85 Correct 183 ms 46052 KB Correct answer: answer = 3416
86 Correct 0 ms 2380 KB Correct answer: answer = 331708193881
87 Correct 46 ms 7716 KB Correct answer: answer = 2861193756
88 Correct 399 ms 70768 KB Correct answer: answer = 114646930
89 Correct 13 ms 6060 KB Correct answer: answer = 9280921
90 Correct 56 ms 21796 KB Correct answer: answer = 999984053400
91 Correct 319 ms 46052 KB Correct answer: answer = 750935949134
92 Correct 3 ms 2380 KB Correct answer: answer = 1000000000000
93 Correct 3 ms 2644 KB Correct answer: answer = 998762383161
94 Correct 9 ms 2644 KB Correct answer: answer = 23017412908
95 Correct 6 ms 4360 KB Correct answer: answer = 728143410622
96 Correct 0 ms 2380 KB Correct answer: answer = 2
97 Correct 3 ms 3116 KB Correct answer: answer = 1824916
98 Correct 106 ms 31020 KB Correct answer: answer = 10680029
99 Correct 56 ms 16660 KB Correct answer: answer = 18351700
100 Correct 0 ms 2524 KB Correct answer: answer = 16040026
101 Correct 0 ms 2380 KB Correct answer: answer = 253968628325
102 Correct 159 ms 33980 KB Correct answer: answer = 10267
103 Correct 489 ms 118364 KB Correct answer: answer = 2582408
104 Incorrect 0 ms 2380 KB Wrong answer: output = -244097582419, expected = 78024964781
105 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2240 KB Correct answer: answer = 4
2 Correct 0 ms 2240 KB Correct answer: answer = 4
3 Correct 0 ms 2240 KB Correct answer: answer = 4
4 Correct 0 ms 2240 KB Correct answer: answer = 12
5 Correct 0 ms 2240 KB Correct answer: answer = 52
6 Correct 0 ms 2240 KB Correct answer: answer = 210
7 Correct 0 ms 2240 KB Correct answer: answer = 88
8 Correct 0 ms 2240 KB Correct answer: answer = 7696
9 Correct 0 ms 2240 KB Correct answer: answer = 1
10 Correct 0 ms 2240 KB Correct answer: answer = 2374
11 Correct 0 ms 2240 KB Correct answer: answer = 9502
12 Correct 0 ms 2240 KB Correct answer: answer = 49
13 Correct 0 ms 2372 KB Correct answer: answer = 151
14 Correct 0 ms 2372 KB Correct answer: answer = 7550
15 Correct 0 ms 2240 KB Correct answer: answer = 7220
16 Correct 0 ms 2372 KB Correct answer: answer = 7550
17 Correct 0 ms 2240 KB Correct answer: answer = 10000
18 Correct 0 ms 2240 KB Correct answer: answer = 10000
19 Correct 0 ms 2240 KB Correct answer: answer = 624
20 Correct 0 ms 2240 KB Correct answer: answer = 10000
21 Correct 0 ms 2240 KB Correct answer: answer = 1
22 Correct 0 ms 2240 KB Correct answer: answer = 4
23 Correct 0 ms 2240 KB Correct answer: answer = 1
24 Correct 0 ms 2240 KB Correct answer: answer = 5
25 Correct 0 ms 2240 KB Correct answer: answer = 41
26 Correct 0 ms 2240 KB Correct answer: answer = 71923
27 Correct 0 ms 2240 KB Correct answer: answer = 77137
28 Correct 3 ms 3956 KB Correct answer: answer = 764
29 Correct 0 ms 2240 KB Correct answer: answer = 250000
30 Correct 6 ms 6332 KB Correct answer: answer = 500
31 Correct 0 ms 2240 KB Correct answer: answer = 32
32 Correct 0 ms 2240 KB Correct answer: answer = 130050
33 Correct 0 ms 2636 KB Correct answer: answer = 5110
34 Correct 0 ms 2372 KB Correct answer: answer = 2626
35 Correct 0 ms 2636 KB Correct answer: answer = 796
36 Correct 0 ms 2504 KB Correct answer: answer = 7580
37 Correct 0 ms 3296 KB Correct answer: answer = 1904
38 Correct 0 ms 2240 KB Correct answer: answer = 996004
39 Correct 0 ms 2372 KB Correct answer: answer = 38817
40 Correct 0 ms 2768 KB Correct answer: answer = 4096
41 Correct 0 ms 2240 KB Correct answer: answer = 1
42 Correct 0 ms 2240 KB Correct answer: answer = 1
43 Correct 0 ms 3296 KB Correct answer: answer = 2040
44 Correct 0 ms 2240 KB Correct answer: answer = 2
45 Correct 0 ms 2240 KB Correct answer: answer = 4
46 Correct 0 ms 2240 KB Correct answer: answer = 9
47 Correct 0 ms 2240 KB Correct answer: answer = 9
48 Correct 0 ms 2240 KB Correct answer: answer = 21
49 Correct 0 ms 2240 KB Correct answer: answer = 71
50 Correct 0 ms 2240 KB Correct answer: answer = 77
51 Correct 0 ms 2240 KB Correct answer: answer = 400
52 Correct 0 ms 2240 KB Correct answer: answer = 996004
53 Correct 0 ms 2240 KB Correct answer: answer = 997310
54 Correct 0 ms 2240 KB Correct answer: answer = 990781
55 Correct 0 ms 2372 KB Correct answer: answer = 996545
56 Correct 0 ms 2240 KB Correct answer: answer = 484
57 Correct 0 ms 2240 KB Correct answer: answer = 484
58 Correct 0 ms 2372 KB Correct answer: answer = 63501
59 Correct 0 ms 2504 KB Correct answer: answer = 323501
60 Correct 0 ms 3032 KB Correct answer: answer = 752500
61 Correct 0 ms 2372 KB Correct answer: answer = 761480
62 Correct 0 ms 3032 KB Correct answer: answer = 758932
63 Correct 0 ms 2240 KB Correct answer: answer = 1000000
64 Correct 3 ms 6332 KB Correct answer: answer = 750500
65 Correct 0 ms 2240 KB Correct answer: answer = 1000000
66 Correct 0 ms 2240 KB Correct answer: answer = 250000
67 Correct 0 ms 2240 KB Correct answer: answer = 250000
68 Correct 0 ms 2240 KB Correct answer: answer = 1000000
69 Correct 0 ms 2240 KB Correct answer: answer = 994009
70 Correct 0 ms 2240 KB Correct answer: answer = 59315
71 Correct 0 ms 2504 KB Correct answer: answer = 25454
72 Correct 0 ms 3032 KB Correct answer: answer = 1504
73 Correct 0 ms 2372 KB Correct answer: answer = 37486
74 Correct 0 ms 2768 KB Correct answer: answer = 4284
75 Correct 0 ms 2636 KB Correct answer: answer = 158008
76 Correct 0 ms 2636 KB Correct answer: answer = 51860
77 Correct 0 ms 2372 KB Correct answer: answer = 12985
78 Correct 3 ms 2380 KB Correct answer: answer = 997864126212
79 Correct 0 ms 2380 KB Correct answer: answer = 998608411647
80 Correct 3 ms 3172 KB Correct answer: answer = 995265560477
81 Correct 0 ms 2524 KB Correct answer: answer = 10125000
82 Correct 3 ms 2952 KB Correct answer: answer = 2291668
83 Correct 9 ms 5564 KB Correct answer: answer = 42388
84 Correct 29 ms 15408 KB Correct answer: answer = 10318
85 Correct 183 ms 46052 KB Correct answer: answer = 3416
86 Correct 0 ms 2380 KB Correct answer: answer = 331708193881
87 Correct 46 ms 7716 KB Correct answer: answer = 2861193756
88 Correct 399 ms 70768 KB Correct answer: answer = 114646930
89 Correct 13 ms 6060 KB Correct answer: answer = 9280921
90 Correct 56 ms 21796 KB Correct answer: answer = 999984053400
91 Correct 319 ms 46052 KB Correct answer: answer = 750935949134
92 Correct 3 ms 2380 KB Correct answer: answer = 1000000000000
93 Correct 3 ms 2644 KB Correct answer: answer = 998762383161
94 Correct 9 ms 2644 KB Correct answer: answer = 23017412908
95 Correct 6 ms 4360 KB Correct answer: answer = 728143410622
96 Correct 0 ms 2380 KB Correct answer: answer = 2
97 Correct 3 ms 3116 KB Correct answer: answer = 1824916
98 Correct 106 ms 31020 KB Correct answer: answer = 10680029
99 Correct 56 ms 16660 KB Correct answer: answer = 18351700
100 Correct 0 ms 2524 KB Correct answer: answer = 16040026
101 Correct 0 ms 2380 KB Correct answer: answer = 253968628325
102 Correct 159 ms 33980 KB Correct answer: answer = 10267
103 Correct 489 ms 118364 KB Correct answer: answer = 2582408
104 Incorrect 0 ms 2380 KB Wrong answer: output = -244097582419, expected = 78024964781
105 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2240 KB Correct answer: answer = 4
2 Correct 0 ms 2240 KB Correct answer: answer = 4
3 Correct 0 ms 2240 KB Correct answer: answer = 4
4 Correct 0 ms 2240 KB Correct answer: answer = 12
5 Correct 0 ms 2240 KB Correct answer: answer = 52
6 Correct 0 ms 2240 KB Correct answer: answer = 210
7 Correct 0 ms 2240 KB Correct answer: answer = 88
8 Correct 0 ms 2240 KB Correct answer: answer = 7696
9 Correct 0 ms 2240 KB Correct answer: answer = 1
10 Correct 0 ms 2240 KB Correct answer: answer = 2374
11 Correct 0 ms 2240 KB Correct answer: answer = 9502
12 Correct 0 ms 2240 KB Correct answer: answer = 49
13 Correct 0 ms 2372 KB Correct answer: answer = 151
14 Correct 0 ms 2372 KB Correct answer: answer = 7550
15 Correct 0 ms 2240 KB Correct answer: answer = 7220
16 Correct 0 ms 2372 KB Correct answer: answer = 7550
17 Correct 0 ms 2240 KB Correct answer: answer = 10000
18 Correct 0 ms 2240 KB Correct answer: answer = 10000
19 Correct 0 ms 2240 KB Correct answer: answer = 624
20 Correct 0 ms 2240 KB Correct answer: answer = 10000
21 Correct 0 ms 2240 KB Correct answer: answer = 1
22 Correct 0 ms 2240 KB Correct answer: answer = 4
23 Correct 0 ms 2240 KB Correct answer: answer = 1
24 Correct 0 ms 2240 KB Correct answer: answer = 5
25 Correct 0 ms 2240 KB Correct answer: answer = 41
26 Correct 0 ms 2240 KB Correct answer: answer = 71923
27 Correct 0 ms 2240 KB Correct answer: answer = 77137
28 Correct 3 ms 3956 KB Correct answer: answer = 764
29 Correct 0 ms 2240 KB Correct answer: answer = 250000
30 Correct 6 ms 6332 KB Correct answer: answer = 500
31 Correct 0 ms 2240 KB Correct answer: answer = 32
32 Correct 0 ms 2240 KB Correct answer: answer = 130050
33 Correct 0 ms 2636 KB Correct answer: answer = 5110
34 Correct 0 ms 2372 KB Correct answer: answer = 2626
35 Correct 0 ms 2636 KB Correct answer: answer = 796
36 Correct 0 ms 2504 KB Correct answer: answer = 7580
37 Correct 0 ms 3296 KB Correct answer: answer = 1904
38 Correct 0 ms 2240 KB Correct answer: answer = 996004
39 Correct 0 ms 2372 KB Correct answer: answer = 38817
40 Correct 0 ms 2768 KB Correct answer: answer = 4096
41 Correct 0 ms 2240 KB Correct answer: answer = 1
42 Correct 0 ms 2240 KB Correct answer: answer = 1
43 Correct 0 ms 3296 KB Correct answer: answer = 2040
44 Correct 0 ms 2240 KB Correct answer: answer = 2
45 Correct 0 ms 2240 KB Correct answer: answer = 4
46 Correct 0 ms 2240 KB Correct answer: answer = 9
47 Correct 0 ms 2240 KB Correct answer: answer = 9
48 Correct 0 ms 2240 KB Correct answer: answer = 21
49 Correct 0 ms 2240 KB Correct answer: answer = 71
50 Correct 0 ms 2240 KB Correct answer: answer = 77
51 Correct 0 ms 2240 KB Correct answer: answer = 400
52 Correct 0 ms 2240 KB Correct answer: answer = 996004
53 Correct 0 ms 2240 KB Correct answer: answer = 997310
54 Correct 0 ms 2240 KB Correct answer: answer = 990781
55 Correct 0 ms 2372 KB Correct answer: answer = 996545
56 Correct 0 ms 2240 KB Correct answer: answer = 484
57 Correct 0 ms 2240 KB Correct answer: answer = 484
58 Correct 0 ms 2372 KB Correct answer: answer = 63501
59 Correct 0 ms 2504 KB Correct answer: answer = 323501
60 Correct 0 ms 3032 KB Correct answer: answer = 752500
61 Correct 0 ms 2372 KB Correct answer: answer = 761480
62 Correct 0 ms 3032 KB Correct answer: answer = 758932
63 Correct 0 ms 2240 KB Correct answer: answer = 1000000
64 Correct 3 ms 6332 KB Correct answer: answer = 750500
65 Correct 0 ms 2240 KB Correct answer: answer = 1000000
66 Correct 0 ms 2240 KB Correct answer: answer = 250000
67 Correct 0 ms 2240 KB Correct answer: answer = 250000
68 Correct 0 ms 2240 KB Correct answer: answer = 1000000
69 Correct 0 ms 2240 KB Correct answer: answer = 994009
70 Correct 0 ms 2240 KB Correct answer: answer = 59315
71 Correct 0 ms 2504 KB Correct answer: answer = 25454
72 Correct 0 ms 3032 KB Correct answer: answer = 1504
73 Correct 0 ms 2372 KB Correct answer: answer = 37486
74 Correct 0 ms 2768 KB Correct answer: answer = 4284
75 Correct 0 ms 2636 KB Correct answer: answer = 158008
76 Correct 0 ms 2636 KB Correct answer: answer = 51860
77 Correct 0 ms 2372 KB Correct answer: answer = 12985
78 Correct 3 ms 2380 KB Correct answer: answer = 997864126212
79 Correct 0 ms 2380 KB Correct answer: answer = 998608411647
80 Correct 3 ms 3172 KB Correct answer: answer = 995265560477
81 Correct 0 ms 2524 KB Correct answer: answer = 10125000
82 Correct 3 ms 2952 KB Correct answer: answer = 2291668
83 Correct 9 ms 5564 KB Correct answer: answer = 42388
84 Correct 29 ms 15408 KB Correct answer: answer = 10318
85 Correct 183 ms 46052 KB Correct answer: answer = 3416
86 Correct 0 ms 2380 KB Correct answer: answer = 331708193881
87 Correct 46 ms 7716 KB Correct answer: answer = 2861193756
88 Correct 399 ms 70768 KB Correct answer: answer = 114646930
89 Correct 13 ms 6060 KB Correct answer: answer = 9280921
90 Correct 56 ms 21796 KB Correct answer: answer = 999984053400
91 Correct 319 ms 46052 KB Correct answer: answer = 750935949134
92 Correct 3 ms 2380 KB Correct answer: answer = 1000000000000
93 Correct 3 ms 2644 KB Correct answer: answer = 998762383161
94 Correct 9 ms 2644 KB Correct answer: answer = 23017412908
95 Correct 6 ms 4360 KB Correct answer: answer = 728143410622
96 Correct 0 ms 2380 KB Correct answer: answer = 2
97 Correct 3 ms 3116 KB Correct answer: answer = 1824916
98 Correct 106 ms 31020 KB Correct answer: answer = 10680029
99 Correct 56 ms 16660 KB Correct answer: answer = 18351700
100 Correct 0 ms 2524 KB Correct answer: answer = 16040026
101 Correct 0 ms 2380 KB Correct answer: answer = 253968628325
102 Correct 159 ms 33980 KB Correct answer: answer = 10267
103 Correct 489 ms 118364 KB Correct answer: answer = 2582408
104 Incorrect 0 ms 2380 KB Wrong answer: output = -244097582419, expected = 78024964781
105 Halted 0 ms 0 KB -