제출 #818647

#제출 시각아이디문제언어결과실행 시간메모리
818647kevinsogo비스킷 담기 (IOI20_biscuits)C++17
9 / 100
1089 ms936020 KiB
#include <bits/stdc++.h> using namespace std; #include "biscuits.h" using ll = long long; using lll = __int128; using seq = vector<lll>; seq con(int n, lll v) { return seq(n, v); } seq inc(seq s, lll a) { for (lll& v: s) v += a; return s; } seq conc(seq a, const seq& b, lll v = 0) { assert(a.back() <= b.front()); a.insert(a.end(), b.begin(), b.end()); return inc(a, v); } seq drop(const seq& a, lll u = 0) { int i = 0; while (a[i] < u) i++; return seq(a.begin() + i, a.end()); } int size(const seq& s) { return s.size(); } ll count_tastiness(ll x, vector<ll> a) { a.resize(62); auto s = con(1, 0); for (int i = 0; i < a.size(); i++) s = drop(conc(inc(s, lll(-x) << i), s, lll(a[i]) << i)); return size(s); }

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

biscuits.cpp: In function 'll count_tastiness(ll, std::vector<long long int>)':
biscuits.cpp:32:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   32 |     for (int i = 0; i < a.size(); i++) s = drop(conc(inc(s, lll(-x) << i), s, lll(a[i]) << i));
      |                     ~~^~~~~~~~~~
#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...