제출 #696332

#제출 시각아이디문제언어결과실행 시간메모리
696332garam1732비스킷 담기 (IOI20_biscuits)C++14
12 / 100
1 ms340 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; long long count_tastiness(long long x, std::vector<long long> a) { for(int i = 0; i < a.size(); i++) { for(int j = i+1; j < a.size(); j++) { if(a[i] >= (1LL<<(j-i))-1) { a[i] += a[j]*(1LL<<(j-i)); a[j] = 0; } } } ll res = 1; for(ll x : a) res *= (x+1); return res; }

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

biscuits.cpp: In function 'long long int count_tastiness(long long int, std::vector<long long int>)':
biscuits.cpp:8:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    8 |  for(int i = 0; i < a.size(); i++) {
      |                 ~~^~~~~~~~~~
biscuits.cpp:9:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |         for(int j = i+1; j < a.size(); j++) {
      |                          ~~^~~~~~~~~~
#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...