由于个人保存不当,代码中中文注释全没了……。
可能等官方的程序包出来后再去修改(前提是那时我还在役)。
默哀区
在代码中搜索 //freopen,共在 个文件中找到了 个结果。
其中大部分是诈骗,但有 个不是诈骗。大概率数错了。但我懒。
默哀。
SD-S00170
#include<bits/stdc++.h>
#define push push_back
#define a first
#define b second
//rp++
using namespace std;
int n,m,k,x,y,z;
struct s{
int x,y,z;
};
vector<s> v;
bool cmp(s a,s b){
a.z<b.z;
}
int f[2000005];
int t[2000005];
bool p[2000005];
bool find(int x){
if(f[x]==x)return x;
else return f[x]=find(f[x]) ;
}
int main(){
//freopen(".in","r",stdin);
//freopen(".out","w",stdout);
cin>>n>>m>>k;
for(int i=1;i<=n+k;i++){
f[i]=i;
}
for(int i=1;i<=m;i++){
cin>>x>>y>>z;
v.push({x,y,z});
}
for(int i=1;i<=k;i++){
cin>>t[i+m];
for(int j=1;j<=n;j++){
cin>>z;
v.push({i+m,j,z});
}
}
sort(v.begin(),v.end(),cmp);
int h=0;
for(int i=0;i<m+n*k;i++){
int tx=find(v[i].x),ty=find(v[i].y);
cout<<v[i].x<<' '<<v[i].y<<' '<<v[i].z<<'\n';
if(tx!=ty){
f[tx]=ty;
h+=v[i].z;
if(p[tx]!=1){
p[tx]=1;
h+=t[tx];
}
if(p[ty]!=1){
p[ty]=1;
h+=t[ty];
}
}
}
cout<<h;
return 0;
}
/*
4 4 2
1 4 6
2 3 7
4 2 5
4 3 4
1 1 8 2 4
100 1 3 2 4
*/
SD-S00223
#include<bits/stdc++.h>
using namespace std;
const long long mod=998244353;
long long n,m,c[505],sum,ans=1;
string s;
int main(){
freopen("employ3.in","r",stdin);
//freopen("employ.out","w",stdout);
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin>>n>>m>>s;
for(int i=1;i<=n;i++){
cin>>c[i];
}
s=" "+s;
for(int i=1;i<=n;i++){
sum+=(s[i]=='1');
}
if(sum<m){
cout<<"0";
return 0;
}
if(sum==n){
for(int i=1;i<=n;i++){
ans=ans*i%mod;
}
cout<<ans;
return 0;
}
return 0;
}
不再列举了。
但这种诈骗很有必要贴出来:
SD-S00453
#include<iostream>
using namespace std;
int main(){
int n,m;
freopen("replace.in","r",stdin);
freopen("replace.out","w",stdout);
cin>>n>>m;
for(int i=1;i<=m;i++){
cout<<0<<endl;
}
//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen
return 0;
}共 个freopen 。神经。
搜索 <bits\stdc++.h> ,共有 个结果。
但有一个不是诈骗:
SD-S00433
#include<bits\stdc++.h>
#define _for(i,a,b) for(int i=(a);i<=(b);i++)
#define _rof(i,a,b) for(int i=(a);i>=(b);i--)
#define int ll
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
inline int read(){
int f=1,num=0;
char c=getchar();
while(c<'0' || c>'9'){if(c=='-')f=-1;c=getchar();}
while(c>='0' && c<='9'){num=(num<<3)+(num<<1)+(c^48);c=getchar();}
return f*num;
}
int n,m,k;
int res;
struct e{
int x,y,v,tp;
bool operator>(const e& w)const{
return v>w.v;
}
};
priority_queue<e,vector<e>,greater<e>> q;
//vector<pair<int,int>> edge[10005];
bool usd[10005];
int c[15],d[15];
int p[15][10005];
int fa[10005];
inline int find(int u){return u==fa[u]?u:fa[u]=find(fa[u]);}
inline void solve(){
int cnt=n-1;
_for(i,1,n) fa[i]=i;
while(cnt--){
e x;
while(1){
x=q.top(),q.pop();
if(find(x.x)!=find(x.y) && !usd[x.tp]) break;
}
fa[find(x.x)]=find(x.y);
// printf("%lld %lld %lld %lld\n",x.x,x.y,x.v,x.tp);
res+=x.v;
if(x.tp){
usd[x.tp]=1;
_for(i,1,n) if(i!=d[x.tp]){
q.push({d[x.tp],i,p[x.tp][i],0});
}
}
}
}
signed main(){
freopen("road.in","r",stdin);
freopen("road.out","w",stdout);
n=read(),m=read(),k=read();
_for(i,1,m){
int x=read(),y=read(),v=read();
q.push({x,y,v,0});
}
_for(i,1,k){
c[i]=read();
int mn=1e9+10,ind=1;
_for(j,1,n){
p[i][j]=read();
if(p[i][j]<=mn)
mn=p[i][j],ind=j;
}
// printf("%lld\n",ind);
d[i]=ind;
_for(j,1,n) if(j!=ind){
q.push({ind,j,mn+c[i]+p[i][j],i});
}
}
solve();
printf("%lld\n",res);
return 0;
}
//i love ccf
(梦熊数据) -> 。
祝好。
搜索 #incldue<windows.h>,共 个结果。且不是诈骗,并导致挂分。
SD-S00307
#include<bits/stdc++.h>
#include<windows.h>
#define ll long long
#define sdn cout
#define pb push_back
using namespace std;
const int N = 1e4 + 100,M = 2e6 + 100,INF = 1e9 + 7;
int a[12][N],idx,n,m,k,op[11];
ll sm,ans;
struct edge{
int x,y,z;
bool operator <(const edge &p)const{
return z < p.z;
}
}e[M],e1[M];
vector <int> lk[N];
struct sorasaki_hina{
int f[N],siz[N];
void init(){
for(int i = 1;i < N;i ++) f[i] = i,siz[i] = 1;
}
int find(int x){
if(f[x] != x) f[x] = find(f[x]);
return f[x];
}
void mg(int x,int y){
if(siz[x] > siz[y]) swap(x,y);
f[x] = y,siz[y] += siz[x];
}
}b;
inline void check(){
sm = 0;b.init();
vector <int> lk[12];
int cnt = 1,x = 1,opt = n;
for(int i = 1;i <= m;i ++){
e1[i] = e[i];
}
int idx = m;
for(int i = 1;i <= k;i ++){
if(op[i]){
sm += a[i][0];opt ++;
for(int j = 1;j <= n;j ++){
e1[++idx] = (edge){i+n,j,a[i][j]};
}
}
}
sort(e1+1,e1+idx+1);
while(cnt < opt&&x<=idx){
int u = e1[x].x,v = e1[x].y;
int uu = b.find(u),vv = b.find(v);
if(uu == vv){
x ++;continue;
}
sm += e1[x].z;b.mg(uu,vv);
if(u < v) swap(u,v);
if(u > n) lk[u-n].pb(v);
x ++;cnt ++;
}
for(int i = 1;i <= k;i ++){
if(lk[i].size()==1)
sm -= (a[i][0]+a[i][lk[i][0]]);
}
ans = min(ans,sm);
}
inline void dfs(int x){
if(x > k){
check();
return ;
}
op[x] = 0;dfs(x+1);
op[x] = 1;dfs(x+1);
}
inline int read(){
int x = 0;
char c = getchar();
while(c < '0' || c > '9'){
c = getchar();
}
while(c <= '9' && c >= '0'){
x = x*10+(c-'0');
c = getchar();
}
return x;
}
int main(){
freopen("road.in","r",stdin);
freopen("road.out","w",stdout);
b.init();ans = 1e18;
bool f = 1;
n = read(),m = read(),k = read();
for(int i = 1;i <= m;i ++){
int u,v,w;
u = read(),v = read(),w = read();
e[i] = (edge){u,v,w};
}
for(int i = 1;i <= k;i ++){
for(int j = 0;j <= n;j ++){
a[i][j] = read();
}
if(a[i][0] != 0) f = 0;
bool ff = 0;for(int j = 1;j <= n;j ++){
if(a[i][j] == 0) ff = 1;
}
f = f&ff;
}
if(f){
for(int i = 1;i <= k;i ++){
op[i] = 1;
}
check();
sdn<<ans;
return 0;
}
dfs(1);
sdn<<ans<<endl;
return 0;
}
搜索 .ans" ,有 个结果。
去除对拍,还有 个结果。
其中有 个不是诈骗,并由 个人贡献。
默哀。
SD-S01103
这个人在 个文件中贡献了 次。
#include<bits/stdc++.h>
using namespace std;
int n,q,L,lena,minn=99999999,maxn,ans;
string s[200001][2],t1,t2;char a[10001];
int main()
{
freopen("replace.in","r",stdin);
freopen("replace.ans","w",stdout);
cin>>n>>q;
for(int i=1;i<=n;i++){cin>>s[i][0]>>s[i][1];}
for(int i=1;i<=q;i++)
{cin>>t1>>t2;
/*
ans=0;
L=t1.length();
for(int j=1;j<=L;j++)
{
if(t1[j]!=t2[j])
{
maxn=max(j,maxn);
minn=min(j,minn);
}
}
lena=maxn-minn+1;
for(int j=1;j<=n;j++)
for(int g=1;g<=s[i][0].length();g++)
{
}
*/
cout<<0<<endl;
}
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
freopen("road.in","r",stdin);
freopen("road.ans","w",stdout);
int m,n,k,a,b,c;
cin>>m>>n>>k;
for(int i=1;i<=3*m+k*(n+1);i++) cin>>a;
cout<<0;
return 0;
}#include<bits/stdc++.h>
using namespace std;
int a[100001][3],A,B,C,n,t,maxn,happy,b[20001],c[20001];
int club(int stu)
{
if (stu>=n+1) maxn=max(happy,maxn);
else
{
if(A>0){A--; happy+=a[stu][0]; club(stu+1); A++; happy-=a[stu][0];}
if(B>0){B--; happy+=a[stu][1]; club(stu+1); B++; happy-=a[stu][1];}
if(C>0){C--; happy+=a[stu][2]; club(stu+1); C++; happy-=a[stu][2];}
}
}
int main()
{
freopen("club.in","r",stdin);
freopen("club.ans","w",stdout);
cin>>t;
for(int i=1;i<=t;i++)
{
maxn=0;
cin>>n;
for(int j=1;j<=n;j++)
{
cin>>a[j][0]>>a[j][1]>>a[j][2];
}
if(n>3)
{if(a[1][2]==a[2][2]&&a[3][2]==a[2][2]&&a[3][2]==0)
{if(a[1][1]==a[2][1]&&a[3][1]==a[2][1]&&a[3][1]==0)
{A=n/2;
for(int j=1;j<=n;j++){b[a[j][0]]++;}
for(int j=20000;A>0;j--)
{
while(b[j]>0&&A>0)
{
A--; maxn+=j; b[j]--;
}
}
cout<<maxn<<endl; continue;
}
else
{
A=B=n/2;
for(int j=1;j<=n;j++)
{
maxn+=max(a[j][0],a[j][1]);
b[abs(a[j][0]-a[j][1])]++;
if(a[j][0]>a[j][1]) {A--;c[abs(a[j][0]-a[j][1])]++;}
else {B--;b[abs(a[j][0]-a[j][1])]++;}
}
if(A<0){
A=abs(A);
for(int j=0;A>0;j++)
{
while(c[j]>0&&A>0)
{
A--; maxn-=j; c[j]--;
}
}}
else
{
for(int j=0;A>0;j++)
{
while(b[j]>0&&A>0)
{
A--; maxn-=j; b[j]--;
}
}
}
cout<<maxn<<endl; continue;
}
}
else
if(n>9999)
{
for(int j=1;j<=n;j++)
maxn+=max(a[j][0],max(a[j][1],a[j][2]));
cout<<maxn<<endl; continue;
}
}
A=B=C=n/2;
club(1);
cout<<maxn<<endl;
}
return 0;
}#include<bits/stdc++.h>
using namespace std;
long long n,m,c[501],b[501],sum,ans;//c���� b��Ŀ
bool p[501],lu[501],flag;//¼Ϊ1
string a;
const int mo=998244353;
//998244353
long long jc(int x)
{
int u=1;
for(int i=x;i>=1;i--) u=(u*i)%mo;
return u;
}
void pailie(int x,int y)//��ǰ���� ��¼ȡ
{
if(x>n) return;
int temp,s; s=y;
for(int i=1;i<=n;i++)
{
if(p[i]==0)
{if(b[x]==1)
{if(x>c[i])
{
temp=0;
for(int j=x-c[i];j<x;j++) temp+=lu[j];
if(temp!=0) {lu[x]=1; s=y-1;}
}
else {lu[x]=1; s=y-1; }
}
if(s==0) {ans=(ans+jc(n-x))%mo;}
else {p[i]=1;pailie(x+1,s);p[i]=0;lu[x]=0;}
}
}
}
int main()
{
freopen("employ.in","r",stdin);
freopen("employ.ans","w",stdout);
cin>>n>>m>>a;
for(int i=1;i<=n;i++)
{
cin>>c[i];
b[i]=a[i-1]-'0';
sum+=b[i];
if(c[i]==0) flag=1;
}
if(m==n){if(sum!=n||flag!=0) cout<<0; else cout<<jc(n); return 0;}
if(m>sum){cout<<0; return 0;}
pailie(1,m);
cout<<ans;
return 0;
}
祝好。
另一个人是: SD-S00168。
以下数字统计可能有误,欢迎修改。
feropen 出现了 次,int mian 出现 次。
好消息:全部是诈骗。
road1.in/out/ans 在 freopen 里出现了 次,有 个是诈骗。
road2.in/out/ans 在 freopen 里出现了 次,有 个是诈骗。
road3.in/out/ans 在 freopen 里出现了 次,有 个是诈骗。
road4.in/out/ans 在 freopen 里出现了 次,有 个是诈骗。
replace1.in/out/ans 在 freopen 里出现了 次,有 次是诈骗。
replace2.in/out/ans 在 freopen 里出现了 次,有 次是诈骗。
replace3.in/out/ans 在 freopen 里出现了 次,有 次是诈骗。
replace4.in/out/ans 在 freopen 里出现了 次,有 次是诈骗。
club1.in/out/ans 在 freopen 里出现了 次,有 次是诈骗。
club2.in/out/ans 在 freopen 里出现了 次,有 次是诈骗。
club3.in/out/ans 在 freopen 里出现了 次,有 次是诈骗。
club4.in/out/ans 在 freopen 里出现了 次,有 次是诈骗。
club5.in/out/ans 在 freopen 里出现了 次,有 次是诈骗。
employ1.in/out/ans 在 freopen 里出现了 次,有 次是诈骗。
employ2.in/out/ans 在 freopen 里出现了 次,有 次是诈骗。
employ3.in/out/ans 在 freopen 里出现了 次,有 次是诈骗。
employ4.in/out/ans 在 freopen 里出现了 次,有 次是诈骗。
employ5.in/out/ans 在 freopen 里出现了 次,有 次是诈骗。
fuck 出现了 次,并且 fuck ccf 出现了 次。禁赛三年警告。