제출 #831368

#제출 시각아이디문제언어결과실행 시간메모리
831368Trumling비스킷 담기 (IOI20_biscuits)C++14
0 / 100
3 ms468 KiB
#include "biscuits.h" #include<bits/stdc++.h> using namespace std; #define F first #define S second #define all(x) x.begin(),x.end() typedef long long ll; #define pb push_back #define INF 9999999999999999 long long count_tastiness(long long x, vector<long long> a) { ll ans=1; for(int i=1;i<=100000;i++) { vector<ll>curr(60,0); for(int j=0;j<a.size();j++) curr.pb(a[i]); bool tf=1; for(int j=0;(1<<j)<=i;j++) { if((1<<j)&i && curr[j]<x) { tf=0; break; } if((1<<j)&i) curr[j]-=x; curr[j+1]+=curr[j]/2; } if(tf) ans++; } return ans; }

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

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