Problem | magick |
---|---|
User | astoria |
Submission Time | 2025-04-17 15:13:58 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
cover.cpp:3:31: error: ‘string’ does not name a type; did you mean ‘stdin’?
3 | int cover(int N, int K, const string& S)
| ^~~~~~
| stdin
cover.cpp: In function ‘int cover(int, int, const int&)’:
cover.cpp:5:15: error: ‘min’ was not declared in this scope; did you mean ‘std::min’?
5 | int lim = min(100000, N - K + 1); // SEARCH LIMIT (scores 100)
| ^~~
| std::min
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from cover.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:3456:5: note: ‘std::min’ declared here
3456 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
cover.cpp:9:34: error: invalid types ‘const int[int]’ for array subscript
9 | v = v * 10 + (S[i-1+t] - '0'); // C