QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#833571 | #852. Jellyfish | ucup-team5071# | Compile Error | / | / | C++20 | 992b | 2024-12-26 21:26:26 | 2024-12-26 21:26:33 |
Judging History
This is the latest submission verdict.
- [2024-12-26 21:26:33]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-12-26 21:26:26]
- Submitted
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve()
{
stack<int> s;
vector<vector<pair<int, int>>> ve(maxn);
int num = 0, dfstime = 0;
vector<int> col(maxn), dfn(maxn), low(maxn);
auto tarjan = [&](auto &self, int u) -> void
{
s.push(u);
dfn[u] = low[u] = ++dfstime;
for (auto [?, ?] : ve[u])
{
if (!dfn[v])
{
self(self, v);
low[u] = min(low[u], low[v]);
}
else if (!col[v])
low[u] = min(low[u], dfn[v]);
}
if (dfn[u] == low[u])
{
col[u] = ++num;
while (s.top() != u)
{
col[s.top()] = num;
s.pop();
}
s.pop();
}
};
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int T;
cin >> T;
while (T--)
solve();
}
Details
answer.code: In function ‘void solve()’: answer.code:8:39: error: ‘maxn’ was not declared in this scope 8 | vector<vector<pair<int, int>>> ve(maxn); | ^~~~ answer.code: In lambda function: answer.code:15:20: error: expected identifier before ‘?’ token 15 | for (auto [?, ?] : ve[u]) | ^ answer.code:15:20: error: expected ‘]’ before ‘?’ token 15 | for (auto [?, ?] : ve[u]) | ^ | ] answer.code:15:19: error: empty structured binding declaration 15 | for (auto [?, ?] : ve[u]) | ^ answer.code:17:22: error: ‘v’ was not declared in this scope; did you mean ‘ve’? 17 | if (!dfn[v]) | ^ | ve