Submission #766381

# Submission time Handle Problem Language Result Execution time Memory
766381 2023-06-25T15:18:35 Z 1ne Bali Sculptures (APIO15_sculpture) C++14
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std; 
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	long long n,a,b;cin>>n>>a>>b;
	vector<long long>arr(n);
	for (long long i = 0;i<n;++i){
		cin>>arr[i];
	}
	long long vv = 1e16;                                   
	for (long long i = 0;i<(1<<n);++i){
		long long v = 0;
      long long cnt = 0;
		for (long long j = 0;j<n;){
			long long cur = (i & (1<<j));
			long long k = j;
			long long ans = 0;
			while(k < n && (i & (1Ll<<k)) == cur){
				ans+=arr[k];
				++k;
			}
			v|=ans;
			cnt++;	
         j = k;
		}
		if (cnt >= a && cnt <= b){
			vv = min(vv,v);
		}
	}
	cout<<vv<<'\n';
	return 0;
}

Compilation message

sculpture.cpp: In function 'int main()':
sculpture.cpp:19:25: error: unable to find numeric literal operator 'operator""Ll'
   19 |    while(k < n && (i & (1Ll<<k)) == cur){
      |                         ^~~
sculpture.cpp:19:25: note: use '-fext-numeric-literals' to enable more built-in suffixes