제출 #1029516

#제출 시각아이디문제언어결과실행 시간메모리
1029516irmuun비스킷 담기 (IOI20_biscuits)C++17
0 / 100
1041 ms416 KiB
#include<bits/stdc++.h> #include "biscuits.h" using namespace std; #define ll long long #define pb push_back #define ff first #define ss second #define all(s) s.begin(),s.end() #define rall(s) s.rbegin(),s.rend() ll count_tastiness(ll x,vector<ll>a){ ll ans=0,k=a.size(); vector<ll>c(60,0); for(ll i=0;i<=100000;i++){ if(i*x>(ll)1e18) break; for(ll j=0;j<60;j++){ c[j]=a[j]; } bool can=true; for(ll j=0;j<60;j++){ if(i&(1ll<<j)){ if(c[j]<x){ can=false; break; } c[j]-=x; if(j<59){ c[j+1]+=c[j]/2; } } } if(can){ ans++; } } return ans; }

컴파일 시 표준 에러 (stderr) 메시지

biscuits.cpp: In function 'long long int count_tastiness(long long int, std::vector<long long int>)':
biscuits.cpp:14:14: warning: unused variable 'k' [-Wunused-variable]
   14 |     ll ans=0,k=a.size();
      |              ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...