feast.cpp:2: warning: ignoring '#pragma GCC optimization' [-Wunknown-pragmas]
2 | #pragma GCC optimization ("O3")
|
feast.cpp:3: warning: ignoring '#pragma GCC optimization' [-Wunknown-pragmas]
3 | #pragma GCC optimization ("unroll-loops")
|
feast.cpp:4:18: error: declaration does not declare anything [-fpermissive]
4 | #define int long long;
| ^~~~
feast.cpp:6:7: note: in expansion of macro 'int'
6 | const int N = 3e5 + 17;
| ^~~
feast.cpp:6:11: error: 'N' does not name a type
6 | const int N = 3e5 + 17;
| ^
feast.cpp:4:18: error: declaration does not declare anything [-fpermissive]
4 | #define int long long;
| ^~~~
feast.cpp:7:1: note: in expansion of macro 'int'
7 | int n, k;
| ^~~
feast.cpp:7:5: error: 'n' does not name a type; did you mean 'yn'?
7 | int n, k;
| ^
| yn
feast.cpp:8:13: error: 'N' was not declared in this scope
8 | long long a[N];
| ^
feast.cpp:4:18: error: template argument 2 is invalid
4 | #define int long long;
| ^~~~
feast.cpp:9:18: note: in expansion of macro 'int'
9 | pair <long long, int> f[N], m;
| ^~~
feast.cpp:9:21: error: expected unqualified-id before '>' token
9 | pair <long long, int> f[N], m;
| ^
feast.cpp:4:18: error: template argument 2 is invalid
4 | #define int long long;
| ^~~~
feast.cpp:10:25: note: in expansion of macro 'int'
10 | inline pair <long long, int> calc (long long c)
| ^~~
feast.cpp:10:1: error: 'inline' can only be specified for functions
10 | inline pair <long long, int> calc (long long c)
| ^~~~~~
feast.cpp:10:28: error: expected unqualified-id before '>' token
10 | inline pair <long long, int> calc (long long c)
| ^
feast.cpp: In function 'int32_t main()':
feast.cpp:34:12: error: 'n' was not declared in this scope; did you mean 'yn'?
34 | cin >> n >> k;
| ^
| yn
feast.cpp:34:17: error: 'k' was not declared in this scope
34 | cin >> n >> k;
| ^
feast.cpp:4:18: error: declaration does not declare anything [-fpermissive]
4 | #define int long long;
| ^~~~
feast.cpp:35:10: note: in expansion of macro 'int'
35 | for (int i = 1; i <= n; ++i)
| ^~~
feast.cpp:35:14: error: 'i' was not declared in this scope
35 | for (int i = 1; i <= n; ++i)
| ^
feast.cpp:35:27: error: expected ')' before ';' token
35 | for (int i = 1; i <= n; ++i)
| ~ ^
| )
feast.cpp:35:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
35 | for (int i = 1; i <= n; ++i)
| ^~~
feast.cpp:35:29: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
35 | for (int i = 1; i <= n; ++i)
| ^~
feast.cpp:35:31: error: 'i' was not declared in this scope
35 | for (int i = 1; i <= n; ++i)
| ^
feast.cpp:43:27: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
43 | long long mid = l + r >> 1;
| ~~^~~
feast.cpp:44:9: error: 'm' was not declared in this scope
44 | m = calc (mid);
| ^
feast.cpp:44:13: error: 'calc' was not declared in this scope
44 | m = calc (mid);
| ^~~~
feast.cpp:57:29: error: 'calc' was not declared in this scope
57 | long long ans = l * k + calc(l).first;
| ^~~~