제출 #750953

#제출 시각아이디문제언어결과실행 시간메모리
750953mohav48173비스킷 담기 (IOI20_biscuits)C++14
0 / 100
1134 ms1199188 KiB
#include "biscuits.h" #include<bits/stdc++.h> using namespace std; long long count_tastiness(long long x, vector<long long> a) { a.push_back(0); int ans=0; for(int i=0;i<=100000;i++) { vector<int>corr; int copyi=i; while(copyi>0) { corr.push_back(i%2); i/=2; } while(a.size()-1<corr.size())a.push_back(0); vector<long long>copya=a; bool isgood=1; for(int j=0;j<copya.size();j++) { if(copya[j]==1 && a[j]<x){isgood=0;break;} if(copya[j]==1)a[j]-=x; a[j+1]+=a[j]/2; } ans+=isgood; } return ans; }

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

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