Problem packingducks
User Halud
Submission Time 2025-01-21 13:03:44
Score 0
Max Time N/A
Max Memory N/A

Compile Error

packingducks.cpp: In function ‘int main()’:
packingducks.cpp:13:17: error: invalid types ‘long long int[long long int]’ for array subscript
13 | cin >> arr[i];
| ^
packingducks.cpp:4:12: error: request for member ‘push_back’ in ‘sum.std::vector<long long int>::operator[](0)’, which is of non-class type ‘__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type’ {aka ‘long long int’}
4 | #define pb push_back
| ^~~~~~~~~
packingducks.cpp:16:10: note: in expansion of macro ‘pb’
16 | sum[0].pb(0);
| ^~
packingducks.cpp:21:23: error: ‘begin’ was not declared in this scope
21 | for(auto x : sum[i]){
| ^
packingducks.cpp:21:23: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from packingducks.cpp:1:
/usr/include/c++/9/v