이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "biscuits.h"
#include <bits/stdc++.h>
using namespace std;
/* subtask1 : brutazo*/
/*subtask 2 easy brutazo*/
#define ll long long
/***
answer is you either chose a bit or you dont
but, when we have multiple of the same bits we get repetition
we need to count how many times that happens
if they were all differente then answer is
a.size() chose x
we need to count repetitions
2^2 + 2^2 + 2^4 == 8 + 16 = 24
2^3 + 2^3 + 2^3 = 8 + 8 + 8 = 16
*/
long long count_tastiness(long long x, vector<long long> a) {
ll ans = 0;
//vector that stores how many bits we can use to make this power of two
for(ll pow : a)
ans+= pow!= 0;
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |