QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#735122 | #8554. Bot Friends | Yansuan_HCl | Compile Error | / | / | C++14 | 1.1kb | 2024-11-11 17:35:13 | 2024-11-11 17:35:13 |
Judging History
answer
#include <bits/stdc++.h>
#define ms(x, v) memset(x, v, sizeof(x))
#define il __attribute__((always_inline)) static
#define U(i,l,r) for(int i(l),END##i(r);i<=END##i;++i)
#define D(i,r,l) for(int i(r),END##i(l);i>=END##i;--i)
using namespace std;
using ll = long long;
#define IC isdigit(c)
#define GC c=getchar()
void rd(auto &x) { x = 0; char GC; bool f = 0;
for (; !IC; GC) f |= c == '-';
for (; IC; GC) x = x * 10 + c - 48;
if (f) x = -x;
}
void rd(auto &x, auto &...y) { rd(x); rd(y...); }
#define meow(...) fprintf(stderr, __VA_ARGS__)
#define Assert(e, v) if (!(e)) { meow("AF@%d\n", __LINE__ ); exit(v); }
#define vc vector
#define eb emplace_back
#define pb push_back
const int N = 5005;
int n; char s[N];
void cx(int &x, int v) { x = max(x, v); }
void solve() {
scanf("%s", s + 1); n = strlen(s + 1);
int ans = -1;
int f[n + 1][n + 1], g[n + 1][n + 1]; ms(f, 0x3f); ms(g, 0x3f);
U
U (i, 0, n) {
ans = max(ans, vl + vr);
}
printf("%lld\n", ans);
}
int main() {
int T; rd(T);
while (T--) {
solve();
}
}
Details
answer.code:11:9: warning: use of ‘auto’ in parameter declaration only available with ‘-std=c++20’ or ‘-fconcepts’ 11 | void rd(auto &x) { x = 0; char GC; bool f = 0; | ^~~~ answer.code:16:9: warning: use of ‘auto’ in parameter declaration only available with ‘-std=c++20’ or ‘-fconcepts’ 16 | void rd(auto &x, auto &...y) { rd(x); rd(y...); } | ^~~~ answer.code:16:18: warning: use of ‘auto’ in parameter declaration only available with ‘-std=c++20’ or ‘-fconcepts’ 16 | void rd(auto &x, auto &...y) { rd(x); rd(y...); } | ^~~~ answer.code: In function ‘void solve()’: answer.code:34:9: error: ‘U’ was not declared in this scope 34 | U | ^ answer.code:36:12: error: ‘i’ was not declared in this scope 36 | U (i, 0, n) { | ^ answer.code:4:41: note: in definition of macro ‘U’ 4 | #define U(i,l,r) for(int i(l),END##i(r);i<=END##i;++i) | ^ answer.code:4:44: error: ‘ENDi’ was not declared in this scope 4 | #define U(i,l,r) for(int i(l),END##i(r);i<=END##i;++i) | ^~~ answer.code:36:9: note: in expansion of macro ‘U’ 36 | U (i, 0, n) { | ^ answer.code:40:20: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘int’ [-Wformat=] 40 | printf("%lld\n", ans); | ~~~^ ~~~ | | | | | int | long long int | %d answer.code:30:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 30 | scanf("%s", s + 1); n = strlen(s + 1); | ~~~~~^~~~~~~~~~~~~