answer.code: In function ‘int main()’:
answer.code:27:14: error: ‘uint32_t’ was not declared in this scope
27 | vector<uint32_t> cost(k, -1);
| ^~~~~~~~
answer.code:5:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
4 | #include <queue>
+++ |+#include <cstdint>
5 | #include <vector>
answer.code:27:22: error: template argument 1 is invalid
27 | vector<uint32_t> cost(k, -1);
| ^
answer.code:27:22: error: template argument 2 is invalid
answer.code:27:34: error: expression list treated as compound expression in initializer [-fpermissive]
27 | vector<uint32_t> cost(k, -1);
| ^
answer.code:28:28: error: invalid types ‘int[std::__cxx11::basic_string<char>::size_type {aka long unsigned int}]’ for array subscript
28 | for (auto& s: v) cost[s.size() % k] = min(cost[s.size() % k], {s.size() / k + 1});
| ^
answer.code:28:53: error: invalid types ‘int[std::__cxx11::basic_string<char>::size_type {aka long unsigned int}]’ for array subscript
28 | for (auto& s: v) cost[s.size() % k] = min(cost[s.size() % k], {s.size() / k + 1});
| ^
answer.code:32:46: error: invalid types ‘int[int]’ for array subscript
32 | for (int s = 0; s < k; ++s) if (~cost[k] && ks[(l + s) % k] > c + cost[k] + (l + s) / k) {
| ^
answer.code:32:79: error: invalid types ‘int[int]’ for array subscript
32 | for (int s = 0; s < k; ++s) if (~cost[k] && ks[(l + s) % k] > c + cost[k] + (l + s) / k) {
| ^
answer.code:33:46: error: invalid types ‘int[int]’ for array subscript
33 | pq.push({ks[(l + s) % k] = c + cost[k] + (l + s) / k, (l + s) % k});
| ^
answer.code:33:18: error: no matching function for call to ‘std::priority_queue<std::array<int, 2>, std::vector<std::array<int, 2> >, std::greater<void> >::push(<brace-enclosed initializer list>)’
33 | pq.push({ks[(l + s) % k] = c + cost[k] + (l + s) / k, (l + s) % k});
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/queue:66,
from answer.code:4:
/usr/include/c++/13/bits/stl_queue.h:738:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::array<int, 2>; _Sequence = std::vector<std::array<int, 2> >; _Compare = std::greater<void>; value_type = std::array<int, 2>]’
738 | push(const value_type& __x)
| ^~~~
/usr/include/c++/13/bits/stl_queue.h:738:30: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::priority_queue<std::array<int, 2>, std::vector<std::array<int, 2> >, std::greater<void> >::value_type&’ {aka ‘const std::array<int, 2>&’}
738 | push(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_queue.h:746:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::push(value_type&&) [with _Tp = std::array<int, 2>; _Sequence = std::vector<std::array<int, 2> >; _Compare = std::greater<void>; value_type = std::array<int, 2>]’
746 | push(value_type&& __x)
| ^~~~
/usr/include/c++/13/bits/stl_queue.h:746:25: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::priority_queue<std::array<int, 2>, std::vector<std::array<int, 2> >, std::greater<void> >::value_type&&’ {aka ‘std::array<int, 2>&&’}
746 | push(value_type&& __x)
| ~~~~~~~~~~~~~^~~