zhangbo1000 @ 2024-12-02 12:50:17
rt,随便写了如下程序:
#include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
#include<cstring>
#include<algorithm>
#include<queue>
#include<set>
#include<deque>
#include<map>
#include<random>
#include<unordered_map>
using namespace std;
namespace code{
using ll=long long;
using ull=unsigned long long;
using uint=unsigned int;
#define F(i,x,y) for(int i=(x),__tt2__=(y);i<=__tt2__;i++)
#define R(i,x,y) for(int i=(x),__tt2__=(y);i>=__tt2__;i--)
#define _F(i,x,y) for(int i=(x),__tt2__=(y);i<__tt2__;i++)
#define _R(i,x,y) for(int i=(x),__tt2__=(y);i>__tt2__;i--)
#define debug(x) cerr<<#x<<'='<<(x)<<endl
map<int,int> a;
vector<int>tmp;
int main(){
int T,n,m,v,tot=0;
cin>>T>>n>>m>>v;
mt19937 rng((time(0)^T)*n/m+v);
F(i,1,100){
F(j,1,T){
a.clear();
tmp.clear();
bool check=0;
F(i,1,m){
int c=rng()%n+1,d=rng()%v+1;
if(a[c]==0)a[c]=d;
else if((a[c]!=d)){
if((i!=m)&&(j!=T))tot++;
check=1;
break;
}
tmp.push_back(c);
}
debug(tmp.size());
if(check)break;
}
}
debug(tot);
return 0;
}
}
signed main(){return code::main();}
它会输入
然后我把
by 心灵震荡 @ 2024-12-02 13:09:23
你怎么知道 T4 大样例也有刻意构造
by HKW0202 @ 2024-12-03 22:28:43
我也死在这了,前排哀悼