We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug 描述一下这个 Bug 在通信题(部分函数)的评测中,可以只在一个文件中实现题目所要求的函数,从而跳过通信,直接获取信息,可以较为容易地得出答案。
To Reproduce 如何复现 如这道题:JOISC 2019 Day 2 T3
可以用以下代码 AC
//Azer.cpp #include "Baijan.h" #include "Azer.h" #include <bits/stdc++.h> using namespace std; namespace { const int INF = 1000000007; int n; vector<pair<int, int> > *E; vector<int> dist; priority_queue<pair<int, int>, vector<pair<int, int> >, greater<pair<int, int> > > PQ; } void InitA(int N, int A, std::vector<int> U, std::vector<int> V, std::vector<int> C) { n = N; E = new vector<pair<int, int> >[N]; for(int i = 0; i < A; i++) { E[U[i]].push_back(make_pair(V[i], C[i])); E[V[i]].push_back(make_pair(U[i], C[i])); } } void InitB(int N, int B, std::vector<int> S, std::vector<int> T, std::vector<int> D) { n = N; for(int i = 0; i < B; i++) { E[S[i]].push_back(make_pair(T[i], D[i])); E[T[i]].push_back(make_pair(S[i], D[i])); } PQ.push({0, 0}); dist.assign(n, INF); dist[0] = 0; std::vector<bool> vis(n, false); while (PQ.size()) { int u = PQ.top().second; PQ.pop(); if (vis[u]) continue; vis[u] = true; for (auto &c : E[u]) { int v = c.first, w = c.second; if (dist[v] > dist[u] + w) { dist[v] = dist[u] + w; PQ.push({dist[v], v}); } } } } void ReceiveA(bool x) { } void ReceiveB(bool y) { } std::vector<int> Answer() { return dist; }
//Baijan.cpp #include "Baijan.h" #include <queue> using namespace std;
相关数据:Data,grader 等
Environment: 环境:
Additional context 其他信息 目前看来,只要将源文件同时编译就可以被 Hack 。
一种解决方法是用多个进程分开编译,再用文件输入输出进行交互。
The text was updated successfully, but these errors were encountered:
这应当是写grader的人处理的问题吧
就你不能假定grader会怎样写
或许lemonlime需要提供一个接口?
Sorry, something went wrong.
这应该无论 grader 怎么写都可以被 hack,只要两个源文件放在一起编译。
可以参考 CMS。
我来看看,感觉跨平台有些麻烦
似乎可以要求额外提供文件内定义的函数信息,然后生成一个几乎为空的程序仅调用相关函数,一旦编译的时候出错就直接判为编译错误。
No branches or pull requests
Describe the bug
描述一下这个 Bug
在通信题(部分函数)的评测中,可以只在一个文件中实现题目所要求的函数,从而跳过通信,直接获取信息,可以较为容易地得出答案。
To Reproduce
如何复现
如这道题:JOISC 2019 Day 2 T3
可以用以下代码 AC
相关数据:Data,grader 等
Environment:
环境:
Additional context
其他信息
目前看来,只要将源文件同时编译就可以被 Hack 。
一种解决方法是用多个进程分开编译,再用文件输入输出进行交互。
The text was updated successfully, but these errors were encountered: