Submission #423957

#TimeUsernameProblemLanguageResultExecution timeMemory
423957ApiramPacking Biscuits (IOI20_biscuits)C++14
Compilation error
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; }

Compilation message (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();
      |           ^~~~~~