QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#177537 | #7119. Longest Trip | triple321# | Compile Error | / | / | C++20 | 1.2kb | 2023-09-13 02:01:52 | 2024-04-28 08:46:33 |
Judging History
你现在查看的是最新测评结果
- [2024-04-28 08:46:33]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-09-13 02:01:52]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-09-13 02:01:52]
- 提交
answer
#include "longesttrip.h"
#include "grader.cpp"
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("Ofast")
using namespace std;
using namespace __gnu_pbds;
#define lg long long
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
vector<lg> adj[257];
vector<int> ans, cur;
lg vis[257];
void dfs(lg src)
{
vis[src] = true;
// cout << "ENTER " << src << '\n';
cur.push_back(src);
if(cur.size() > (lg)ans.size()) ans = cur;
for(auto it : adj[src])
{
if(vis[it]) continue;
dfs(it);
}
cur.pop_back();
vis[src] = false;
// cout << "LEAVE " << src << '\n';
return;
}
std::vector<int> longest_trip(int n, int d)
{
for(int i = 0; i < n; i++) adj[i].clear();
ans.clear();
for(int i = 0; i < n; i++)
{
for(int j = i+1; j < n; j++)
{
bool b = are_connected({i}, {j});
if(b)
{
adj[i].push_back(j);
adj[j].push_back(i);
}
}
}
for(int i = 0; i < n; i++)
{
dfs(i);
memset(vis, 0, sizeof(vis));
}
return ans;
}
/*
1
5 1
1
1 1
0 0 1
0 0 0 1
*/
Details
answer.code:2:10: fatal error: grader.cpp: No such file or directory 2 | #include "grader.cpp" | ^~~~~~~~~~~~ compilation terminated.