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 "biscuits.h"
#include <bits/stdc++.h>
#define lp(i,a,b) for(int i = a; i < b; i++)
#define debug printf
#define ff first
#define ss second
#define sz(x) (int)(x.size())
#define all(x) x.begin(),x.end()
#define ll long long
using namespace std ;
long long count_tastiness(long long x, vector<long long> a )
{
while( (int)(a.size()) < 60 ) { a.push_back(0LL) ; } ;
ll prod = 1LL ;
for(int i = 0 ; i < 60 ; i++ )
{
//Garantindo que jah era zero quando cheguei
if(a[i] == 0) continue ;
int r = i , cnt = 0 ;
ll soma = 1LL ;
ll carry = 0 ;
while( true )
{
carry += a[r++] ;
if(carry&1) soma += (1LL << cnt) ;
carry >>= 1LL ;
cnt++ ;
if(carry == 0 ) break ;
}
prod *= soma ;
i = r-1 ;
}
return prod ;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |