제출 #615474

#제출 시각아이디문제언어결과실행 시간메모리
615474Dan4Life비스킷 담기 (IOI20_biscuits)C++17
0 / 100
547 ms340 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define sz(a) (int)a.size() ll count_tastiness(ll x, vector<ll> a) { auto b = a; ll ans = 0; for(int i = 0; i <= 100000; i++){ int ok=1; a = b; for(int j = 0; j < sz(a); j++){ if((i>>j)&1 and a[j]<x) ok=0; if(j==sz(a)-1) break; a[j+1]+=max(0ll,(a[j]-x*((i>>j)&1))/2); } ans+=ok; } return ans; }

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

biscuits.cpp: In function 'long long int count_tastiness(long long int, std::vector<long long int>)':
biscuits.cpp:11:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   11 |         if((i>>j)&1 and a[j]<x) ok=0; if(j==sz(a)-1) break;
      |         ^~
biscuits.cpp:11:39: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   11 |         if((i>>j)&1 and a[j]<x) ok=0; if(j==sz(a)-1) break;
      |                                       ^~
#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...