제출 #750957

#제출 시각아이디문제언어결과실행 시간메모리
750957mohav48173비스킷 담기 (IOI20_biscuits)C++14
0 / 100
1071 ms340 KiB
#include "biscuits.h" #include<bits/stdc++.h> using namespace std; long long count_tastiness(long long x, vector<long long> a) { while(a.size()<20)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(copyi&1); copyi>>=1; } vector<long long>copya=a; bool isgood=1; for(int j=0;j<copya.size();j++) { if(copya[j]==1 && copya[j]<x){isgood=0;break;} if(copya[j]==1)copya[j]-=x; copya[j+1]+=copya[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:16:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |         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...