QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#833571#852. Jellyfishucup-team5071#Compile Error//C++20992b2024-12-26 21:26:262024-12-26 21:26:33

Judging History

This is the latest submission verdict.

  • [2024-12-26 21:26:33]
  • Judged
  • [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();
}

詳細信息

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