제출 #423957

#제출 시각아이디문제언어결과실행 시간메모리
423957Apiram비스킷 담기 (IOI20_biscuits)C++14
컴파일 에러
0 ms0 KiB
#include "biscuits.h" #include<bits/stdc++.h> using namespace std; long long count_tastiness(long long x, std::vector<long long> a) { int n = a.length(); int64_t val =0; for (int i = 0 ;i<n;++i){ val+=pow(2,i) * a[i]; } return val; }

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

biscuits.cpp: In function 'long long int count_tastiness(long long int, std::vector<long long int>)':
biscuits.cpp:6:11: error: 'class std::vector<long long int>' has no member named 'length'
    6 | int n = a.length();
      |           ^~~~~~