제출 #673313

#제출 시각아이디문제언어결과실행 시간메모리
673313Hanksburger비스킷 담기 (IOI20_biscuits)C++17
0 / 100
1083 ms340 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; map<long long, long long> mp; long long s[65], x; long long f(long long n) { if (n<=0 || mp[n]) return mp[n]; long long l=log2(n-0.5); return f(1<<l)+f(min(n, 1+s[l]/x)-(1<<l)); } long long count_tastiness(long long X, vector<long long> A) { x=X; s[0]=A[0]; for (long long i=1; i<A.size(); i++) s[i]=s[i-1]+(A[i]<<i); mp[1]=1; return f(1e18); }

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

biscuits.cpp: In function 'long long int count_tastiness(long long int, std::vector<long long int>)':
biscuits.cpp:17:23: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |  for (long long i=1; i<A.size(); i++)
      |                      ~^~~~~~~~~
#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...