제출 #1029350

#제출 시각아이디문제언어결과실행 시간메모리
1029350Andrey비스킷 담기 (IOI20_biscuits)C++14
0 / 100
1 ms348 KiB
#include "biscuits.h" #include<bits/stdc++.h> using namespace std; long long count_tastiness(long long x, std::vector<long long> haha) { long long br = 1,a = 1,b = 0; for(int i = 0; i < haha.size(); i++) { br+=haha[i]; if(br%2) { b+=a; } br/=2; a*=2; if(br == 0) { a = b; b = 0; } } return a*br+b; }

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

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