## 写在前面
- GD 代码:https://netcut.cn/p/70720f348bd59062
- 教练:[关于严明CSP.docx](https://www.luogu.com.cn/fe/api/problem/downloadAttachment/lgh3vzvd),所以我没在代码整活。
## 统计
本次 GD 代码解压后大小 104MB,占用空间 135MB,包含 25936 个文件,33980 个文件夹。J 共有 3631 位考生,S 共有 3532 位考生(还有两个前缀为 JS 的考生)。
![](https://cdn.luogu.com.cn/upload/image_hosting/xv401pon.png)
共有 7003 个名为 duel 的项目,其中 3 个为空文件夹。
![](https://cdn.luogu.com.cn/upload/image_hosting/gzyid3qb.png)
共有 6819 个名为 detect 的项目,其中 55 个为空文件夹。
共有 6483 个名为 color 的项目,其中 133 个为空文件夹。
共有 5162 个名为 arena 的项目,其中 460 个为空文件夹。
有大于 20000 个 `#include`,大于 20000 个 `<bits/stdc++.h>`,3708 个 `<iostream>`,2200 个 `<cstdio>`,大于 20000 个 `using namespace std;`,大于 20000 个 `int main()`,大于 20000 个 `return 0`,大于 20000 个 `freopen`,8313 个 `fclose`。
查找 `//freopen`,245 文件中有 436 个结果。
![](https://cdn.luogu.com.cn/upload/image_hosting/hgo5ev3u.png)
查找 `"r",stdout`,109 文件中有 109 个结果;`"w",stdin`,101 文件中有 101 个结果。
## 迷惑行为
1. 原神 uid 崩铁 uid 人&虚晃一枪人
![](https://cdn.luogu.com.cn/upload/image_hosting/q7vlj6x6.png)
2. 猜测人
![](https://cdn.luogu.com.cn/upload/image_hosting/jwvxybvo.png)
3. 洛谷人
![](https://cdn.luogu.com.cn/upload/image_hosting/upph5usx.png)
4. 祝愿人+CCF 人
![](https://cdn.luogu.com.cn/upload/image_hosting/1u02f6as.png)
5. 深情表白人
![](https://cdn.luogu.com.cn/upload/image_hosting/bdb41yvr.png)
6. 引流人
![](https://cdn.luogu.com.cn/upload/image_hosting/tccneck6.png)
7. qq 人+AFO 人
![](https://cdn.luogu.com.cn/upload/image_hosting/154acg5e.png)
8. Alter//Strife
![](https://cdn.luogu.com.cn/upload/image_hosting/6qcf4ylt.png)
9. 文明人,明知山有虎偏向虎山行
![](https://cdn.luogu.com.cn/upload/image_hosting/k4owmveo.png)
特别是 GD-S01369 这位选手,直接贴脸开大写 `I fuck CCF`
10. 开国大典
![](https://cdn.luogu.com.cn/upload/image_hosting/xblkethz.png)
11. 珂学家
![](https://cdn.luogu.com.cn/upload/image_hosting/xte1amrn.png)
12. 柚子厨
![](https://cdn.luogu.com.cn/upload/image_hosting/6cdclqu0.png)
13. 御坂美琴
![](https://cdn.luogu.com.cn/upload/image_hosting/f9kg8oq8.png)
14. stick.in
![](https://cdn.luogu.com.cn/upload/image_hosting/7fud4biv.png)
15. 音游人
![](https://cdn.luogu.com.cn/upload/image_hosting/49236xh3.png)
16. chen_zhe
![](https://cdn.luogu.com.cn/upload/image_hosting/9cwx9pgn.png)
17. 成分复杂不好评价,直接放代码
```cpp
// 第一问可以非常简单地,对于每辆车,如果加速度为正,
// 那么考虑最后一个测试仪,否则考虑第一个测试仪。
// 然后就可以得到答案,顺便把超速的车留下。
// 所以以下的“车”默认为超速的。
// 如果加速度为正,那么二分得出第一个检测到超速的地方,
// 否则得出最后一个检测到超速的地方。
// 此时有两种情况,第一种是所有加速度为正的车的
// 超速记录仪和所有加速度为负的超速记录仪有重合,
// 那么此时只需要保留一个。
// 否则需要保留两个,第一个和最后一个。
// 我是蒟蒻!
// 我很蒻!
//
// 另:为什么今年 €€£ 这么喜欢多测。
// 下一题唱什么呢~
// 样例里有不好的东西(指 1 1 4)!
#include <cstdio>
#include <vector>
#include <cstring>
#include <algorithm>
using namespace std;
class car
{
public:
int d, v, a, q;
};
class Farmer_John
{
public:
int s, t;
};
int qjfg(vector<Farmer_John> v)
{
sort(v.begin(), v.end(), [](const Farmer_John &x, const Farmer_John &y) { return x.t < y.t; });
int vt = 0, cnt = 0;
for(const Farmer_John &x : v)
{
// printf("x = [%d, %d]\n", x.s, x.t);
if(x.s > vt)
{
cnt++;
vt = x.t;
}
}
return cnt;
}
vector<car> positive, negetive; // negetive 应该没有拼错吧
vector<car> codeforces, codefancy; // 长颈鹿
int p[1000005];
// ???刚刚猜出来了虚拟机的用户密码是 123456,这么厉害??!
// sudo -i 输个 123456 居然成功了?
// 可惜没网,不然就能 apt install 一个小游戏玩玩了
// 👇👇👇
// 👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇 找不同 👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇
// 自尊自责自自尊自责自自尊自责自自尊自责自自尊自责自自尊自责自自尊自责自自尊自责自自尊自责自自尊自责自自尊自责自自尊自责自在最早在
// 自尊自责自自尊自责自自尊自责自自尊自责自自尊自责自白尊自责自自尊自责自自尊自责自自尊自责自自尊自责自自尊自责自自尊自责自在最早在
// ☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝ 找不同 ☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝☝
// ☝☝☝
int mythware_super_password(int m, int v, car rac) // was saw
{
// I F
// U C
// K C
// C F
// 在那十面埋伏四面楚歌的时候
// 刀光与剑影交错
// ...........
// 生死无话
int l = 1, r = m;
while(l < r)
{
int mid = (l+r) >> 1; // 飞机鸥案!
if(rac.v * rac.v + 2 * rac.a * (p[mid] - rac.d) <= v*v) l = mid + 1;
else r = mid;
}
return l;
}
int drowssap_repus_erawhtym(int m, int v, car rac) // was saw reverse esrever
{
// printf("rac = {v = %d, a = %d, d = %d), v = %d\n", rac.v, rac.a, rac.d, v);
// I F
// U C
// K C
// C F
// 在那十面埋伏四面楚歌的时候
// 刀光与剑影交错
// ...........
// 生死无话
int l = 1, r = m;
while(l < r)
{
int mid = (l+r+1) >> 1; // 飞机鸥案!
// printf("-l = %d, r = %d\n", l, r);
// printf("mid = %d, rac.v * rac.v + 2 * rac.a * (p[mid] - rac.d) = %d\n", mid, rac.v * rac.v + 2 * rac.a * (p[mid] - rac.d));
// fflush(stdout);
if(rac.v * rac.v + 2 * rac.a * (p[mid] - rac.d) > v*v) l = mid;
else r = mid - 1;
}
return l;
}
void solve()
{
int n, m, l, v;
scanf("%d%d%d%d", &n, &m, &l, &v);
negetive.clear();
positive.clear();
for(int i=1;i<=n;i++)
{
car career; // 这个 'car' 是 'car'eer,下一个是什么呢
scanf("%d%d%d", &career.d, &career.v, &career.a);
if(career.a < 0) negetive.push_back(career);
else positive.push_back(career);
}
for(int i=1;i<=m;i++)
{
scanf("%d", p + i);
}
for(car &_ : negetive)
{
_.q = lower_bound(p + 1, p + m + 1, _.d) - p;
// printf("_ = [%d, %d, %d, %d]\n", _.d, _.v, _.a, _.q);
}
for(car &_ : positive)
{
_.q = lower_bound(p + 1, p + m + 1, _.d) - p;
// printf("_ = [%d, %d, %d, %d]\n", _.d, _.v, _.a, _.q);
}
int mincs = 114514, maxcs = 0; // 114514 > n
vector<Farmer_John> VisualStudio;
for(car carpet : positive) // 是 'car'pet!'car' 的小宠物!猜对了吗?
{
// 在这里要判定走到最后一个测速仪时会不会超速
// 速度为 sqrt(v^2+2ap)
// 超速速度为 V
// sqrt(v^2+2ap) > V
// v^2+2ap > V^2
// V^2-v^2 < 2ap
// v^2+2ap 最多是 1000000 + 2000000000 = 2001000000 < INT_MAX...
// 不开 long long 也不会见祖宗
// 话说上午 CSP-J 我一个 long long 也没开,不会寄吧。。
// 说寄不说吧,文明你我他
// 注:T3 开的是 string,大家不会错吧。
int vv = carpet.v * carpet.v + 2 * carpet.a * (p[m] - carpet.d);
// printf("[%d, %d, %d] 在 %d 速度是 sqrt(%d)!\n", carpet.d, carpet.v, carpet.a, p[m], vv);
if(vv > v*v)
{
// printf("[%d, %d, %d] 超速!\n", carpet.d, carpet.v, carpet.a);
codeforces.push_back(carpet);
int id = mythware_super_password(m, v, carpet);
VisualStudio.push_back({max(id, carpet.q), m});
}
}
for(car carpet : negetive)
{
int vv = carpet.v * carpet.v + 2 * carpet.a * (p[carpet.q] - carpet.d);
// printf("[%d, %d, %d] 在 %d 速度是 sqrt(%d)!\n", carpet.d, carpet.v, carpet.a, p[carpet.q], vv);
if(vv > v*v)
{
// printf("[%d, %d, %d] 超速!\n", carpet.d, carpet.v, carpet.a);
codefancy.push_back(carpet);
int id = drowssap_repus_erawhtym(m, v, carpet);
VisualStudio.push_back({carpet.q, id});
}
}
printf("%d %d\n", VisualStudio.size(), m - qjfg(VisualStudio)); //
}
int main()
{
freopen("detect.in", "r", stdin);
freopen("detect.out", "w", stdout);
int t;
scanf("%d", &t);
while(t--)
{
solve();
}
return 0;
}
// ...还有从 di 驶入没考虑到
// 没事,不紧张
// 老师,我叫不紧张
// 那么每辆车是否超速还是可以方便地检验,只是时间复杂度变成了 O(log n) 而已。
// 那么每辆车都有一个超速的区间。
// 对于加速度为正的,区间还是一样延伸到末尾。
// 对于加速度为负的,就愕愕了。
// 但是加速度为负的还是一个区间
// 那么我们可以得知这个区间的开头和结尾
// 搞一搞差分
// 就可以得出什么呢
// qwq,我叫不紧张
//
// 长枪刺破云霞
// 放下一生牵挂
// 后面不会唱啦
// ..........
// 一招破苍穹~
// ..........
// 风卷残云烈马
// ..........
// (换个频道吧)
// ..........
// 我知道了,但
// 你出言不逊是
// !!.......
// ..........
// 洛谷将会臭名
// 昭著!!!!
// ..........
// ...全天下的
// OIers 都会
// 知道,CCF
// 和特派员的
// 腐朽!!!
// CCF 将会
// 臭名昭著!
// ————江轩
/*
NUL
NULL
NIL
↖↑↗ ↘↓↙ ↖↑↗ ↘↓↙ ↖↑↗
O←O→O→O←O←O→O→O←O←O→O
↙↓↘ ↗↑↖ ↙↓↘ ↗↑↖ ↙↓↘
O→O←O←O→O→O←O←O→O→O←O
↖↑↗ ↘↓↙ ↖↑↗ ↘↓↙ ↖↑↗
O←O→O→O←O←O→O→O←O←O→O
↙↓↘ ↗↑↖ ↙↓↘ ↗↑↖ ↙↓↘
O→O←O←O→O→O←O←O→O→O←O
↖↑↗ ↘↓↙ ↖↑↗ ↘↓↙ ↖↑↗
O←O→O→O←O←O→O→O←O←O→O
↙↓↘ ↗↑↖ ↙↓↘ ↗↑↖ ↙↓↘
我的 CSP-S 像洛谷专栏一样成功!
洛谷专栏像我的 CSP-S 一样成功!
《互惠互利》
*/
```
18. 诈骗人,和 ccf 发成绩一个德行
![](https://cdn.luogu.com.cn/upload/image_hosting/vcxr8rus.png)
19. 恶臭人+膜拜 ccf 人
![](https://cdn.luogu.com.cn/upload/image_hosting/ezjnq09i.png)
20. 神秘计算器
![](https://cdn.luogu.com.cn/upload/image_hosting/dd31jxr4.png)
21. furry
![](https://cdn.luogu.com.cn/upload/image_hosting/ondhp9oa.png)
22. explore1+y1
![](https://cdn.luogu.com.cn/upload/image_hosting/310389ad.png)
23. china
![](https://cdn.luogu.com.cn/upload/image_hosting/ckixl33w.png)
24. 我是李华
![](https://cdn.luogu.com.cn/upload/image_hosting/2f6g1lyb.png)
25. 超长代码人
![](https://cdn.luogu.com.cn/upload/image_hosting/gkd1hwvm.png)
26. puke
![](https://cdn.luogu.com.cn/upload/image_hosting/gf81fr09.png)
27. 玩原玩的
![](https://cdn.luogu.com.cn/upload/image_hosting/8fo4bt08.png)
28. 退役演讲
![](https://cdn.luogu.com.cn/upload/image_hosting/odak29u3.png)
29. see you again
![](https://cdn.luogu.com.cn/upload/image_hosting/fmcw5o41.png)
30. 英语不好
![](https://cdn.luogu.com.cn/upload/image_hosting/jeemqbvq.png)
31. ikun
![](https://cdn.luogu.com.cn/upload/image_hosting/macnmzs2.png)
32. power
![](https://cdn.luogu.com.cn/upload/image_hosting/xpita6bz.png)
33. 缺少分号
![](https://cdn.luogu.com.cn/upload/image_hosting/3cagbbby.png)
34. 输入 n
```cpp
#include<iostream>
using namespace std;
int main(){
freopen("color.in","r",stdin);
freopen("color.out","w",stdout);
int n;
cin>>n;
return 0;
}
```
```cpp
#include<iostream>
using namespace std;
int main(){
freopen("arena.in","r",stdin);
freopen("arena.out","w",stdout);
int n;
cin>>n;
return 0;
}
```
35. fpow
![](https://cdn.luogu.com.cn/upload/image_hosting/c11t6fvy.png)
36. 巨多变量
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
freopen("arena.in","r",stdin);
freopen("arena.out","w",stdout);
int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a1,a2,a3,a4,a5,a6;
cin>>a>>b>>c>>d>>e>>f>>g>>h>>i>>j>>k>>l>>m>>n>>o>>p>>q>>r>>s>>t>>u>>v>>w>>x>>y>>z>>a1>>a2>>a3>>a4>>a5>>a6;
cout<<"5"<<endl<<"19"<<endl<<"7"<<endl<<"1";
fclose(stdin);
fclose(stdout);
return 0;
}
```
37. 草神+OLE
```cpp
#include<bits/stdc++.h>
using namespace std;
int a[1145141],b[1145141],n,ma=-1,ans=0,dp[1145141];
void nahida(int p)
{
if(p>n)
{
ans=0;
for(int i=1;i<=n;i++)
{
int f=0;
for(int j=i-1;j>0;j--)
{
if(b[i]==b[j])
{
if(a[i]==a[j])
ans+=a[i];
f=1;
break;
}
}
}
ma=max(ma,ans);
return ;
}
nahida(p+1);
b[p]=1;
nahida(p+1);
b[p]=0;
}
int main()
{
freopen("color.in","r",stdin);
freopen("color.out","w",stdout);
int t;
scanf("%d",&t);
while(t)
{
memset(dp,0,sizeof(dp));
t--;
scanf("%d",&n);
if(n<=15)
{
ma=-1;
for(int i=1;i<=n;i++)
{
scanf("%d",&a[i]);
}
nahida(1);
cout<<ma<<endl;
}
else
{
for(int i=1;i<=n;i++)
{
int p=-1;
for(int j=i-1;j>0;j--)
{
if(a[i]==a[j])
{
p=j;
break;
}
}
if(p==-1)
dp[i]=dp[i-1];
else
{
int sum=0;
for(int j=p+1;j<i;j++)
{
if(dp[j-1]!=dp[j])
{
p=j+1;
break;
}
}
dp[i]=max(dp[i-1],a[i]+dp[p-1]);
}
}
cout<<dp[n]<<endl;
}
}
return 0;
}
```
```cpp
#include<bits/stdc++.h>
using namespace std;
int main()
{
freopen("arena.in","r",stdin);
freopen("arena.out","w",stdout);
while(114514)
{
cout<<1;
}
return 0;
//rp++
}
```
38. dzd 战神
![](https://cdn.luogu.com.cn/upload/image_hosting/f2qgl03r.png)
39. kkksc03
```cpp
#include<bits/stdc++.h>
using namespace std;
//nonononononononononononononononononononononono
//noooooooooooooooooooooooo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//kkksc03 yyds
int main(){
freopen("arena.in","r",stdin);
freopen("arena.out","w",stdout);
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
return 0;
}
```
40. dengduck
```cpp
#include<bits/stdc++.h>
#define LL long long
using namespace std;
const int N=1e5+5;
int n,A[N];
multiset<int>S;
int main()
{
freopen("duel.in","r",stdin);
freopen("duel.out","w",stdout);
scanf("%d",&n);
for(int i=1;i<=n;i++)
{
scanf("%d",&A[i]);
}
sort(A+1,A+n+1);
for(int i=1;i<=n;i++)
{
auto p=S.lower_bound(A[i]);
if(p!=S.begin())
{
p--;
S.erase(p);
}
S.insert(A[i]);
}
int Ans=S.size();
printf("%d\n",Ans);
}
//DengDuck Todo:
//Check T1
//Ka Ka T2 1.6s,maybe OK?
//Check T3
//RP++,AK IOI!
```
41. yuanshen
![](https://cdn.luogu.com.cn/upload/image_hosting/kc6kfsqr.png)
42. 不注释的文明人
```cpp
#include<bits/stdc++.h>
using namespace std;
long long t,n,a[100005],col[100005],vis[1005][1005],mx;
void dfs(int i){
if(i>n){
long long cnt=0;
for(int i=1;i<=n;i++){
int ans=0;
for(int j=i-1;j>=1;j--){
if(!vis[j][i]&&a[i]==a[j]&&col[i]==col[j]){
ans=a[i];
vis[i][j]=vis[j][i]=1;
break;
}
}
cnt+=ans;
}
mx=max(mx,cnt);
return;
}
col[i]=1;
dfs(i+1);
col[i]=0;
dfs(i+1);
return;
}
int main(){
freopen("color.in","r",stdin);
freopen("color.out","w",stdout);
ios::sync_with_stdio(0);
cin.tie(0);
cin>>t;
while(t--){
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i];
}
cout<<"0\n";
}
return 0;
}
f**k you ccf
f**k you mote
```
43. 字符画
![](https://cdn.luogu.com.cn/upload/image_hosting/fwigusva.png)
44. 人类智慧
![](https://cdn.luogu.com.cn/upload/image_hosting/70m6nmkx.png)
45. 不知道第几位小作文人
```
//I thank everyone who help me learning OI.
//I had a very graceful experience,when I learnt more things,I received hapiness.
//But unluckily,I often get mad with homework and vacation,can't get balance with them,and I didn't get talent.
//So,I decide to quit.
//This may be my last contest,and this code may be my last code.
//I feel sad for my leaving,but I have to do this.
//Thank you,OI.
//Love you all guys.
//Wish you to be successful.
//My OI life ends.
```
46. 抽象代码
![](https://cdn.luogu.com.cn/upload/image_hosting/fmwgdsxf.png)
47. 如你所愿
![](https://cdn.luogu.com.cn/upload/image_hosting/06rszk3z.png)
48. 辱骂题目人
```cpp
FileIO("arena");
//freopen froepen // freopen
int never11111,gonna11111,give1111,you111,up11;
// bro, tell me if i'm in 2024-csps-gd-mhds
// what tf is this sht
// i spend 2 hours on it
```
49. 做法不要假
```cpp
// bro, can the 4th problem be just as ez as this sht?
// PLEAAAAAAAAAAAAAASE, DONT SAY MY SOLUTION IS WRONG BRO
// I WANNA 1= BRO, (NO 1=)=AFO
```
50. 表白 ccf
```cpp
#include<bits/stdc++.h>
using namespace std;
int main()
{
freopen("arena.in","r",stdin);
freopen("arena.out","w",stdout);
puts("I love CCF!");
}
// qzs, I love you more than I love CCf
```
```cpp
#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N=1e5+5;
int T;
int n,m,lovecsp[N],c[N],k,ans;
int ask(){
for(int i=0;;i++){
if((1<<i)>=n) return i;
}
}
signed main(){
freopen("arena.in","r",stdin);
freopen("arena.out","w",stdout);
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
cin>>n>>m;
for(int i=1;i<=n;i++) cin>>lovecsp[i];
for(int i=1;i<=n;i++) cin>>c[i];
k=ask();
cin>>T;
cout<<"I LOVE YOU,CSP!!!RP++!"<<endl;
return 0;
}
```
51. explove
```cpp
freopen("explove.in","r",stdin) ;
freopen("explove.out","w",stdout) ;
```
52. 不知道该写啥
```cpp
int idkwhyiwritethis(int x){
int k = (int)(ceil(1.0 * log(x) / log(2)));
return k;
}
```
53. reopen
```cpp
reopen("sticks.in ","r",stdin);
freopen("sticks.out","w",stdout);
```
54. 纪念人
```cpp
/*
16:15 留以纪念:
D:\GD-S00508\detect>detect.exe < detect1.in > a.out
D:\GD-S00508\detect>fc a.out detect1.ans
正在比较文件 a.out 和 DETECT2.ANS
FC: 找不到差异
D:\GD-S00508\detect>detect.exe < detect2.in > a.out
D:\GD-S00508\detect>fc a.out detect2.ans
正在比较文件 a.out 和 DETECT2.ANS
FC: 找不到差异
D:\GD-S00508\detect>detect.exe < detect3.in > a.out
D:\GD-S00508\detect>fc a.out detect3.ans
正在比较文件 a.out 和 DETECT3.ANS
FC: 找不到差异
D:\GD-S00508\detect>detect.exe < detect4.in > a.out
D:\GD-S00508\detect>fc a.out detect4.ans
正在比较文件 a.out 和 DETECT4.ANS
***** a.out
99691 35478
99986 68384
99335 81601
***** DETECT4.ANS
99691 35478
99987 68384
99335 81601
*****
***** a.out
99981 44819
99998 18514
99955 92874
***** DETECT4.ANS
99981 44819
99999 18514
99955 92874
*****
D:\GD-S00508\detect>detect.exe < detect5.in > a.out
D:\GD-S00508\detect>fc a.out detect5.ans
正在比较文件 a.out 和 DETECT5.ANS
***** a.out
99278 76554
99558 73838
99589 27272
99293 66850
***** DETECT5.ANS
99278 76554
99558 73837
99589 27272
99293 66848
*****
16:36 调试完成
*/
```
55. duel.cpp.in
```cpp
freopen(" duel.cpp.in ", "r", stdin);
freopen(" duel.cpp.out", "w" ,stdout);
```
56. .in 空格
![](https://cdn.luogu.com.cn/upload/image_hosting/lbt8mus9.png)
57. 原神启动
```cpp
/*
迷惑行为,启动!
原神,启动!
Genshin Impact, start!
不能再玩原神了,开 T4 了
*/
```
58. MC
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
freopen("chain","r",stdin);
freopen("chain","w",stdout);
return 0;
}
//太难了根本不会,题目看不懂,等12点回家了
//第三题也难我只能把1-20的样例一个个打出来了
//太难了,我要回家玩(黑神话、CS、三角洲、minecraft、泰拉、原神、饥荒)
//三周目大圣太难了 跟一周目差不多的装备 打几倍数值的大圣 太难了
//CS军备太爽了每把几乎60%精准打击率,嘎嘎爆头,泳池一穿10
//三角洲黑鹰行动什么时候出?长弓溪谷和大坝都乱杀了 普通长弓一把40万,3-4队人随便杀,全面的地图太少了打了几遍就知道怎么狗了
//minecraft神中神 ,终焉决斗2挺帅的,无限·重生(infinit·reborn)好玩的不行,原版速通学不会,格雷把两颗腰子都榨干了,机械动力,工业革命,工业时代2,现代化科技,格雷科技,科技复兴,星际,机械时代,机械能源,应用能源,核电工艺……魔法太复杂了比dp还复杂,植物魔法、炼金术、魔法师、新生魔艺、Alex's magic……………………………………………………………………
//泰拉万'作'之上,一'作'之下 沙盒老二,免费为玩家更新10年, 灾厄、法狗、瑟银、旅人归途、星河之光、炼狱、墓地守望 …………………………………………………………………………
//原神不用说了,原神启动!
//饥荒沙盒老三含金量不用多说
```
59. florrer
```cpp
#include<bits/stdc++.h>
using namespace std;
int ujelly[10]={6,2,5,5,4,5,6,3,7,6};
signed main()
{
freopen("sticks.in","r",stdin);
freopen("sticks.out","w",stdout);
int t;
scanf("%d",bitand t);
while(t--)
{
int n;
scanf("%d",bitand n);
if(n==1)
{
printf("-1\n");
continue;
}
int ssalt=ceil(n/7.0),ssunflower=n;
for(int i=1;i<ssalt;i++)
{
for(int j=0;j<=9;j++)
{
if(i==1&&j==0)continue;
if(ceil((ssunflower-ujelly[j])/7.0)<=ssalt-i)
{
printf("%d",j);
ssunflower-=ujelly[j];
break;
}
}
}
for(int i=0;i<=9;i++)
{
if(ssalt==1&&i==0)continue;
if(ujelly[i]==ssunflower)
{
printf("%d",i);
break;
}
}
printf("\n");
}
return 0;
}
```
60. joker
![](https://cdn.luogu.com.cn/upload/image_hosting/0v7z4k6e.png)
61. fropen&freeopen&fopen
![](https://cdn.luogu.com.cn/upload/image_hosting/on2t14wh.png)
![](https://cdn.luogu.com.cn/upload/image_hosting/1dndnm9r.png)
![](https://cdn.luogu.com.cn/upload/image_hosting/ie5mk15d.png)
62. AFO
```cpp
/*
AFOed. Thanks to All.
It's two hours left now, with the first three problems finished. T4 is so long that I decided to finish this essay first.
For the past several years, I've seen so many people posting their AFO announcements. And now, it's finally my turn. It's been five years since I joined my school's OI team and constantly worked for it. Practically, last year was my actual year to say that I would be AFO, as I am not targeting for any awards this year and only for fun. Just before I entered the computer lab to get ready for the contest today, I had joked about myself that my purpose for participating CSP this year would be submitting my AFO thoughts, and that seems true now. Recounting my OI experiences throughout the past four or five years, there were so many delights and interesting things. Even though I am not talented, I always think I have been lucky. Before noting my past four years, I'd like to express my gratitude and apology first.
To all of my teammates, thank you for accompanying me for such a long time. Training and interacting with all you guys was such interesting and meaningful.
To all of my coaches, thank you for all of the classes and resources you offered and your efforts training us.
However, I have to apologize for my abrupt leaving from our training team. Actually, I have always been feeling a sense of guilty for me telling you my leave in the very last minute and never have mentioned that before. I'm sorry for that, and that was only because I didn't find a good way to tell you I would leave. And again, thank you.
In my very first year participating in OI, I took the CSP-J test, and I only scored a bit higher then the pass score, which means I wouldn't have been in training team or further OI competitions if I had scored only a few points lower. However, that was sort of luck. And because of that, I entered my school's training team without a hitch. There was a policy by the government confining schools to deliberately select the very top students; however, no need to say, many schools were still secretly doing so. Anyway, I wasn't among one of the selected at first, and then after CSP-J preliminary test, I became the special one in the training team, being from a common class.
The second year was really a huge setback to me. That year, I participated in both CSP-J and CSP-S. But when the result was released, knowing how bad my scores were in both two tests, plus the time was also close to the mid-term exam, and I also didn��t do well on it, I stressed out. I was kind of depressed that time, and it took my weeks to recover from my failure. Nevertheless, I restored optimistic at last; furthermore, it made me more mentally strong that I could easily handle this kind of failure and no longer be defeated by it.
Then here came the third year. I was in grade 9 then, which means I would have to prepare for Zhongkao. Therefore in the several months before that, all of the training was stopped. But beside that, there was really nothing special to mention.
Finally it was the technically last year. It was very different from the previous three years, since I entered the class exclusive to competition students, and there some school policies were more convenient for short-term collective training and class suspension. After I had took the NOIP that year and known my score, I applied for class suspension for that semester. Even though in hindsight, I failed the provincial team selection, and I was nearly absent for the whole semester - which resulted in some bad grades - I still believed that it wasn��t a bad decision: I experienced a totally different school life, going to the computer lab or the library and staying there all the day, arduous training all the day, and most importantly, no need to worry about homework in other subjects. I really enjoyed that kind of life, so that��s why I have never regretted.
After the I failed in the provincial team selection - actually very predictable though - or maybe a bit earlier, I started to think about not continuing working in OI in grade 11, and later in May and June, I secretly formally submit my application for quitting the training team, not known by any other students. I sometimes thought I had the obligation to inform my teammates about that, but whenever I was going to try to say, it was just hard for me to speak out even a word. So forgive me about that, I like having my time training with all of my teammates, discussing problems, listening to courses, having mock contests, etc. However, it was time for me to leave.
It��s near the end of this test. There seems no enough time for me to look at T4. I hope I haven��t made stupid mistakes in T1 through T3 and can participate in NOIP. However, if I fail to, it will be still acceptable for me though, since I am not really care about what achievements I may get this year.
At the end, I sincerely hope my teammates will accomplish whatever ideal goals they have.
*/
```
63. long long long
```cpp
#include<bits/stdc++.h>
#define ll long long long
#define pb push_back
#define fi first
#define se second
```
64. bezro+detect3
```cpp
#include <bits/stdc++.h>
using namespace std;
const int N=1e5+5;
int T;
int n,m;
double l,v;
double d[N],cv[N],a[N],sd[N];
int pos[N];
int cs[N];
bool zero=1,uzero=1,bzero=1;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
freopen("detect3.in","r",stdin);
freopen("detect3.out","w",stdout);
cin>>T;
while(T--)
{
cin>>n>>m>>l>>v;
for(int i=1;i<=n;++i)
{
cin>>d[i]>>cv[i]>>a[i];
if(a[i]>0) zero=bzero=0;
if(a[i]==0) uzero=bzero=0;
if(a[i]<0) zero=uzero=0;
}
int maxp=0;
for(int i=1;i<=m;++i)
cin>>pos[i],maxp=max(maxp,pos[i]);
//A
int ans=0;
if(zero)
{
for(int i=1;i<=n;++i)
{
if(cv[i]>v&&maxp>=d[i])
ans++;
}
if(!ans) ++m;
cout<<ans<<" "<<m-1<<"\n";
}
//B:
else
if(uzero)
{
for(int i=1;i<=n;++i)
{
if(pos[m]>=d[i])
{
}
}
}
//C:
else
if(bzero)
{
for(int i=1;i<=n;++i)
{
}
}
//none
else
{
}
}
return 0;
}
```
65. bilibili+大力王
```cpp
// Pheebo / AuraMisty are the best bilibili streamers
```
```cpp
// BABY DON'T HURT ME
```
66. 不会
```cpp
#include <cstdio>
void task(void);
int main() {
freopen("color.in", "r", stdin);
freopen("color.out", "w", stdout);
int T;
scanf("%d", &T);
while(T--)
task();
}
constexpr int MAXN = 2e5 + 10;
int n;
int a[MAXN];
void subtask1(void);
void subtask2(void);
void task(void) {
scanf("%d", &n);
for(int i = 1; i <= n; ++i) {
scanf("%d", a+i);
}
// if(n <= 15)
// return subtask1();
// else if(n <= 100)
// return subtask2();
// 不会。
printf("%d\n", n / 2);
}
// O(2^n) QaQ
void subtask1(void) {
/// O(2^n) 也不会。
}
// O(2^n) will die OF CAUSE.
void subtask2(void) {
// QaQ...
}
```
67. 但
```cpp
#include <bits/stdc++.h>
using namespace std;
long long T, n, k, q, x;
set<long long> s;
int main()
{
freopen("chain.in", "r", stdin);
freopen("chain.out","w",stdout);
cin >> T;
while (T--)
{
cin >> n >> k >> q;
for (int i = 1; i <= n; i++)
{
int l; cin >> l;
while (l--) {cin >> x; s.insert(x);
}
}
while (q--) {
srand(time(NULL));
int a, b;
cin >> a >> b;
if (s.find(a) == s.end() && s.find(b) == s.end()) cout << 0 << endl;
else cout << rand()%2 << endl;
}
}
return 0;
}
/*
好了T4就不写迷惑行为大赏了。
T1 T2 水题希望能 AC,T3 写递归期望得分 10 分,T4 随机数,期望总分 100+100+10+0=210.
如果最后真的是这个分数就好了,希望今年1=分数线不要过150……
如果我AFO了,我也不会F**K CCF的,所以球球你了CCF给我1= or 2= 吧(大哭
T3 甚至不给大样例(不过给了我也不会)。好像T3是洛谷原题来的,但是太久没看真忘了( 也有可能是类似的,好像还是NOIP历年真题
本人圈子:音游+BA+追番,音游主玩臀(15.46),阿卡一和MUSEDASH玩过一点。我推:绪山真寻(好可爱 好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱好可爱)
upd 2024.10.26 11:40 给 T3 打了个表,应该规律是没错的。反正只要 T1 T2 能过就行。 表大概10^2~3长,预估得分0-30.
……
好吧还是写一点迷惑行为吧
你说你 不想在这里!我也不想在这里!
可天 黑 的太快!想走早就来不及!
哦 我 爱 你! 可是关系变成没关系
问题是没问题!
于是!我 们 继 续!
……
拿起笔 想写点东西
以为是武器能够 伸 张 正!义!!!
……没人理 也没关系
至少我还有你
至少我还有
你说你不想在这里 我也不想在这里
可天黑的太快 想走早就来不及
哦 我 爱 你!可是关系变成没关系
问题是没问题
于是!我 们 继 续!
(后面忘了)
*/
```
68. 玩冰与火玩的
```cpp
/*
Hey bro!
Do you know a game called "ADOFAI"?
It's a music game
I really like it
In the **** CSP,I cannot stop knocking the desk(or anything on the desk)
And the desk is shaking......
You can buy it on "Steam",just 26 yuan
Me:200h best:P20 (I'm noob)
else:phigros , Muse Dush , Aceare
Why I say these?
Becouse it's pretty bored!(I just finish the first......)
Tabub is mine!
Tabub is yours!
Tabub is his!
Tabub is hers!
Tabub is its! (Jipper's dog)
Tabub is theirs!
Tabub is ours!
Tabub is jipper's!
Tabub is yenogod's!
Tabub is keKeman's!
Tabub is trusion's!
Tabub is bwen's!
Tabub is mint's!
Tabub is petab's!
Tabub is asjdh's!
Tabub is ggyoug's!
Tabub is yoonsu's!
Tabub is jate's!
Tabub is wesa's!
Tabub is gowst01's!
Tabub is yueyue's!
Tabub is 346's!
Tabub is v_____0's!
Tabub is sam's!
Tabub is huotui's!
Tabub is sharky's!
Tabub is ...... everyone's! :D
*/
```
69. 控制台
```cpp
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
```
70. 浮点大小数组
![](https://cdn.luogu.com.cn/upload/image_hosting/htmi8a18.png)
71. 那些写错了的万能头
![](https://cdn.luogu.com.cn/upload/image_hosting/4tg5sgjz.png)
![](https://cdn.luogu.com.cn/upload/image_hosting/uqfgkvp8.png)
```cpp
#include <bits/stdc++>
using namespace std;
int t;
int n,k,q;
int l,s;
int r[100010],c[100010];
int main(){
freopen("chain.in","r",stdin);
freopen("chain.out","w",stdout);
cin >> t;
while(t--){
cin >> n >> k >> q;
for (int i = 1; i <= n; i ++){
cin >> l;
}
for (int i = 1; i <= q; i ++){
cin >> r[i] >> c[i];
}
cout << 1 <<endl;
}
return 0;
}
```
72. explorer
![](https://cdn.luogu.com.cn/upload/image_hosting/7odtljgz.png)
73. cin<< & cout>>
![](https://cdn.luogu.com.cn/upload/image_hosting/483ivg1p.png)
![](https://cdn.luogu.com.cn/upload/image_hosting/h6p3qw30.png)
74. int mian
![](https://cdn.luogu.com.cn/upload/image_hosting/2pnwqjxz.png)
75. retrun 0
![](https://cdn.luogu.com.cn/upload/image_hosting/900b5of0.png)
76. 满屏的 segtree
![](https://cdn.luogu.com.cn/upload/image_hosting/1ffge6gl.png)
77. kill(在 Linux 下会 CE)
![](https://cdn.luogu.com.cn/upload/image_hosting/b2niqbcr.png)
78. AKIOI 字符画
![](https://cdn.luogu.com.cn/upload/image_hosting/9yiqe8ov.png)
79. 考场游记人+记得清空:
```cpp
#include<bits/stdc++.h>
using namespace std;
const int N=2e5+5,M=1e6+5;
typedef long long ll;//bu kai long long ---
ll a[N];
ll s[N];
//处理一段区间都染成同一个颜色的话的C[i]
//int color(int l,int r){
// int sss=ss[r]-ss[l];
//// if(a[l]==a[l-1])sss--;欸好像不要
// return sss;
//}
//那就直接写了,函数浪费运行时间
ll dp[N][2];//考虑前 i 位,最后一个染成0/1的时候最大的C[i]
ll app[M],lst[N];
//记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空
//记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空
//记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空记得清空
void mian(){
ll n;cin>>n;
for(int i=1;i<=n;i++)cin>>a[i];s[1]=0;
for(int i=2;i<=n;i++)s[i]=s[i-1]+((a[i]==a[i-1])?a[i]:0);//1-i 全部染一个颜色的话呢,C 是多少呢
for(int i=1;i<=n;i++)app[a[i]]=0;
for(int i=1;i<=n;i++){
lst[i]=app[a[i]];
app[a[i]]=i;
}
// for(int i=1;i<=n;i++)dp[i]=s[i];
for(int i=0;i<=n+1;i++)dp[i][0]=dp[i][1]=0;
for(int i=2;i<=n;i++){
if(lst[i]){
//上一个染成一样的颜色,中间都染成另一个一样的颜色
ll l=lst[i];//这是位置
if(l==i-1){
dp[i][0]=dp[i-1][0]+a[i];
dp[i][1]=dp[i-1][1]+a[i];
}
//dp[i][0]
//首先 a[i]+dp[l][0]
//再加上中间这一块的贡献:
//s[i-1]-s[l+1]
//+dp[l+1][1]
dp[i][0]=a[i]+s[i-1]-s[l+1]+dp[l+1][1];
dp[i][1]=a[i]+s[i-1]-s[l+1]+dp[l+1][0];
}
// else{
//dp[i][0]=dp[i][1]=max(dp[i-1][0],dp[i-1][1]);
// }
if(lst[i]!=i-1){
dp[i][0]=max(dp[i][0],max(dp[i-1][0],dp[i-1][1]));//linux ke yi yong max({a,b,c}) ma??
dp[i][1]=max(dp[i][1],max(dp[i-1][0],dp[i-1][1]));
}
// cout<<dp[i][0]<<" "<<dp[i][1]<<endl;
}
cout<<max(dp[n][0],dp[n][1])<<"\n";
}
int main(){
ios::sync_with_stdio(0);cin.tie(0);
// system("FC color1.out color1.ans");
freopen("color.in","r",stdin);//只有两个样例,zhenshitaibangle
freopen("color.out","w",stdout);
//buhui.
//还多测??
int t;cin>>t;
while(t--)mian();
return 0;
}
/*
15:53 说样例一以某个东西为准但是我看都一样啊》》》
1
15
1 12 11 11 7 11 15 6 4 6 3 15 7 5 2
正确输出:37
16:20 ok!!!
*/
```
```cpp
/*
16:21 优势在我
好吧其实不会 T4 优势逝世
橙 黄-绿 黄-绿 紫
16:36
比赛过半
看懂T4了但是【】
*/
/*
5 5
0 0 0 0 0
5 4 1 2 3
1001
10
1
4
2 1 0 0
1 2 1 0
0 2 3 1
2 2 0 1
18:02
过不去样例4/5是怎么回事啊啊?
qwq至少有一部分分了
继续调
为什么啊?为什么啊??又不是爆int
总不能爆 long long 了?
好吧,就是算错了
18:20
我知道我有问题
但是这8分钟肯定调不出来了TAT
只能拿到特殊性质的分——
40pts
*/
```
80. I love xxx:
```cpp
#include<bits/stdc++.h>
#define I using
#define love namespace
#define Elaina std
I love Elaina;
set<string> st;
signed main()
{
freopen("poker.in", "r", stdin);
freopen("poker.out", "w", stdout);
int n;
cin >> n;
while(n--)
{
string x;
cin >> x;
st.insert(x);
}
cout << 52-st.size();
}
```
```cpp
#include<bits/stdc++.h>
using namespace std;
#define I using
#define love namespace
#define Citlali std
I love Citlali;
const int MAXN = 2e6 + 10;
int T;
int a[20] = {6,2,5,5,4,5,6,3,7,6};
...
```
```
#include<bits/stdc++.h>
using namespace std;
#define I using
#define love namespace
#define jiuniao std
I love jiuniao;//�
...
```
81. struct Dino:
```cpp
struct Dino{
int r, cnt, lst;} dino[N+5];
```
82. edge://surf:
```cpp
/*
17:28: edge://surf PB 14979m
*/
```
83. 英语鬼才:
```cpp
/*
I can't understand.
IV.Everlasting Eternity
He learn really fast in 2024.Linear DP,SegmentTrees,Tarjan,Lucas law,quick read and out...
Everything was only for the race in 2024.Because he will quit OI after this time.
What's his ending? We will see...
*/
```
84. 小保底歪人+恶臭人+r 人:
```cpp
/*
你好,当你看到这里时,我祝你rp++
I AK IOI!!
114514,1919810,逸一时,误一世,逸久逸久罢已龄
为什么5.2仆人不复刻啊啊啊啊啊啊啊啊啊啊
小保底2连歪77了啊啊啊啊啊啊啊啊啊啊啊啊
双爆胚子全部歪小防御啊啊啊啊啊啊啊啊啊
doge
*/
```
85. 为什么要在密码里加点:
```cpp
// WHY ADDING DOTS TO THE WRITTEN PASSWORD WHILE THERE ARE NO DOTS IN THE PASSWORD
```
86. 宁为玉碎不为瓦全:
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
while(1);
return 0;
}
```
87. 22 年意外进复赛,只会打搜索:
```cpp
/*
Actually,this problem took me 30min.(Just a sign up problem,bruh)
I.Arche
2020.9 Luxe877 first take part in OI,after learning 2 years of Scratch.
In the following years before 2022,he enjoyed to learn C++ and had fun in computer room.
However,he entered round 2 of senior by accident in 2022.During test,he can only do searches.
*/
```
88. 这题太难了,我太菜了,神能保佑我吗:
```cpp
/*
1
3 3 7
5 1 2 3 4 1
3 1 2 5
3 5 1 6
1 2
1 4
2 4
3 4
6 6
1 1
7 7
*/
/*
This problem is so difficult for me.
I could just get 5pts at most.
God cannot bless me now QAQ
More and more vegetable, what should I do?
*/
```
89. 奶龙可爱:
```cpp
pair<int, int> nai_long_ke_ai(int d, int v, int a) {
```
90. cnain.out:
```cpp
freopen("chain.in","r",stdin);
freopen("cnain.out","w",stdout);
```
91. 可爱的车:
```cpp
struct Cute_Car{
ll v,a,d;
}c[100005];
```
92. pragma GCC optimize:
```cpp
#include<bits/stdc++.h>
#pragma GCC optimize(1,2,3,"Ofast","inline")
using namespace std;
```
93. 扫雷:
```cpp
/*
<html>
<head>
<title>Minesweeper</title>
<style>
.unknown {
background-color: grey;
color: grey;
}
.marked {
background-color: black;
color: black;
}
.mine {
background-color: red;
color: black;
}
.open {
background-color: white;
color: black;
}
td {
border: 1px solid black;
height: 2.5em;
width: 2.2em;
text-align: center;
}
</style>
</head>
<body>
<div>
<p>Width: <input id="width" /></p>
<p>Height: <input id="height" /></p>
<p>Mines: <input id="mines" /></p>
<button id="gen">Generate</button>
</div>
<table id="table">
</table>
<script>
let wd = document.getElementById("width");
let hd = document.getElementById("height");
let md = document.getElementById("mines");
let gb = document.getElementById("gen");
let tb = document.getElementById("table");
let mp = [];
let dx = [-1, 0, 1, -1, 1, -1, 0, 1];
let dy = [-1, -1, -1, 0, 0, 1, 1, 1];
function rf(s)
{
return Math.floor(Math.random() * s);
}
let style = ["unknown", "marked", "mine", "open"];
let mkd = 0, st = 0, ed = 0, gmc = 0;
function end()
{
ed = Date.now();
let p = document.createElement("p");
p.innerHTML = `Finished. You used ${(ed - st) / 1000} seconds.`;
document.body.appendChild(p);
}
class Block
{
td;
mine;
_state; // unknown, marked, mine, open
around;
get state()
{
return this._state;
}
set state(v)
{
if (this._state == 1 || this._state == 2)
{
mkd--;
}
if (v == 1 || v == 2)
{
mkd++;
}
if (mkd == gmc)
{
end();
}
this.td.classList = style[v];
this._state = v;
if (v == 2)
{
this.td.innerHTML = "M";
}
else if (v == 3)
{
this.td.innerHTML = this.around ? this.around : "";
}
else
{
this.td.innerHTML = "";
}
}
constructor()
{
this.td = document.createElement("td");
this.mine = 0;
this.state = 0;
}
}
function gen(w, h, m)
{
mkd = 0;
gmc = m;
tb.innerHTML = "";
mp = [];
for (let i = 0; i < w; i++)
{
let tr = document.createElement("tr");
mp[i] = [];
for (let j = 0; j < h; j++)
{
let bl = new Block();
mp[i][j] = bl;
tr.appendChild(bl.td);
}
tb.appendChild(tr);
}
for (let i = 0; i < m; i++)
{
let x = rf(w), y = rf(h);
while (mp[x][y].mine)
{
x = rf(w), y = rf(h);
}
mp[x][y].mine = 1;
}
function chk(x, y)
{
return x >= 0 && x < w && y >= 0 && y < h;
}
function opendfs(x, y)
{
mp[x][y].state = 3;
if (mp[x][y].around)
{
return;
}
for (let k = 0; k < 8; k++)
{
let i = x + dx[k], j = y + dy[k];
if (chk(i, j) && mp[i][j].state == 0)
{
opendfs(i, j);
}
}
}
function tryopen(i, j)
{
if (mp[i][j].state == 0)
{
if (mp[i][j].mine)
{
mp[i][j].state = 2;
}
else
{
opendfs(i, j);
}
}
else if (mp[i][j].state == 3)
{
let ct = 0;
for (let k = 0; k < 8; k++)
{
let x = i + dx[k], y = j + dy[k];
if (chk(x, y) && (mp[x][y].state == 1 || mp[x][y].state == 2))
{
ct++;
}
}
if (ct != mp[i][j].around)
{
return;
}
for (let k = 0; k < 8; k++)
{
let x = i + dx[k], y = j + dy[k];
if (chk(x, y) && mp[x][y].state == 0)
{
tryopen(x, y);
}
}
}
}
for (let i = 0; i < w; i++)
{
for (let j = 0; j < h; j++)
{
mp[i][j].td.addEventListener("click", () => { // open
tryopen(i, j);
});
mp[i][j].td.addEventListener("contextmenu", (e) => { // mark
e.preventDefault();
if (mp[i][j].state == 0)
{
mp[i][j].state = 1;
}
else if (mp[i][j].state == 1)
{
mp[i][j].state = 0;
}
});
if (mp[i][j].mine)
{
continue;
}
let res = 0;
for (let k = 0; k < 8; k++)
{
let x = i + dx[k], y = j + dy[k];
if (chk(x, y) && mp[x][y].mine)
{
res++;
}
}
mp[i][j].around = res;
}
}
st = Date.now();
}
gb.addEventListener("click", () => {
let w = Number(wd.value);
let h = Number(hd.value);
let m = Number(md.value);
if (!isNaN(w) && !isNaN(h) && !isNaN(m) && 1 <= w && w <= 30 && 1 <= h && h <= 30 && m < h * w)
{
gen(w, h, m);
}
});
gen(10, 10, 10);
</script>
</body>
</html>
|rmj|GD-J00176|cosf|44****************|hnsfdxfszx|cs|1|48|
|tgj|GD-S00514|0dOo|44****************|hnsfdxfszx|gy|1|48|
*/
```
94. 鲜花:
```cpp
/*
写点小作文吧。
我也是高二老登了啊。
刚刚改了 detect 的一点细节,结果过不去 detect5 了。出题人的大样例真良心。
100+100+100+[16, 40],最后一题大概是 n^3 的吧,大概能过 ci=2^k 的数据。
还有 8min。会赢吗。
烦躁。但愿 noip 也有 T3 这样的一眼题。不过一眼题真的好吗,别最后比拼 T4 暴力写了多少以及前三题有没有挂分。
好想证明一下自己啊。
我有这种天分吗。
还有回头路吗。
离考试结束还有六分钟。
再去检查一次吧。
该关掉虚拟机了。
好想写点平时写的那种鲜花,但现在好像写不出来。
祝我认识的人 rp++ 吧,你们值得有好的结果和未来。
希望这个赛季还能与熟悉的朋友在一起。
真想再在 APIO 或者 WC 见一面。
去年看着倒计时时是心如死灰的吧。初三那年的 NOIP 也是。
运气好罢了,T3 没有想太远。最后一段时间我都不能冷静思考 T4 了。好像一开始写代码我的脑子就不会想题了。
别挂分就好。
如果不甘心,就去努力吧。
*/
```
95. R.I.P+没定义 T
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
freopen("arena.in","r",stdin);
freopen("arena.out","w",stdout);
cin>>T;
while(T--) cout<<"0\n";
/*I only have 120pts this test,100+20+0+0,maybe I should get T2 70 pts,but I don't have any time now.*/
/*But zq will get the S1=,I am so happy,because he is a clever boy.*/
/*1= will be 200 pts today,I can only get 2= best*/
/*Never give up,LZH,SSY and ZQ!!!*/
/*See the CSP S next year*/
/*In the end,I should say:the duel too easy,I can get 100pts,too*/
/*Thanks CCF and GD*/
/*R.I.P*/
/*from 2024/10/26 18:26*/
return 0;
}
```
96. AK:
```cpp
bool zk_AK=0;
for(int j=1;j<=n;j++)
{
long long tys_AK=-1;
if(cmp[j])
for(int k=0;k<a[j].size();k++)
{
if(a[j][k]==y&&tys_AK!=-1)
{
if(k-tys_AK+1<=K)
{
printf("1\n");
zk_AK=1;
break;
}
}
if(a[j][k]==1)tys_AK=k;
}
if(zk_AK==1)break;
}
if(zk_AK==1)continue;
```
97. itn main:
```cpp
#include <bits/stdc++.h>
using namespace std;
itn main(){
return 0;
}
```
98. SBTMD:
```cpp
#include<bits/stdc++.h>
using namespace std;
long long t,n;
long long a[10086],c[10086];
string coloring(long long x,bool f){
if(x<=0){
if(f) return "给你是SBTMDv月共愤v就一定官";
else if(c[1]<10) return "神你v共愤官发SBTMDv就一月定给";
else if(a[1]<5) return "SBTMD";
else if(c[3]<15) return "4";
else if(a[4]<20) return "5";
}
return coloring(x-1,0)+coloring(x-1,1);
}
int main(){
freopen("color.in","r",stdin);
freopen("color.out","w",stdout);
scanf("%lld",&t);
for(int i=1;i<=t;i++){
scanf("%lld",&n);
for(int j=1;i<=n;j++){
scanf("%lld",&a[i]);
}
for(int j=1;j<=n;j++){
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
}
}
cout<<coloring(25,0);
}
```
99. 祈求有人看到(doge):
```cpp
#include<bits/stdc++.h>
using namespace std;
int main() // 祈求有人看到(doge)
{
freopen("arena.in","r",stdin);
freopen("arena.out","w",stdout);
cout<<"太难了,不会(悲)";
fclose(stdin);
fclose(stdout);
return 0;
}
```
100. 白鸟过河滩:
```cpp
//炸裂
//今年是真的简单好多?
//t1 20min
//t2 1h 我这种菜的都应该能过
//t3 AB特殊性质爽,骗60?
//t4不想看。
//要写东西吗?
//写吧
//先写写歌词
//最近听的歌
//《白鸟过河滩》
//可能是有点emo吧最近
//“
//风把我不想知道的事情 告诉我
//河把我不想忘记的故事 给带走
//我摘下我的翅膀
// 变成白鸟
//白鸟我的白鸟
//逆着风去吧
//飞过河滩
//挥一挥一去不回还
//一去不回还
//风起水起难靠岸
//白鸟白鸟不要回头望
//你要替我飞去那地方
//一去那地方
//那是你我共同故乡
//抓住和抓不住的照片 哪张更美
//去过和没去过的地方 哪里更远
//白鸟我的白鸟
//你要飞的更高不要回来
//若还想与我相见
// 就来我的梦里边
//白鸟过河滩
//挥一挥一去不回还
//一去不回还
//......
//别回来
//我将终究顺流入大海
//海不问我从何处来
//长风长风飘在山海间
//白鸟白鸟展翅入苍天
//一去入苍天
//苍天远在海背面
//一去入苍天
//苍天远比海更远
// ”
//emm...
//有点难受
//话说回来
//我的某位同学去年csp
//打注释写小作文表白
//呃呃
//我也来?
//算了
//尬死
//说实话,昨晚的我才是最emo的
//——————————
//我知道
//你不喜欢我
//但是
//尽管如此
//我也仍不会放弃
//呵呵
//难道我真的放不下吗...
//——————————
//你昨天说
//“我有什么可喜欢的”
//我想了很久
//晚上睡不着
//这个问题,等会再说
//“你不能找个温柔可爱还喜欢你的吗”
//...
//你去问问有谁喜欢我???
//tmd就算有老子也看不上
//温柔可爱...这仅限于二次元xp
//现实一点
//长得好看,成绩不错
//以及喜欢我
//我喜欢
//就够了吧...
//——————————
//回到这个问题吧
//我为什么喜欢你
//那些追你的你估计也很难回答
//我的回答...
//只有一句话
//我喜欢你
//我没办法从其它方面来回答
//因为我心中的其它回答
//都影响不了我喜欢你
//所以答案是,我喜欢你,没有理由
//——————————
//再来一段吧,现在差不多结束比赛了
//“
//你是信的开头,诗的内容,童话的结尾
//你是理所应当的奇迹,你是月色真美
//你是圣诞老人送给我,好孩子的礼物
//你是三千美丽世界里,我的一瓢水...
//”(100行,感觉算是公开展示自我了...)
```
101. damn:
```cpp
#include <bits/stdc++.h>
using namespace std;
bool jisuan[105][105];
int d[1000005];
int v[10005];
int a[10005];
int m[10005];
int main(){
freopen("detect.in","r",stdin);
freopen("detect.out","w",stdout);
int T,N,M,L,V;
cin >> T;
for (int abcdefg = 0; abcdefg < T;abcdefg++){
cin >> N >> M >> L >> V;
memset(jisuan,0,sizeof(jisuan));
for (int i = 0;i < N;i++){
cin >> d[i] >> v[i] >> a[i];
}
for (int i = 0;i < M;i++){
cin >> m[i];
}
int damn = 0;
for (int i = 0;i < N;i++){
bool flag = false;
for (int j = lower_bound(m,m+M,d[i])-m;j < M;j++){
// int sped = sqrt(pow(v[i],2)+2.0*a[i]*(m[j]-d[i]));
// if (i == 3 && j == 2){
// cout << i << " " << j << endl;
// cout << sped << endl;
// }
if (pow(v[i],2)+2.0*a[i]*(m[j]-d[i]) > V*V){
jisuan[i][j]=true;
if (!flag){
damn++;
}
flag = true;
}
}
}
// for (int i = 0;i < N;i++){
// for (int j = 0;j < M;j++){
// cout << jisuan[i][j] << ' ';
// }
// cout << endl;
// }
cout << damn << ' ' << M-damn << endl;
}
return 0;
}
```
102. ,in & ,out
![](https://cdn.luogu.com.cn/upload/image_hosting/58vwijzf.png)
![](https://cdn.luogu.com.cn/upload/image_hosting/m2gv1b66.png)
103. 英式英语&freclose
```cpp
#include<cstdio>
#include<iostream>
using namespace std;
int main()
{
freopen("colour.in","r",stdout);
freclose("colour.out","w",stdout);
fclose(stdin);
fclose(stdout);
return 0;
}
```
104. wssb
![](https://cdn.luogu.com.cn/upload/image_hosting/l2ybwfmw.png)
105. 错误太多无法概括
```cpp
#include<iostream>
#include<conio.h>
int main(space)
{
freopen("duel.in","r");
freopen("duel.out","w");
}
{
freclose("duel.in");
freclose("duel.out");
}
return 0;
```