제출 #602820

#제출 시각아이디문제언어결과실행 시간메모리
602820Red_Inside비스킷 담기 (IOI20_biscuits)C++17
9 / 100
1123 ms788528 KiB
#include "biscuits.h"
#include <bits/stdc++.h>

#define ll long long
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define o cout<<"BUG"<<endl;
#define FOR(i, j, n) for(int j = i; j < n; ++j)
#define forn(i, j, n) for(int j = i; j <= n; ++j)
#define nfor(i, j, n) for(int j = n; j >= i; --j)
#define all(v) v.begin(), v.end()
#define ld long double
#define ull unsigned long long

using namespace std;
const int maxn=2e5+100,LOG=17,mod=1e9+7;
int block = 226, timer = 0;
const ld EPS = 1e-18;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);

#define bt(i) (1 << (i))
//#define int ll
const int inf=2e9;
#define y1 yy
#define prev pre
#define pii pair <int, int>

ll count_tastiness(ll x, vector <ll> a)
{
	vector <ll> b;
	ll ans = 0;
	if(a[0] >= x) b.pb((a[0] - x) / 2);
	b.pb(a[0] / 2);
	while(a.size() < 190) a.pb(0);
	for(ll i = 1; i < 190; ++i)
	{
		vector <ll> c;
		for(auto j : b)
		{
			if(j + a[i] >= x)
				c.pb((j + a[i] - x) / 2);
			c.pb((j + a[i]) / 2);
		}
//		cout << c.size() << endl;
		b = c;
	}
	return b.size();
}

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

biscuits.cpp: In function 'long long int count_tastiness(long long int, std::vector<long long int>)':
biscuits.cpp:34:5: warning: unused variable 'ans' [-Wunused-variable]
   34 |  ll ans = 0;
      |     ^~~
#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...