Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
55138 | xujindong | 跳表 (skiplist) | C++ | 解答错误 | 0 | 128 MS | 1036 KB | 1554 | 2022-08-09 11:34:15 |
#include<bits/stdc++.h> using namespace std; unsigned int SA,SB,SC; int p,A,B,T,n,k,m,a[100005],b[100005]; unsigned int rng61(){ SA^=SA<<16; SA^=SA>>5; SA^=SA<<1; unsigned int t=SA; SA=SB; SB=SC; SC^=t^SA; return SC; } void gen(){ scanf("%d%d%d%d%u%u%u%d%d",&n,&k,&m,&p,&SA,&SB,&SC,&A,&B); for(int i=1;i<=p;i++)scanf("%d%d",&a[i],&b[i]); for(int i=p+1;i<=n;i++){ a[i]=rng61()%A+1; b[i]=rng61()%B+1; } } int main(){ srand(time(NULL)),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()),srand(rand()); cin>>T; while(T--)gen(),cout<<rand()%n<<'\n'; return 0; }