新一代洛谷卡评测指南
警告:
仅供观赏,
请勿尝试!!!
我们知道,洛谷的普通题目有限制:测试点不得超过
然而,还有一个地方被我们忽略了:SPJ。
依然根据洛谷评测的性质,SPJ 对每个测试点最多运行
于是,我们可以设置
#include "testlib.h"
using namespace std;
const double EXPECTED_WASTE_TIME = 1.99;
double consumed_time()
{
return clock() * 1.0 / CLOCKS_PER_SEC;
}
int main(int argc, char* argv[])
{
registerTestlibCmd(argc, argv);
while(consumed_time() < EXPECTED_WASTE_TIME);
quitf(_ok, "Well done!");
}
接着提交下面的代码:
#include <bits/stdc++.h>
using namespace std;
const double EXPECTED_WASTE_TIME = 1.19;
double consumed_time()
{
return clock() * 1.0 / CLOCKS_PER_SEC;
}
int main()
{
while(consumed_time() < EXPECTED_WASTE_TIME);
return 0;
}
该方案无需管理员权限,可以在私有题目中操作,且一次提交最多能评测
但是,你以为这就结束了?没有!
还有一个地方被我们忽略了:交互库。
依然根据洛谷评测的性质,交互库对每个测试点最多运行
于是,我们可以设置
#include "testlib.h"
using namespace std;
int main(int argc, char* argv[])
{
registerInteraction(argc, argv);
int x;
cin >> x;
}
接着提交下面的代码:
#include <bits/stdc++.h>
using namespace std;
int main()
{
int x;
cin >> x;
}
该方案无需管理员权限,可以在私有题目中操作,且一次提交最多能评测