제출 #418732

#제출 시각아이디문제언어결과실행 시간메모리
4187322qbingxuan비스킷 담기 (IOI20_biscuits)C++14
9 / 100
1093 ms1100 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; long long dfs(vector<long long> &a, long long x, int i, long long carry) { if (i == a.size()) { return carry / x + 1; } carry += a[i]; long long res = 0; res += dfs(a, x, i+1, carry / 2); // y >> i & 1 == 0 if (carry >= x) { res += dfs(a, x, i+1, (carry - x) / 2); } return res; } long long count_tastiness(long long x, std::vector<long long> a) { return dfs(a, x, 0, 0); }

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

biscuits.cpp: In function 'long long int dfs(std::vector<long long int>&, long long int, int, long long int)':
biscuits.cpp:6:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    6 |     if (i == a.size()) {
      |         ~~^~~~~~~~~~~
#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...