제출 #955589

#제출 시각아이디문제언어결과실행 시간메모리
955589Trisanu_Das비스킷 담기 (IOI20_biscuits)C++17
42 / 100
1065 ms24068 KiB
#include "biscuits.h" #include<bits/stdc++.h> using namespace std; long long count_tastiness(long long x, vector<long long> a){ map<long long, long long> da; da[0] = 1; for(int i = 0; i < 60; i++) a.push_back(0); for(int i = 0; i < a.size(); i++){ map<long long, long long> nov; for(auto j : da){ nov[(j.first + a[i]) / 2] += j.second; if(j.first + a[i] >= x) nov[(j.first + a[i] - x) / 2] += j.second; } da = nov; } long long ans = 0; for(auto i : da) ans += i.second; return ans; }

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

biscuits.cpp: In function 'long long int count_tastiness(long long int, std::vector<long long int>)':
biscuits.cpp:9:19: 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 i = 0; i < a.size(); 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...