제출 #987318

#제출 시각아이디문제언어결과실행 시간메모리
987318AdamGS비스킷 담기 (IOI20_biscuits)C++17
0 / 100
1 ms348 KiB
#include "biscuits.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
ll solve(ll a, ll b, ll x, vector<ll>&T) {
  if(a==T.size()) return 1;
  b+=T[a];
  ll ans=solve(a+1, b/2, x, T);
  if(b>=x) ans+=solve(a+1, (b-x)/2, x, T);
  return ans;
}
ll count_tastiness(ll x, vector<ll>T) {
  return solve(0, 0, x, T);
}

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

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