社区讨论
hack 所有题解(?)
P3577[POI 2014] TUR-Tourism参与者 29已保存回复 31
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 31 条
- 当前快照
- 1 份
- 快照标识符
- @mhj1oxmv
- 此快照首次捕获于
- 2025/11/03 19:16 4 个月前
- 此快照最后确认于
- 2025/11/03 20:35 4 个月前
数据链接。
数据生成器:
CPP// by wukaichen888
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int N=1e6+5;
int n=20000;
int X[N],Y[N],tot1;
mt19937 rnd(time(0));
int get(int l,int r){return (rnd()&1073741823ll)%(r-l+1)+l;}
void link(int x,int y){
if(x>y) swap(x,y);
++tot1;X[tot1]=x,Y[tot1]=y;}
int main(){
freopen("data1.in","w",stdout);
// hack
for(int i=1;i<=8;i++) link(i,i+1);
for(int i=10;i<=20000;i++) link(9,i);
// output
printf("%d %d\n",n=20000,tot1);
for(int i=1;i<=n;i++) printf("%d ",get(9000,10000)); printf("\n");
for(int i=1;i<=tot1;i++) printf("%d %d\n",X[i],Y[i]);
return 0;}
以下默认为 C++20 O2 环境下的测试
-
https://www.luogu.com.cn/article/rx7o4ekl TLE,2.26s。C++14 O2 环境下为 2.77s。
-
https://www.luogu.com.cn/article/k4z58h2x TLE,2.51s。C++14 O2 环境下为 3.01s。
-
https://www.luogu.com.cn/article/457w7k6c WA,7ms。关掉 O2 仍然 WA。
-
https://www.luogu.com.cn/article/7ogmftnh TLE,3.68s。
-
https://www.luogu.com.cn/article/37gwwjfj TLE,4.00s。
-
https://www.luogu.com.cn/article/b6wb5t9r 草拟吗的代码呢。甚至完隐?
-
https://www.luogu.com.cn/article/o6yhbbd2 TLE,4.63s。
-
https://www.luogu.com.cn/article/nt2669wy 草拟吗的代码呢。甚至完隐?
-
https://www.luogu.com.cn/article/0y12slxr TLE,2.35s。C++14 O2 环境下为 2.20s。
-
https://www.luogu.com.cn/article/k6rzysq5 TLE,2.52s。C++14 O2 环境下为 3.15s。
回复
共 31 条回复,欢迎继续交流。
正在加载回复...