CSP-2021-J/S的迷惑行为大赏 v1.1

First Post:

Last Update:

Word Count:
2.7k

Read Time:
15 min

所有内容全部来源于网络,在此收集,以~(图一乐)~作为历史教训

freopen类

注释人

1
2
//freopen("network.in","r",stdin);
//freopen("network.out","w",stdout);

逆行人&&我也进行了文件操作人

1
2
freopen("airport.in","r",stdin);
freopen("airport.out","r",stdout);

ans人

1
2
freopen("airport.in","r",stdin);
freopen("airport.ans","w",stdout);

txt人

1
2
freopen("network.in.txt","r",stdin);
freopen("network.out.txt","w",stdout);

高端文件操作人&文件名人

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include<bits/stdc++.h>
using namespace std;
int m1[1001][1001],m2[1001][1001],cnt=0;
int main(){
freopen("airsport.in","r",stdin);
freout("airsport.out","w",stdout);
int a,n,m1,m2;
cin>>a>>n>>m1>>m2;
for(int i=0;i<=n;i++){
if(m1>m2){
m2=m1;
cnt=cnt+1;
}
}
if(a==3){
cout<<7;
}
if(a==2){
cout<<4;
}
if(a==10){
cout<<32;
}

freopen("airsport.in",work);
freout("airsport.out",work);
return 0;
}

不要你的输入人&&无扩展名人

(T1,T2,T3,T4同法,输入一数,又重新赋一值输出)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <bits/stdc++.h>
using namespace std;

int a[100005];
int main(){
freopen("airport","r",stdin);
freopen("airport","w",stdout);

int c=0;
scanf("%d",&c);
c=7;
printf("%d",c);

fclose(stdin);
fclose(stdout);
return 0;
}

忘删数字人&&但未完全忘删人

1
2
freopen("traffic1.in","r",stdin);
freopen("traffic.out","w",stdout);

文件名多敲空格人

1
2
freopen(" palin.in","r",stdin);
freopen("palin.out","w",stdout);

输出类

卑微人

1
2
while(1)
cout<<"ccfwansui!"<<endl;

恶臭人

1
cout<<114514<<endl;

幸运数字人

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include<bits/stdc++.h>
using namespace std;

int main(){
freopen("bracket.in","r",stdin);
freopen("bracket.out","w",stdout);
int a,b;
string s;
cin>>a>>b>>s;

int c;
c=(a+b)%13;

cout<<c;
return 0;
}

#include<bits/stdc++.h>
using namespace std;

int a[10000][10000];

int main(){
freopen("traffic.in","r",stdin);
freopen("traffic.out","w",stdout);
int n,m,t;
cin>>n>>m>>t;
for(int i=0;i<(n-1);i++){
for(int j=0;j<m;j++){
cin>>a[i][j];
}
}
for(int i=0;i<n;i++){
for(int j=0;j<(m-1);j++){
cin>>a[i][j];
}
}
int sum;
sum=n+m+t;
sum=sum%13;
cout<<sum;
return 0;
}

深情•表白人

1
2
3
4
5
6
7
#include<iostream>
using namespace std;
int main(){
printf("i love u deeplt\njust my love into the sea~~\ndo you understand?\nmy only ba~by~");
return 0;
}
//i

高端骗分人

1
2
3
4
5
6
7
8
9
#include<iostream>

using namespace std;

int main(){
cout<<-1;

return 0;
}

输样例也懒得输人

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
(cout<<;)

#include <iostream>
#include <cstdio>
using namespace std;
int main(){
freopen("traffic.in","r",stdin);
freopen("traffic.out","w",stdout);
int t,n,m;
cin>>t>>n>>m;
int a[510][510];
int b[510][510];
for(int i=1;i<n;i++)
{
for(int j=0;j<m;j++)
{
cin>>a[i][j];
}
}
for(int i=0;i<n;i++)
{
for(int j=1;j<m;j++)
{
cin>>b[i][j];
}
}
if(t==2&&n==3&&m==1)
{
cout<<12;
}
if(t==18&&n==18&&m==5)
{
cout<<;
}if(t==100&&n==95&&m==5)
{
cout<<;
}
if(t==98&&n==100&&m==25)
{
cout<<;
}
else
{
cout<<;
}
}

随机人

1
2
3
4
5
6
7
8
9
10
11
12
#include<bits/stdc++.h>
using namespace std;
int main(){
freopen("bracket.in","r",stdin);
freopen("bracket.out","w",stdout);
int n;
srand(time(0));
n=rand();
n%=1000;
cout<<n;
return 0;
}

变量类

中英结合起变量名人

1
2
3
4
5
int nei[100000][2],wai[100000][2];
int n,m1,m2,i,t,j,h,akali,lishuangle;
int neizong=0,waizong=0,zongans=0;
int nlastgo=0,wlastgo=0,zonglastgo=0;
int nnei=0,nwai=0;

ab人

1
2
3
4
5
6
7
8
9
10
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;

cout<<5;
return 0;
}

素质人

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
struct fuck{
int g;
int cur;
int fir;
int las;
};
//fuck[i].g:第i个廊桥的飞机数
//fuck[i].cur:第i个廊桥是国际/国内(0为国内,1为国际,方便sort)
//fuck[i].fir:第i个廊桥的第一架飞机的到达时间,同上,方便sort
//fuck[i].las:第i个廊桥的最后一架飞机的离开时间,方便预处理sort
fuck plane[200006];
bool cmp1(fuck a,fuck b){
// if(a.cur<b.cur)return 1;
// else if(a.cur>b.cur) return 0;
// else
return a.las<b.las;
}
bool cmp2(fuck a,fuck b){
// if(a.cur<b.cur)return 1;
// else if(a.cur>b.cur) return 0;
// else
return a.fir<b.fir;
}

注释类

注释风趣人

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(……省略部分代码)

……
#define PROB "airport" //不要忘记删除数字
……
if(vis[e[i2].id])//完了,码风乱了
……
ifp=fopen(PROB ".in","r");
……
return 0;
}
//#include<bits/stdc++.h>
//还是想要柠檬,,,
/***
先打个暴力?
感觉像经典问题
1e5 O(nsqrtn)最多

想模拟退火

考虑两边分别不严格地满足单调性? //吗
抵达、离开时刻非有序!!!
先退火要不 O(kn)

我是sb,打了3.5h错误暴力
***/

文 明 人

1
f[p+2][r]+=f[l][k]+f[k+1][r]//Fuck you CCF!

多重经典类

注释人&gets()人&样例人

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include<bits/stdc++.h>
using namespace std;
int main()
{
// freopen("palin.in","r",stdin);
// freopen("palin.out","w",stdout);
int t,n,m;
char a[500020],b[500020];
cin>>t;
cin>>n;
gets(a);
cin>>m;
gets(b);
if(t==2)
cout<<"LRRLLRRRRL"<<endl<<"-1";
else
{
cout<<-1<<endl;
cout<<-1<<endl;
cout<<"LLLLLLLLLLLLRLLLLLLLRRLRLLLLLLLLLLLLLLRLLLRRRLRLRLLRLLLLRRLLLLLRLLLLLRLLRRLLLLLLLLLLRRLLLLLLLRLLLLLLLRLRLLLRRRLRRLLRLLLL"<<endl;
cout<<-1<<endl;
cout<<"RRRRRRRRRRRRRRRRRRRRRRRRRRRRLRRRRRRRRRRLLLLLLLRRLLLLLLLRRLLLLLRRRLLLLLLLLLRRRLRL"<<endl;
cout<<-1<<endl<<-1<<endl;
cout<<"LLRRLLLRRLLRRLLLLLLLRLLLLLLLLLLLLRLLLLRL"<<endl;
cout<<-1<<endl<<-1<<endl;
cout<<"LLLLRRRRLLLLLLLLLRLLRRRLLLLLLRLLLLLRLLLL"<<endl;
cout<<-1<<endl<<-1<<endl;
cout<<"LLLLLLLLLLLLLLLLLLLLLLLLLLLRLLLLLLLLLLLLLLLLLLRRLLLLRLLLRLLLLRRRRLRRLLLRRRLLLLLLRRLLRRRRLRRRRRRRRRLLRRRRLRRRRRRRRLLRRRRLLLLLRRRRRRLLLRRRLRRLLLRLLLLRLRRRRLRRLLLL"<<endl;
cout<<-1<<endl<<-1<<endl<<-1<<endl;
cout<<"LRLLLRRRRRLLLLRRRRLLLRRLRRLLLLLRLLRLLLLLLRLLRLLLRLLLLRRLLLLLRLLLLLLRRLLLLLLLLLLL"<<endl;
cout<<-1<<endl;
cout<<"LRRLRLLRRLLRLRLRLLLLRRRLLRRLLRRRRLLLLLRL"<<endl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<<endl<<-1<<endl;
cout<<"LRRRRRRLLRRRRRRRRRRRRRRRRRRRLRLRRRRLLRRL"<<endl;
cout<<-1<<endl<<-1<<endl<<-1<<endl;
cout<<"LRRRRRRRRRRRRLRRRRRLRRLRRRRRRRRRRRRRRLLL"<<endl;
cout<<-1<<endl<<-1<<endl<<-1<<endl;
cout<<"LLLRLLLLLRLLRRLLLLLLRRLLLLLRLLLLRRRLLLRLRRLRRRRLRRRRRRRRRRRRRLRLRRLRRRRRRRRLLRRL"<<endl;
cout<<-1<<endl;
cout<<"LLLLLLLLLLLLLLLLLLLLLLLLLLRLLLLRLLRLRLLLLLLLLLLRRLRLRRLLRRLRRLLRLLLRLLLLRLLLLLRL"<<endl;
cout<<-1<<endl;
cout<<"LLLLLRLRLLLRLLLLLLRLLLLLLLLLLLLLLLLRLLRL"<<endl;
cout<<-1<<endl<<-1<<endl;
cout<<"LLLRLRLLRRRRRRRRRRLRRRRRRRRLRRLLRRRLLRRLLLLLRRRRRRRRLLLLRRRLLLRRRRRRRRRRRRLRLLRL"<<endl;
cout<<-1<<endl;
cout<<"LLLLRRLRRRRLRLRRRLLLLRLLRRLLRRLRLRRLRRLLLRLRRRRRRRLLLRRLRRLLRRRLRRRRLRRRLLLLLRRL"<<endl;
cout<<-1<<endl<<-1<<endl<<-1<<endl;
cout<<"RRRRRRLRRRRLRRRRLLRRRRLRRRRLRRLRRRRLRRRLLLLRLLRLLLLLLLLLLLLLRLLLLLRLLRLLLLLLLRLLLLLLLRRRLLLLRLLLLLLLLLRLLLLLLLLLLLLRLLLL"<<endl;
cout<<-1<<endl<<-1<<endl;
cout<<"LRLRLLLLRRLRRRLLRLLLLRLLLLLLLRRRLLLRRLLL"<<endl;
cout<<-1<<endl;
cout<<"LLLLRRLLRRLLLRLLLLLLLLLLLLLRLLLRLLLLRLLLLLLLRLRLLLLRRLLLLLLRRLLLLLLLLRLLLLLLLLLL"<<endl<<-1<<endl<<-1;
}
fclose(stdin);
fclose(stdout);
return 0;
}

忘删数字人&注释了但未完全注释人&样例人

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include<cstdio>
#include<iostream>

using namespace std;

int main(){
freopen("traffic2.in","r",stdin);
//freopen("traffic.out","w",stdout);
int n,m,T;
cin>>n>>m>>T;
if(n==2 && m==3 && T==1){
cout<<12;
}
if(n==18 && m==18 && T==5665097){
cout<<9184175<<endl;
cout<<181573<<endl;
cout<<895801<<endl;
cout<<498233<<endl;
cout<<0<<endl;
}
if(n==100 && m==95 & T==565852){
cout<<5810299<<endl;
cout<<509355<<endl;
cout<<1061715<<endl;
cout<<268217<<endl;
cout<<572334<<endl;
}
if(n==98 && m==100 && T==25102770){
cout<<0<<endl;
cout<<2473<<endl;
cout<<355135<<endl;
cout<<200146<<endl;
cout<<41911<<endl;
cout<<441622<<endl;
cout<<525966<<endl;
cout<<356617<<endl;
cout<<575626<<endl;
cout<<652280<<endl;
cout<<229762<<endl;
cout<<234742<<endl;
cout<<3729<<endl;
cout<<272817<<endl;
cout<<244135<<endl;
cout<<597644<<endl;
cout<<2217<<endl;
cout<<197078<<endl;
cout<<534143<<endl;
cout<<70150<<endl;
cout<<91220<<endl;
cout<<521483<<endl;
cout<<180252<<endl;
cout<<72966<<endl;
cout<<1380<<endl;
}

return 0;
}

其他类

我也有cpp人

(traffic.cpp内容如下:)

1
    

(是的,一无所有。仅建了cpp文件,里面空空如也。)

CE人

1
auto a;

代码共用但没完全共用人

(把T2代码贴到了T3、T4,并改了一下文件名)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#include <bits/stdc++.h>
using namespace std;
int n,m,hj=0,jd=0,jx[501],js=0,z=0,jj=0,k=0,r=0;
int q=0;
char a[501],b[4]={'0','*','(',')'};
int search(int x){
if(x==js){
jj=0;
jd=0;
k=0;
q=0;
r=0;
if(hj!=0){
jj=1;
}
for(int i=0;i<n;i++){
if(a[i]=='('){
q++;
jd=0;
k=1;
r=0;
}
if(a[i]==')'){
if((k==1)&&(q>1)){
jj=1;
break;
}
if(q!=0)
q--;
k=0;
jd=0;
r=0;
}
if(a[i]=='*'){
k=0;
jd++;
r=1;
}
if(jd>m){
jj=1;
break;
}
}
if((jj==0)&&(q==0)&&(r==0)){
for(int j=0;j<n;j++){
cout<<a[j];
}
cout<<endl;
z++;
}
return 0;
}
for(int i=1;i<=3;i++){
a[jx[x]]=b[i];
if(i==2){
hj++;
}
if(i==3){
hj--;
}
search(x+1);
if(i==2){
hj--;
}
if(i==3){
hj++;
}
}
}
int main(){
freopen(" traffic.in","r",stdin);
freopen(" traffic.out","w",stdout);
cin>>n>>m;
cin>>a;
for(int i=0;i<n;i++){
//cin>>a[i];
//scanf("%c",&a[i]);
if(a[i]=='('){
hj++;
q=1;
}
if(a[i]==')'){
hj--;
q=0;
}
if(a[i]=='?'){
jx[js]=i;
js++;
}
}
search(0);
cout<<z;
return 0;
fclose(stdin);
fclose(stdout);
}

reward
支付宝 | Alipay
微信 | Wechat