제출 #1065864

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

using namespace std;

using ll = long long;
using vll = vector<ll>;
using i128 = __int128;

ll count_tastiness(ll x, vll a) {
    int MV = 100000;
    int n = int(a.size());

    auto posibil = [&](ll val) -> bool {
        ll s = 0;
        for(int i = 0; i < n + 60; ++i) {
            if(i < n)
                s += a[i] * (1ll << i);
            if(i < 62 && (val & (1ll << i))) {
                s -= x * (1ll << i);
            }
            if(s < 0) return false;
        }
        return true;
    };

    ll re = 0;
    for(int i = 0; i <= MV; ++i)
        re += posibil(i);
	return re;
}

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

biscuits.cpp: In function 'll count_tastiness(ll, vll)':
biscuits.cpp:28:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   28 |     for(int i = 0; i <= MV; ++i)
      |     ^~~
biscuits.cpp:30:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   30 |  return re;
      |  ^~~~~~
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…