QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#344650 | #2476. Pizzo Collectors | PetroTarnavskyi# | Compile Error | / | / | C++20 | 966b | 2024-03-04 20:52:07 | 2024-03-04 20:52:07 |
Judging History
answer
void solve(int l, int r, int L, int R)
{
if (l == r || L == R)
return;
if (L + 1 == R)
{
FOR (i, l, r) f[i] = L;
return;
}
int M = (L + R) / 2;
int m = l;
if(L <= r)
{
RFOR(i, M + 1, l)
{
int a = e[i].F;
int b = e[i].S;
if(d.find(a) == d.find(b))
break;
m = i;
d.unite(a, b);
}
FOR(i, m, M + 1)
{
d.rollBack();
}
m = min(m, r);
}
else
{
int pos = L;
FOR(i, L, M + 1)
{
int a = e[i].F;
int b = e[i].S;
if(d.find(a) == d.find(b))
break;
pos = i;
d.unite(a, b);
}
if(pos != M)
{
RFOR(i, pos + 1, L)
{
d.rollBack();
}
m = r;
}
else
{
RFOR(i, r, l)
{
int a = e[i].F;
int b = e[i].S;
if(d.find(a) == d.find(b))
break;
m = i;
d.unite(a, b);
}
FOR(i, m, r)
{
d.rollBack();
}
}
}
solve(l, m, L, M);
solve(m, r, M, R);
}
详细
answer.code: In function ‘void solve(int, int, int, int)’: answer.code:7:22: error: ‘i’ was not declared in this scope 7 | FOR (i, l, r) f[i] = L; | ^ answer.code:7:17: error: ‘FOR’ was not declared in this scope 7 | FOR (i, l, r) f[i] = L; | ^~~ answer.code:15:22: error: ‘i’ was not declared in this scope 15 | RFOR(i, M + 1, l) | ^ answer.code:15:17: error: ‘RFOR’ was not declared in this scope 15 | RFOR(i, M + 1, l) | ^~~~ answer.code:25:17: error: ‘FOR’ was not declared in this scope 25 | FOR(i, m, M + 1) | ^~~ answer.code:29:21: error: ‘min’ was not declared in this scope 29 | m = min(m, r); | ^~~ answer.code:34:21: error: ‘i’ was not declared in this scope 34 | FOR(i, L, M + 1) | ^ answer.code:34:17: error: ‘FOR’ was not declared in this scope 34 | FOR(i, L, M + 1) | ^~~ answer.code:45:25: error: ‘RFOR’ was not declared in this scope 45 | RFOR(i, pos + 1, L) | ^~~~ answer.code:53:25: error: ‘RFOR’ was not declared in this scope 53 | RFOR(i, r, l) | ^~~~