# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
199373 | CaroLinda | Skyscraper (JOI16_skyscraper) | C++14 | 646 ms | 212088 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
const int MOD = 1e9+7 ;
const int MAXL = 110 ;
const int MAXN = 15 ;
using namespace std ;
int n , l ;
int f[MAXN] ;
long long dp[ (1<<14)+100 ][ MAXL ][ MAXN ] ;
bool isOn(int mask, int i) { return ((1<<i)&mask) != 0 ; }
int main()
{
scanf("%d%d", &n , &l ) ;
for(int i = 1 ; i <= n ; i++ ) scanf("%d", &f[i]) ;
if( n <= 8 )
{
sort( f+1, f+1+n ) ;
int ans = 0 , soma = 0 ;
for(int i = 1 ; i < n ; i++ )
soma += abs( f[i] - f[i+1] ) ;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |