답안 #71784

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
71784 2018-08-25T15:47:04 Z KLPP Shortcut (IOI16_shortcut) C++14
0 / 100
690 ms 525312 KB
#include "shortcut.h"
#include<iostream>
#include<vector>
#include<queue>
using namespace std;
typedef long long int lld;
typedef pair<int,long long int> pii;

vector<pii>nei[1000000];
lld max(lld x, lld y){
	if(x<y)return y;
return x;
	
}
lld min(lld x, lld y){
	if(x>y)return y;
return x;
	
}
class ST{
	lld maximo[100000];
	int n;
	public:
	void build(int a, int b, int node){
		maximo[node]=0;
		if(a==b)return;
		int mid=(a+b)/2;
		build(a,mid,2*node);
		build(mid+1,b,2*node+1);
	}
	void init(int N){
		n=N;
		build(0,n-1,1);
	}
	void update(int pos, lld val,int a, int b, int node){
		if(pos<a || pos>b)return;
		if(a==b){
			maximo[node]=val;
			return;
		}
		int mid=(a+b)/2;
		update(pos,val,a,mid,2*node);
		update(pos,val,mid+1,b,2*node+1);
		maximo[node]=max(maximo[2*node],maximo[2*node+1]);
	}
	void set(int pos,lld val){
		update(pos,val,0,n-1,1);
	}
	lld query(){
		return maximo[1];
	}
};
lld positive(lld values[],lld distances[],int n){
	int pnt=0;
	lld dist=0;
	lld sum=0;
	lld DP[n];
	DP[0]=0;
	for(int i=0;i<n-1;i++)DP[i+1]=DP[i]+distances[i];
	for(int i=0;i<n;i++)sum+=distances[i];
	//cout<<sum<<endl;
	ST *s=new ST();
	s->init(n);
	lld ans=0;
	for(int i=0;i<n;i++){
		while(pnt<n && 2*(dist+distances[pnt])<=sum){
			dist+=distances[pnt];
			pnt++;
			if(pnt<n)s->set(pnt,DP[pnt]+values[pnt]);
		}//cout<<i<<" "<<pnt<<" "<<dist<<endl;
		s->set(i,0);
		ans=max(ans,s->query()-DP[i]+values[i]);
		ans=max(ans,values[i]);
		dist-=distances[i];
	}
	return ans;
}
lld negative(lld values[],lld distances[],int n){
	int pnt=0;
	lld dist=0;
	lld sum=0;
	lld DP[n];
	DP[0]=0;
	for(int i=0;i<n-1;i++)DP[i+1]=DP[i]+distances[i];
	for(int i=0;i<n;i++)sum+=distances[i];
	//cout<<sum<<endl;
	//for(int i=0;i<n;i++)cout<<distances[i]<<" "<<values[i]<<endl;
	ST *s=new ST();
	s->init(n);
	for(int i=0;i<n;i++)s->set(i,sum-DP[i]+values[i]);
	lld ans=0;//cout<<endl;
	for(int i=0;i<n;i++){
		while(pnt<n && 2*dist<=sum){s->set(pnt,0);
			dist+=distances[pnt];
			pnt++;
		}//cout<<i<<" "<<pnt<<" "<<dist<<endl;
		//s->set(i,0);
		if(pnt<n)ans=max(ans,s->query()+DP[i]+values[i]);
		ans=max(ans,values[i]);
		dist-=distances[i];
		//cout<<values[i]<<" ";
	}//cout<<endl<<endl;
	return ans;
}
long long find_shortcut(int n, std::vector <int> l, std::vector <int> d, int c)
{
	lld ans=1000000000000000;
	lld left[n];
	left[0]=d[0];
	for(int i=1;i<n;i++){
		left[i]=left[i-1];
		lld dist=0;
		for(int j=i-1;j>-1;j--){
			dist+=l[j];
			left[i]=max(left[i],dist+d[j]+d[i]);
		}
		//cout<<left[i]<<" ";
	}//cout<<endl;
	lld right[n];
	right[n-1]=d[n-1];
	for(int i=n-2;i>-1;i--){
		right[i]=right[i+1];
		lld dist=0;
		for(int j=i;j<n-1;j++){
			dist+=l[j];
			right[i]=max(right[i],dist+d[j+1]+d[i]);
		}
		//cout<<right[i]<<" ";
	}//cout<<endl;
	for(int i=0;i<n;i++){
		for(int j=i+1;j<n;j++){
			lld values[j-i+1];
			lld distances[j-i+1];
			int size=j-i+1;
			for(int h=0;h<j-i;h++){
				distances[h]=l[i+h];
			}
			distances[j-i]=c;
			for(int h=i+1;h<j;h++){
				values[h-i]=d[h];
			}
			lld dist=0;
			values[0]=d[i];
			for(int h=i-1;h>-1;h--){
				dist+=l[h];
				values[0]=max(values[0],dist+d[h]);
			}
			values[j-i]=d[j];
			
			dist=0;
			for(int h=j;h<n-1;h++){
				dist+=l[h];
				values[j-i]=max(values[j-i],dist+d[h+1]);
			}
			
			lld r=positive(values,distances,size);
			//cout<<i<<" A "<<j<<" "<<r<<endl;
			r=max(r,negative(values,distances,size));
			//cout<<i<<" B "<<j<<" "<<r<<endl;
			//cout<<values[0]<<" "<<values[j-i]<<endl;
			r=max(r,left[i]);
			r=max(r,right[j]);
			//cout<<max(left[i],right[j])<<endl;
			ans=min(ans,r);
		}
	}
	return ans;
}

# 결과 실행 시간 메모리 Grader output
1 Correct 33 ms 33400 KB n = 4, 80 is a correct answer
2 Correct 78 ms 80472 KB n = 9, 110 is a correct answer
3 Correct 39 ms 80472 KB n = 4, 21 is a correct answer
4 Correct 30 ms 80472 KB n = 3, 4 is a correct answer
5 Correct 25 ms 80472 KB n = 2, 62 is a correct answer
6 Correct 25 ms 80472 KB n = 2, 3 is a correct answer
7 Correct 26 ms 80472 KB n = 3, 29 is a correct answer
8 Correct 25 ms 80472 KB n = 2, 3 is a correct answer
9 Correct 28 ms 80472 KB n = 2, 3 is a correct answer
10 Correct 28 ms 80472 KB n = 2, 2000000001 is a correct answer
11 Correct 24 ms 80472 KB n = 2, 3000000000 is a correct answer
12 Correct 26 ms 80472 KB n = 3, 3000000000 is a correct answer
13 Correct 27 ms 80472 KB n = 3, 3000000000 is a correct answer
14 Correct 34 ms 80472 KB n = 4, 3000000001 is a correct answer
15 Correct 33 ms 80472 KB n = 4, 4000000000 is a correct answer
16 Correct 38 ms 80472 KB n = 5, 4000000000 is a correct answer
17 Correct 85 ms 94784 KB n = 10, 1000000343 is a correct answer
18 Correct 80 ms 94784 KB n = 10, 3189 is a correct answer
19 Correct 80 ms 94828 KB n = 10, 7000000000 is a correct answer
20 Correct 36 ms 94828 KB n = 5, 12 is a correct answer
21 Correct 37 ms 94828 KB n = 5, 25 is a correct answer
22 Correct 23 ms 94828 KB n = 2, 122 is a correct answer
23 Correct 81 ms 94828 KB n = 10, 117 is a correct answer
24 Correct 101 ms 94828 KB n = 10, 336 is a correct answer
25 Correct 85 ms 94828 KB n = 10, 438 is a correct answer
26 Correct 87 ms 94828 KB n = 10, 206 is a correct answer
27 Correct 81 ms 94828 KB n = 10, 636 is a correct answer
28 Correct 31 ms 94828 KB n = 4, 2399 is a correct answer
29 Correct 83 ms 94828 KB n = 10, 10992 is a correct answer
30 Correct 86 ms 94828 KB n = 10, 3112 is a correct answer
31 Runtime error 690 ms 525312 KB Execution killed with signal 9 (could be triggered by violating memory limits)
32 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 33 ms 33400 KB n = 4, 80 is a correct answer
2 Correct 78 ms 80472 KB n = 9, 110 is a correct answer
3 Correct 39 ms 80472 KB n = 4, 21 is a correct answer
4 Correct 30 ms 80472 KB n = 3, 4 is a correct answer
5 Correct 25 ms 80472 KB n = 2, 62 is a correct answer
6 Correct 25 ms 80472 KB n = 2, 3 is a correct answer
7 Correct 26 ms 80472 KB n = 3, 29 is a correct answer
8 Correct 25 ms 80472 KB n = 2, 3 is a correct answer
9 Correct 28 ms 80472 KB n = 2, 3 is a correct answer
10 Correct 28 ms 80472 KB n = 2, 2000000001 is a correct answer
11 Correct 24 ms 80472 KB n = 2, 3000000000 is a correct answer
12 Correct 26 ms 80472 KB n = 3, 3000000000 is a correct answer
13 Correct 27 ms 80472 KB n = 3, 3000000000 is a correct answer
14 Correct 34 ms 80472 KB n = 4, 3000000001 is a correct answer
15 Correct 33 ms 80472 KB n = 4, 4000000000 is a correct answer
16 Correct 38 ms 80472 KB n = 5, 4000000000 is a correct answer
17 Correct 85 ms 94784 KB n = 10, 1000000343 is a correct answer
18 Correct 80 ms 94784 KB n = 10, 3189 is a correct answer
19 Correct 80 ms 94828 KB n = 10, 7000000000 is a correct answer
20 Correct 36 ms 94828 KB n = 5, 12 is a correct answer
21 Correct 37 ms 94828 KB n = 5, 25 is a correct answer
22 Correct 23 ms 94828 KB n = 2, 122 is a correct answer
23 Correct 81 ms 94828 KB n = 10, 117 is a correct answer
24 Correct 101 ms 94828 KB n = 10, 336 is a correct answer
25 Correct 85 ms 94828 KB n = 10, 438 is a correct answer
26 Correct 87 ms 94828 KB n = 10, 206 is a correct answer
27 Correct 81 ms 94828 KB n = 10, 636 is a correct answer
28 Correct 31 ms 94828 KB n = 4, 2399 is a correct answer
29 Correct 83 ms 94828 KB n = 10, 10992 is a correct answer
30 Correct 86 ms 94828 KB n = 10, 3112 is a correct answer
31 Runtime error 690 ms 525312 KB Execution killed with signal 9 (could be triggered by violating memory limits)
32 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 33 ms 33400 KB n = 4, 80 is a correct answer
2 Correct 78 ms 80472 KB n = 9, 110 is a correct answer
3 Correct 39 ms 80472 KB n = 4, 21 is a correct answer
4 Correct 30 ms 80472 KB n = 3, 4 is a correct answer
5 Correct 25 ms 80472 KB n = 2, 62 is a correct answer
6 Correct 25 ms 80472 KB n = 2, 3 is a correct answer
7 Correct 26 ms 80472 KB n = 3, 29 is a correct answer
8 Correct 25 ms 80472 KB n = 2, 3 is a correct answer
9 Correct 28 ms 80472 KB n = 2, 3 is a correct answer
10 Correct 28 ms 80472 KB n = 2, 2000000001 is a correct answer
11 Correct 24 ms 80472 KB n = 2, 3000000000 is a correct answer
12 Correct 26 ms 80472 KB n = 3, 3000000000 is a correct answer
13 Correct 27 ms 80472 KB n = 3, 3000000000 is a correct answer
14 Correct 34 ms 80472 KB n = 4, 3000000001 is a correct answer
15 Correct 33 ms 80472 KB n = 4, 4000000000 is a correct answer
16 Correct 38 ms 80472 KB n = 5, 4000000000 is a correct answer
17 Correct 85 ms 94784 KB n = 10, 1000000343 is a correct answer
18 Correct 80 ms 94784 KB n = 10, 3189 is a correct answer
19 Correct 80 ms 94828 KB n = 10, 7000000000 is a correct answer
20 Correct 36 ms 94828 KB n = 5, 12 is a correct answer
21 Correct 37 ms 94828 KB n = 5, 25 is a correct answer
22 Correct 23 ms 94828 KB n = 2, 122 is a correct answer
23 Correct 81 ms 94828 KB n = 10, 117 is a correct answer
24 Correct 101 ms 94828 KB n = 10, 336 is a correct answer
25 Correct 85 ms 94828 KB n = 10, 438 is a correct answer
26 Correct 87 ms 94828 KB n = 10, 206 is a correct answer
27 Correct 81 ms 94828 KB n = 10, 636 is a correct answer
28 Correct 31 ms 94828 KB n = 4, 2399 is a correct answer
29 Correct 83 ms 94828 KB n = 10, 10992 is a correct answer
30 Correct 86 ms 94828 KB n = 10, 3112 is a correct answer
31 Runtime error 690 ms 525312 KB Execution killed with signal 9 (could be triggered by violating memory limits)
32 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 33 ms 33400 KB n = 4, 80 is a correct answer
2 Correct 78 ms 80472 KB n = 9, 110 is a correct answer
3 Correct 39 ms 80472 KB n = 4, 21 is a correct answer
4 Correct 30 ms 80472 KB n = 3, 4 is a correct answer
5 Correct 25 ms 80472 KB n = 2, 62 is a correct answer
6 Correct 25 ms 80472 KB n = 2, 3 is a correct answer
7 Correct 26 ms 80472 KB n = 3, 29 is a correct answer
8 Correct 25 ms 80472 KB n = 2, 3 is a correct answer
9 Correct 28 ms 80472 KB n = 2, 3 is a correct answer
10 Correct 28 ms 80472 KB n = 2, 2000000001 is a correct answer
11 Correct 24 ms 80472 KB n = 2, 3000000000 is a correct answer
12 Correct 26 ms 80472 KB n = 3, 3000000000 is a correct answer
13 Correct 27 ms 80472 KB n = 3, 3000000000 is a correct answer
14 Correct 34 ms 80472 KB n = 4, 3000000001 is a correct answer
15 Correct 33 ms 80472 KB n = 4, 4000000000 is a correct answer
16 Correct 38 ms 80472 KB n = 5, 4000000000 is a correct answer
17 Correct 85 ms 94784 KB n = 10, 1000000343 is a correct answer
18 Correct 80 ms 94784 KB n = 10, 3189 is a correct answer
19 Correct 80 ms 94828 KB n = 10, 7000000000 is a correct answer
20 Correct 36 ms 94828 KB n = 5, 12 is a correct answer
21 Correct 37 ms 94828 KB n = 5, 25 is a correct answer
22 Correct 23 ms 94828 KB n = 2, 122 is a correct answer
23 Correct 81 ms 94828 KB n = 10, 117 is a correct answer
24 Correct 101 ms 94828 KB n = 10, 336 is a correct answer
25 Correct 85 ms 94828 KB n = 10, 438 is a correct answer
26 Correct 87 ms 94828 KB n = 10, 206 is a correct answer
27 Correct 81 ms 94828 KB n = 10, 636 is a correct answer
28 Correct 31 ms 94828 KB n = 4, 2399 is a correct answer
29 Correct 83 ms 94828 KB n = 10, 10992 is a correct answer
30 Correct 86 ms 94828 KB n = 10, 3112 is a correct answer
31 Runtime error 690 ms 525312 KB Execution killed with signal 9 (could be triggered by violating memory limits)
32 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 33 ms 33400 KB n = 4, 80 is a correct answer
2 Correct 78 ms 80472 KB n = 9, 110 is a correct answer
3 Correct 39 ms 80472 KB n = 4, 21 is a correct answer
4 Correct 30 ms 80472 KB n = 3, 4 is a correct answer
5 Correct 25 ms 80472 KB n = 2, 62 is a correct answer
6 Correct 25 ms 80472 KB n = 2, 3 is a correct answer
7 Correct 26 ms 80472 KB n = 3, 29 is a correct answer
8 Correct 25 ms 80472 KB n = 2, 3 is a correct answer
9 Correct 28 ms 80472 KB n = 2, 3 is a correct answer
10 Correct 28 ms 80472 KB n = 2, 2000000001 is a correct answer
11 Correct 24 ms 80472 KB n = 2, 3000000000 is a correct answer
12 Correct 26 ms 80472 KB n = 3, 3000000000 is a correct answer
13 Correct 27 ms 80472 KB n = 3, 3000000000 is a correct answer
14 Correct 34 ms 80472 KB n = 4, 3000000001 is a correct answer
15 Correct 33 ms 80472 KB n = 4, 4000000000 is a correct answer
16 Correct 38 ms 80472 KB n = 5, 4000000000 is a correct answer
17 Correct 85 ms 94784 KB n = 10, 1000000343 is a correct answer
18 Correct 80 ms 94784 KB n = 10, 3189 is a correct answer
19 Correct 80 ms 94828 KB n = 10, 7000000000 is a correct answer
20 Correct 36 ms 94828 KB n = 5, 12 is a correct answer
21 Correct 37 ms 94828 KB n = 5, 25 is a correct answer
22 Correct 23 ms 94828 KB n = 2, 122 is a correct answer
23 Correct 81 ms 94828 KB n = 10, 117 is a correct answer
24 Correct 101 ms 94828 KB n = 10, 336 is a correct answer
25 Correct 85 ms 94828 KB n = 10, 438 is a correct answer
26 Correct 87 ms 94828 KB n = 10, 206 is a correct answer
27 Correct 81 ms 94828 KB n = 10, 636 is a correct answer
28 Correct 31 ms 94828 KB n = 4, 2399 is a correct answer
29 Correct 83 ms 94828 KB n = 10, 10992 is a correct answer
30 Correct 86 ms 94828 KB n = 10, 3112 is a correct answer
31 Runtime error 690 ms 525312 KB Execution killed with signal 9 (could be triggered by violating memory limits)
32 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 33 ms 33400 KB n = 4, 80 is a correct answer
2 Correct 78 ms 80472 KB n = 9, 110 is a correct answer
3 Correct 39 ms 80472 KB n = 4, 21 is a correct answer
4 Correct 30 ms 80472 KB n = 3, 4 is a correct answer
5 Correct 25 ms 80472 KB n = 2, 62 is a correct answer
6 Correct 25 ms 80472 KB n = 2, 3 is a correct answer
7 Correct 26 ms 80472 KB n = 3, 29 is a correct answer
8 Correct 25 ms 80472 KB n = 2, 3 is a correct answer
9 Correct 28 ms 80472 KB n = 2, 3 is a correct answer
10 Correct 28 ms 80472 KB n = 2, 2000000001 is a correct answer
11 Correct 24 ms 80472 KB n = 2, 3000000000 is a correct answer
12 Correct 26 ms 80472 KB n = 3, 3000000000 is a correct answer
13 Correct 27 ms 80472 KB n = 3, 3000000000 is a correct answer
14 Correct 34 ms 80472 KB n = 4, 3000000001 is a correct answer
15 Correct 33 ms 80472 KB n = 4, 4000000000 is a correct answer
16 Correct 38 ms 80472 KB n = 5, 4000000000 is a correct answer
17 Correct 85 ms 94784 KB n = 10, 1000000343 is a correct answer
18 Correct 80 ms 94784 KB n = 10, 3189 is a correct answer
19 Correct 80 ms 94828 KB n = 10, 7000000000 is a correct answer
20 Correct 36 ms 94828 KB n = 5, 12 is a correct answer
21 Correct 37 ms 94828 KB n = 5, 25 is a correct answer
22 Correct 23 ms 94828 KB n = 2, 122 is a correct answer
23 Correct 81 ms 94828 KB n = 10, 117 is a correct answer
24 Correct 101 ms 94828 KB n = 10, 336 is a correct answer
25 Correct 85 ms 94828 KB n = 10, 438 is a correct answer
26 Correct 87 ms 94828 KB n = 10, 206 is a correct answer
27 Correct 81 ms 94828 KB n = 10, 636 is a correct answer
28 Correct 31 ms 94828 KB n = 4, 2399 is a correct answer
29 Correct 83 ms 94828 KB n = 10, 10992 is a correct answer
30 Correct 86 ms 94828 KB n = 10, 3112 is a correct answer
31 Runtime error 690 ms 525312 KB Execution killed with signal 9 (could be triggered by violating memory limits)
32 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 33 ms 33400 KB n = 4, 80 is a correct answer
2 Correct 78 ms 80472 KB n = 9, 110 is a correct answer
3 Correct 39 ms 80472 KB n = 4, 21 is a correct answer
4 Correct 30 ms 80472 KB n = 3, 4 is a correct answer
5 Correct 25 ms 80472 KB n = 2, 62 is a correct answer
6 Correct 25 ms 80472 KB n = 2, 3 is a correct answer
7 Correct 26 ms 80472 KB n = 3, 29 is a correct answer
8 Correct 25 ms 80472 KB n = 2, 3 is a correct answer
9 Correct 28 ms 80472 KB n = 2, 3 is a correct answer
10 Correct 28 ms 80472 KB n = 2, 2000000001 is a correct answer
11 Correct 24 ms 80472 KB n = 2, 3000000000 is a correct answer
12 Correct 26 ms 80472 KB n = 3, 3000000000 is a correct answer
13 Correct 27 ms 80472 KB n = 3, 3000000000 is a correct answer
14 Correct 34 ms 80472 KB n = 4, 3000000001 is a correct answer
15 Correct 33 ms 80472 KB n = 4, 4000000000 is a correct answer
16 Correct 38 ms 80472 KB n = 5, 4000000000 is a correct answer
17 Correct 85 ms 94784 KB n = 10, 1000000343 is a correct answer
18 Correct 80 ms 94784 KB n = 10, 3189 is a correct answer
19 Correct 80 ms 94828 KB n = 10, 7000000000 is a correct answer
20 Correct 36 ms 94828 KB n = 5, 12 is a correct answer
21 Correct 37 ms 94828 KB n = 5, 25 is a correct answer
22 Correct 23 ms 94828 KB n = 2, 122 is a correct answer
23 Correct 81 ms 94828 KB n = 10, 117 is a correct answer
24 Correct 101 ms 94828 KB n = 10, 336 is a correct answer
25 Correct 85 ms 94828 KB n = 10, 438 is a correct answer
26 Correct 87 ms 94828 KB n = 10, 206 is a correct answer
27 Correct 81 ms 94828 KB n = 10, 636 is a correct answer
28 Correct 31 ms 94828 KB n = 4, 2399 is a correct answer
29 Correct 83 ms 94828 KB n = 10, 10992 is a correct answer
30 Correct 86 ms 94828 KB n = 10, 3112 is a correct answer
31 Runtime error 690 ms 525312 KB Execution killed with signal 9 (could be triggered by violating memory limits)
32 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 33 ms 33400 KB n = 4, 80 is a correct answer
2 Correct 78 ms 80472 KB n = 9, 110 is a correct answer
3 Correct 39 ms 80472 KB n = 4, 21 is a correct answer
4 Correct 30 ms 80472 KB n = 3, 4 is a correct answer
5 Correct 25 ms 80472 KB n = 2, 62 is a correct answer
6 Correct 25 ms 80472 KB n = 2, 3 is a correct answer
7 Correct 26 ms 80472 KB n = 3, 29 is a correct answer
8 Correct 25 ms 80472 KB n = 2, 3 is a correct answer
9 Correct 28 ms 80472 KB n = 2, 3 is a correct answer
10 Correct 28 ms 80472 KB n = 2, 2000000001 is a correct answer
11 Correct 24 ms 80472 KB n = 2, 3000000000 is a correct answer
12 Correct 26 ms 80472 KB n = 3, 3000000000 is a correct answer
13 Correct 27 ms 80472 KB n = 3, 3000000000 is a correct answer
14 Correct 34 ms 80472 KB n = 4, 3000000001 is a correct answer
15 Correct 33 ms 80472 KB n = 4, 4000000000 is a correct answer
16 Correct 38 ms 80472 KB n = 5, 4000000000 is a correct answer
17 Correct 85 ms 94784 KB n = 10, 1000000343 is a correct answer
18 Correct 80 ms 94784 KB n = 10, 3189 is a correct answer
19 Correct 80 ms 94828 KB n = 10, 7000000000 is a correct answer
20 Correct 36 ms 94828 KB n = 5, 12 is a correct answer
21 Correct 37 ms 94828 KB n = 5, 25 is a correct answer
22 Correct 23 ms 94828 KB n = 2, 122 is a correct answer
23 Correct 81 ms 94828 KB n = 10, 117 is a correct answer
24 Correct 101 ms 94828 KB n = 10, 336 is a correct answer
25 Correct 85 ms 94828 KB n = 10, 438 is a correct answer
26 Correct 87 ms 94828 KB n = 10, 206 is a correct answer
27 Correct 81 ms 94828 KB n = 10, 636 is a correct answer
28 Correct 31 ms 94828 KB n = 4, 2399 is a correct answer
29 Correct 83 ms 94828 KB n = 10, 10992 is a correct answer
30 Correct 86 ms 94828 KB n = 10, 3112 is a correct answer
31 Runtime error 690 ms 525312 KB Execution killed with signal 9 (could be triggered by violating memory limits)
32 Halted 0 ms 0 KB -