제출 #581940

#제출 시각아이디문제언어결과실행 시간메모리
581940joelau비스킷 담기 (IOI20_biscuits)C++14
9 / 100
1088 ms1108 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; long long X; vector<long long> A; long long f(long long n) { if (n == A.size()-1) return A[n]/X+1; A[n+1] += A[n]/2; long long ans = f(n+1); A[n+1] -= A[n]/2; if (A[n] >= X) { A[n] -= X, A[n+1] += A[n]/2; ans += f(n+1); A[n+1] -= A[n]/2, A[n] += X; } return ans; } long long count_tastiness(long long x, vector<long long> a) { X = x, A = a; return f(0); }

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

biscuits.cpp: In function 'long long int f(long long int)':
biscuits.cpp:9:8: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |  if (n == A.size()-1) return A[n]/X+1;
      |      ~~^~~~~~~~~~~~~
#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...