不会写前言。不过看到我们大 SC 江山辈有神人出,老身就放心了😋
话不多说直接开赤吧😋😋😋
欢迎在 11.14 之前向我私信投稿统计遗漏的迷惑行为,我会在 11.14 再更新一次的!
也可以联系我撤下,不过要证明这是你才行。
可以点个赞吗,谢谢喵!!!
一些统计
本次 CSP-J SC 共有 名考生,他们提交了 份代码,其中 T1 有 份,T2 有 份,T3 有 份,T4 有 份。🤔
所有代码里出现了 次 //freopen,似乎大部分都在诈骗我,没有使得代码的文件读写爆炸,看来大家的反保龄意识十分强大。
还有 个 freopen("xxx.in","w",stdin),【】
此外,rp 子串出现了 次,AFO 子串出现了 次,inline 子串出现了 次,fread 子串出现了 次。
群星闪耀时
最大的文件夹
SC-J01405,TA 在 T3 末尾派放了数百架喷气式飞机:
代码
SC-J01405\and\and.cpp
____________
// / ---------------------(省略一堆减号)
// ____/
// / /
// / /
___ // /___/
/ / //___ /
____/ /_______//| | | |======================(省略一堆等于号)
<_++++ _______ | | | |=======================(省略一堆等于号)
\ \ \\|___| | |======================(省略一堆等于号)
\__\ \\ ____\
\\ \ \
\\ \ \
\\ \____\
\\ \
\\__________\ ---------------------(省略一堆减号)
(省略一堆空行和一堆相同的飞机)
最小的文件夹
SC-J01182,这是 TA 的全部代码:
代码
SC-J01182\travel\travel.cpp
#include<bits/stdc++.h>
using namespace std;
int mian()
{
//freopen("travel1.in","r",stdin);
//freopen("travel1.out","w",stdout);SC-J01182\string\string.cpp
#include<bits/stdc++.h>
using namespace std;
int main()
{
return 0;
} 来年再战!
出现的唯一一个 AFO
SC-J00087\card\card.cpp
...
/*
T3T4都不会
没有1=的话就要AFO了
再见了OI
希望部分分能多一点吧
*/祝你 1=。
大哥上楼梯
SC-J02226 掏出的秘制代码:
代码
SC-J02226\and\and.cpp
#include<bits/stdc++.h>
using namespace std;
int n,m,a[100005],maxx,maxxx,pop,ppp,b[100005],pip;
int main(){
freopen("and.in","r",stdin);
freopen("and.out","w",stdout);
cin>>n>>m;
for(int i=1;i<=n;i++){
cin>>a[i];
if(a[i]!=i-1){
pop=1;
}
if(a[i]>4) ppp=1;
if((a[i]+1)/2==1&&a[i]!=0) pip=1;
}
if(pop==0&&n>=2000){
cout<<n/2-1;
return 0;
}
if(pip==0&&n>=2000){
sort(a+1,a+1+n);
cout<<a[n-m+1];
return 0;
}
if(n>2000&&ppp==0){
for(int i=1;i<=n;i++){
if(a[i]==4) b[4]++;
if(a[i]==3) b[3]++;
if(a[i]==2) b[2]++;
if(a[i]==1) b[1]++;
}
if(b[4]>=m){
cout<<4;
return 0;
}
else if(b[3]>=m){
cout<<3;
return 0;
}
else if(b[3]+b[2]>=m){
cout<<2;
return 0;
}
else if(b[3]+b[1]>=m){
cout<<1;
}
else{
cout<<0;
}
}
if(m==n){
for(int i=1;i<=n;i++){
maxx=maxx&a[i];
}
cout<<maxx;
return 0;
}
if(m==n-1){
for(int i=1;i<=n;i++){
for(int l=1;l<=n;l++){
if(l!=i){
maxxx=a[l];
break;
}
}
for(int o=1;o<=n;o++){
if(o==i) continue;
maxxx&=a[o];
}
maxx=max(maxx,maxxx);
}
cout<<maxx;
return 0;
}
/*if(m==n-2){
for(int i=1;i<=n;i++){
for(int o=i+1;o<=n;o++){
for(int l=1;l<=n;l++){
if(l!=i&&l!=o){
maxxx=a[l];
break;
}
}
for(int p=1;p<=n;p++){
if(p==i||p==o) continue;
maxxx&=a[p];
}
}
maxx=max(maxx,maxxx);
}
cout<<maxx;
return 0;
}
if(m==n-3){
for(int i=1;i<=n;i++){
for(int o=i+1;o<=n;o++){
for(int y=o+1;y<=n;y++){
for(int l=1;l<=n;l++){
if(l!=i&&l!=o&&l!=y){
maxxx=a[l];
break;
}
}
for(int p=1;p<=n;p++){
if(p==i||p==o||p==y) continue;
maxxx&=a[p];
}
maxx=max(maxx,maxxx);
}
}
}
cout<<maxx;
return 0;
}*/
if(m==1){
for(int i=1;i<=n;i++){
maxx=max(maxx,a[i]);
}
cout<<maxx;
return 0;
}
if(m==2){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
maxx=max(maxx,a[i]&a[j]);
}
}
cout<<maxx;
return 0;
}
if(m==3){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
maxx=max(maxx,a[i]&a[j]&a[k]);
}
}
}
cout<<maxx;
return 0;
}
if(m==4){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
for(int l=k+1;l<=n;l++){
maxx=max(maxx,a[i]&a[j]&a[k]&a[l]);
}
}
}
}
cout<<maxx;
return 0;
}
if(m==5){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
for(int l=k+1;l<=n;l++){
for(int p=l+1;p<=n;p++){
maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]);
}
}
}
}
}
cout<<maxx;
return 0;
}
if(m==6){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
for(int l=k+1;l<=n;l++){
for(int p=l+1;p<=n;p++){
for(int pp=p+1;pp<=n;pp++){
maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]);
}
}
}
}
}
}
cout<<maxx;
return 0;
}
if(m==7){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
for(int l=k+1;l<=n;l++){
for(int p=l+1;p<=n;p++){
for(int pp=p+1;pp<=n;pp++){
for(int ppp=pp+1;ppp<=n;ppp++){
maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]);
}
}
}
}
}
}
}
cout<<maxx;
return 0;
}
if(m==8){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
for(int l=k+1;l<=n;l++){
for(int p=l+1;p<=n;p++){
for(int pp=p+1;pp<=n;pp++){
for(int ppp=pp+1;ppp<=n;ppp++){
for(int pppp=ppp+1;pppp<=n;pppp++){
maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]);
}
}
}
}
}
}
}
}
cout<<maxx;
return 0;
}
if(m==9){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
for(int l=k+1;l<=n;l++){
for(int p=l+1;p<=n;p++){
for(int pp=p+1;pp<=n;pp++){
for(int ppp=pp+1;ppp<=n;ppp++){
for(int pppp=ppp+1;pppp<=n;pppp++){
for(int ppppp=pppp+1;ppppp<=n;ppppp++){
maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]);
}
}
}
}
}
}
}
}
}
cout<<maxx;
return 0;
}
if(m==10){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
for(int l=k+1;l<=n;l++){
for(int p=l+1;p<=n;p++){
for(int pp=p+1;pp<=n;pp++){
for(int ppp=pp+1;ppp<=n;ppp++){
for(int pppp=ppp+1;pppp<=n;pppp++){
for(int ppppp=pppp+1;ppppp<=n;ppppp++){
for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]);
}
}
}
}
}
}
}
}
}
}
cout<<maxx;
return 0;
}
if(m==11){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
for(int l=k+1;l<=n;l++){
for(int p=l+1;p<=n;p++){
for(int pp=p+1;pp<=n;pp++){
for(int ppp=pp+1;ppp<=n;ppp++){
for(int pppp=ppp+1;pppp<=n;pppp++){
for(int ppppp=pppp+1;ppppp<=n;ppppp++){
for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
for(int bb=pppppp+1;bb<=n;bb++){
maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]);
}
}
}
}
}
}
}
}
}
}
}
cout<<maxx;
return 0;
}
if(m==12){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
for(int l=k+1;l<=n;l++){
for(int p=l+1;p<=n;p++){
for(int pp=p+1;pp<=n;pp++){
for(int ppp=pp+1;ppp<=n;ppp++){
for(int pppp=ppp+1;pppp<=n;pppp++){
for(int ppppp=pppp+1;ppppp<=n;ppppp++){
for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
for(int bb=pppppp+1;bb<=n;bb++){
for(int bbb=bb+1;bbb<=n;bbb++){
maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]&a[bbb]);
}
}
}
}
}
}
}
}
}
}
}
}
cout<<maxx;
return 0;
}
if(m==13){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
for(int l=k+1;l<=n;l++){
for(int p=l+1;p<=n;p++){
for(int pp=p+1;pp<=n;pp++){
for(int ppp=pp+1;ppp<=n;ppp++){
for(int pppp=ppp+1;pppp<=n;pppp++){
for(int ppppp=pppp+1;ppppp<=n;ppppp++){
for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
for(int bb=pppppp+1;bb<=n;bb++){
for(int bbb=bb+1;bbb<=n;bbb++){
for(int bbbb=bbb+1;bbbb<=n;bbbb++){
maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]&a[bbb]&a[bbbb]);
}
}
}
}
}
}
}
}
}
}
}
}
}
cout<<maxx;
return 0;
}
if(m==14){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
for(int l=k+1;l<=n;l++){
for(int p=l+1;p<=n;p++){
for(int pp=p+1;pp<=n;pp++){
for(int ppp=pp+1;ppp<=n;ppp++){
for(int pppp=ppp+1;pppp<=n;pppp++){
for(int ppppp=pppp+1;ppppp<=n;ppppp++){
for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
for(int bb=pppppp+1;bb<=n;bb++){
for(int bbb=bb+1;bbb<=n;bbb++){
for(int bbbb=bbb+1;bbbb<=n;bbbb++){
for(int bbbbb=bbbb+1;bbbbb<=n;bbbbb++){
maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]&a[bbb]&a[bbbb]&a[bbbbb]);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
cout<<maxx;
return 0;
}
if(m==15){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
for(int l=k+1;l<=n;l++){
for(int p=l+1;p<=n;p++){
for(int pp=p+1;pp<=n;pp++){
for(int ppp=pp+1;ppp<=n;ppp++){
for(int pppp=ppp+1;pppp<=n;pppp++){
for(int ppppp=pppp+1;ppppp<=n;ppppp++){
for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
for(int bb=pppppp+1;bb<=n;bb++){
for(int bbb=bb+1;bbb<=n;bbb++){
for(int bbbb=bbb+1;bbbb<=n;bbbb++){
for(int bbbbb=bbbb+1;bbbbb<=n;bbbbb++){
for(int bbbbbb=bbbbb+1;bbbbbb<=n;bbbbbb++){
maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]&a[bbb]&a[bbbb]&a[bbbbb]&a[bbbbbb]);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
cout<<maxx;
return 0;
}
if(m==16){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
for(int l=k+1;l<=n;l++){
for(int p=l+1;p<=n;p++){
for(int pp=p+1;pp<=n;pp++){
for(int ppp=pp+1;ppp<=n;ppp++){
for(int pppp=ppp+1;pppp<=n;pppp++){
for(int ppppp=pppp+1;ppppp<=n;ppppp++){
for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
for(int bb=pppppp+1;bb<=n;bb++){
for(int bbb=bb+1;bbb<=n;bbb++){
for(int bbbb=bbb+1;bbbb<=n;bbbb++){
for(int bbbbb=bbbb+1;bbbbb<=n;bbbbb++){
for(int bbbbbb=bbbbb+1;bbbbbb<=n;bbbbbb++){
for(int ii=bbbbbb+1;ii<=n;ii++){
maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]&a[bbb]&a[bbbb]&a[bbbbb]&a[bbbbbb]&a[ii]);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
cout<<maxx;
return 0;
}
if(m==17){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
for(int l=k+1;l<=n;l++){
for(int p=l+1;p<=n;p++){
for(int pp=p+1;pp<=n;pp++){
for(int ppp=pp+1;ppp<=n;ppp++){
for(int pppp=ppp+1;pppp<=n;pppp++){
for(int ppppp=pppp+1;ppppp<=n;ppppp++){
for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
for(int bb=pppppp+1;bb<=n;bb++){
for(int bbb=bb+1;bbb<=n;bbb++){
for(int bbbb=bbb+1;bbbb<=n;bbbb++){
for(int bbbbb=bbbb+1;bbbbb<=n;bbbbb++){
for(int bbbbbb=bbbbb+1;bbbbbb<=n;bbbbbb++){
for(int ii=bbbbbb+1;ii<=n;ii++){
for(int iii=ii+1;iii<=n;iii++){
maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]&a[bbb]&a[bbbb]&a[bbbbb]&a[bbbbbb]&a[ii]&a[iii]);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
cout<<maxx;
return 0;
}
if(m==18){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
for(int l=k+1;l<=n;l++){
for(int p=l+1;p<=n;p++){
for(int pp=p+1;pp<=n;pp++){
for(int ppp=pp+1;ppp<=n;ppp++){
for(int pppp=ppp+1;pppp<=n;pppp++){
for(int ppppp=pppp+1;ppppp<=n;ppppp++){
for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
for(int bb=pppppp+1;bb<=n;bb++){
for(int bbb=bb+1;bbb<=n;bbb++){
for(int bbbb=bbb+1;bbbb<=n;bbbb++){
for(int bbbbb=bbbb+1;bbbbb<=n;bbbbb++){
for(int bbbbbb=bbbbb+1;bbbbbb<=n;bbbbbb++){
for(int ii=bbbbbb+1;ii<=n;ii++){
for(int iii=ii+1;iii<=n;iii++){
for(int iiii=iii+1;iiii<=n;iiii++){
maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]&a[bbb]&a[bbbb]&a[bbbbb]&a[bbbbbb]&a[ii]&a[iii]&a[iiii]);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
cout<<maxx;
return 0;
}
if(m==19){
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
for(int k=j+1;k<=n;k++){
for(int l=k+1;l<=n;l++){
for(int p=l+1;p<=n;p++){
for(int pp=p+1;pp<=n;pp++){
for(int ppp=pp+1;ppp<=n;ppp++){
for(int pppp=ppp+1;pppp<=n;pppp++){
for(int ppppp=pppp+1;ppppp<=n;ppppp++){
for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
for(int bb=pppppp+1;bb<=n;bb++){
for(int bbb=bb+1;bbb<=n;bbb++){
for(int bbbb=bbb+1;bbbb<=n;bbbb++){
for(int bbbbb=bbbb+1;bbbbb<=n;bbbbb++){
for(int bbbbbb=bbbbb+1;bbbbbb<=n;bbbbbb++){
for(int ii=bbbbbb+1;ii<=n;ii++){
for(int iii=ii+1;iii<=n;iii++){
for(int iiii=iii+1;iiii<=n;iiii++){
for(int iiiii=iiii+1;iiiii<=n;iiiii++){
maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]&a[bbb]&a[bbbb]&a[bbbbb]&a[bbbbbb]&a[ii]&a[iii]&a[iiii]&a[iiiii]);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
cout<<maxx;
return 0;
}
return 0;
} for 的恩情还不完 \😭/
我要上电视
SC-J01823 老师,你成功了!
代码
SC-J01823\card\card.cpp
...
/*
上午考J组,下午还要考S组。。。
我想上电视可以吗。。。
貌似J很简单,may be 100+100+100+48=348,SC 1=线总不可能上300吧。。。,评测机不要卡我常555,那么S组一定就很难了吧。。。
如果S我没有1=,I'll AAAAAAFFFFFFFFFFFOOOOOOOOOO。
也是直接遗憾离场了。。。
下午S我会继续写的,所以可以蹲一个后续。。。
*/
```cpp虽然很可惜,因为没有那么多的时间和精力,我只统计了 J 组。
魔怔人
SC-J01797 在 T4 贴了 671 句 @double_bird 我喜欢你喵!😨
区神
代码
SC-J02114\string\string.cpp
...
/*
I'm the god , and the smartest brain in the world think this code isn't correct .
Although I have much power , but I can't find any data can hack it.(Well ,the true is,I'm too lazy)
Q : Do you know who am I ? A : I'm the god of qu!!!
*/不知道写什么标题
代码
SC-J01781\*\*.cpp
#include<bits/stdc++.h>
#define LoveCyrene ios :: sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)
#define LoveAnastasya freopen("string.in", "r", stdin)
#define LoveOdette freopen("string.out", "w", stdout)whk 大手子
祝好!
代码
SC-J01014\card\card.cpp
#include<bits/stdc++.h>
using namespace std;
int main()
{
freopen("card.in","r",stdin);
freopen("card.out","w",stdout);
ios::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
/*学文化去了,OI太难学了,还是语数英好学
我确实有点懒了,
但感谢各位工作人员的鼎力支持,祝各位一帆风顺;
10101 121212121212 121212121212 101010101010
10 12 12 12 10 10
101010101010 12 12 12 10 10
10 10 12 21 12 12 10 10
10 10 12 12 121212121212 101010101010
101010101010 121212121212 12 10
10 12 12 10
10 121212121 12 10
10 12 12 10
10 12 12 10
10 121212121212 12121212121 101010101010
最磕的一对CP
return 0;
}
(没有 */)渣渣帅,吴。迪,队。英改。师!
SC-J01259 在 T4 末尾放了 30KB 的
/*渣渣帅,吴。迪
队。英改。师!*/ 以及 T1 的:
//olD-mOwOn;
/*霉条,补。市区*/
/*回家第一件事,打开KARDSjjc,150金币一次我非常癫狂,德国主国法国盟国三张撤退坦克
还有俯冲懵逼哥谁能如何我?!*/ freopen(“xxx.in”,“w”,stdin)
call call back 一下。出现的 次有以下同学:
SC-J00032,TA 只有 T3 是这么写的🤔
SC-J00186,你包领了。
SC-J00233,你怎么和 SC-J00032 一样只有 T3 是这么写的/咦
SC-J00706,你也包领了。
SC-J01029 老师与众不同,别人是交换 r w,TA 的两个 freopen 都写了 w。
SC-J01086 比较强大,TA 的头文件是 #include <bits/std c++.h>;,关同步流的方式是 ios::sync_with_studio(false); cin.tie(pulltr);,换行是 /n。
SC-J01352,SC-J01650,SC-J01974,你们都包领了。
三峡,记承天寺夜游,渡荆门送别
代码
SC-J00247\travel\travel.cpp
...
/*
自三峡七百里中,两岸连山,略无阙处。重岩叠嶂,隐天蔽日。自非亭午夜分,不见曦月。
风烟俱净,天山共色。从流飘荡,任意东西。自富阳至桐庐一百余里,奇山异水,天下独绝。
水皆缥碧,千丈见底。游鱼细石,直视无碍。急湍甚箭,猛浪若奔。
元丰六年十月十二日夜,解衣欲睡,月色入户,欣然起行。念无与为乐者,遂至承天寺寻张怀民。怀民亦未寝,相与步于中庭。
庭下如积水空明,水中藻,荇交横,盖竹柏影也。何夜无月,何处无竹柏,但少闲人如吾两人者耳。
渡远荆门外,来从楚国游。山随平野尽,江入大荒流。月下飞天镜,云生结海楼。仍怜故乡水,万里送行舟。
*/Die For You,Da Capo
xm 会默写。
代码
SC-J00313\and\and.cpp
...
/*
What do you see before it's over
Blinding flash is getting closer
Wish there's something left to lose
It's could be the day I die for you
*/SC-J00313\card\card.cpp
#include<bits/stdc++.h>
#define int long long
using namespace std;
const int N=5e5+10,M=3e5+10;
int a[N],las[N],res[N],cnt[N];
signed main(){
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
freopen("card.in","r",stdin);
freopen("card.out","w",stdout);
int n,m;cin>>n>>m;
for(int i=1;i<=n;i++) cin>>a[i];
for(int i=n;i>=1;i--){
if(!las[a[i]]) las[a[i]]=i;
cnt[i]=1;
}
for(int i=1;i<=n;i++) cnt[las[a[i]]+1]+=cnt[i],res[a[i]]+=cnt[i];
for(int i=1;i<=m;i++) cout<<res[i]<<" ";
return 0;
}/*lg_751367
When good old friends are going away
Will you wish them to remember your name
When good old days are passing away
Will you promise your heart remains the same
Never can we surspend the time
Having to leave the tracks behind
There's a longer way ahead, after all
There used to be a story teller
Who always paints the sunshine and the rain
One has to even truly grow up
Spending a lifetime to taste love and pain
Never can we surspend the time
Having to leave the tracks behind
There's longer way ahead, after all
If it's too hard to say goodbye
Give us a try to sing a rhythm
May you the beauty of this world, always shine
*/#include<bits/stl_iterator_base_types.h>
这个人的代码怎么复制的是 #include<bits/stl_iterator_base_types.h>。
代码
SC-J00422\and\and.cpp
// Types used in iterator implementation -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996-1998
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file bits/stl_iterator_base_types.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{iterator}
*
* This file contains all of the general iterator-related utility types,
* such as iterator_traits and struct iterator.
*/
#ifndef _STL_ITERATOR_BASE_TYPES_H
#define _STL_ITERATOR_BASE_TYPES_H 1
#pragma GCC system_header
#include <bits/c++config.h>
#if __cplusplus >= 201103L
# include <type_traits> // For _GLIBCXX_HAS_NESTED_TYPE, is_convertible
#endif
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @defgroup iterators Iterators
* Abstractions for uniform iterating through various underlying types.
*/
//@{
/**
* @defgroup iterator_tags Iterator Tags
* These are empty types, used to distinguish different iterators. The
* distinction is not made by what they contain, but simply by what they
* are. Different underlying algorithms can then be used based on the
* different operations supported by different iterator types.
*/
//@{
/// Marking input iterators.
struct input_iterator_tag { };
/// Marking output iterators.
struct output_iterator_tag { };
/// Forward iterators support a superset of input iterator operations.
struct forward_iterator_tag : public input_iterator_tag { };
/// Bidirectional iterators support a superset of forward iterator
/// operations.
struct bidirectional_iterator_tag : public forward_iterator_tag { };
/// Random-access iterators support a superset of bidirectional
/// iterator operations.
struct random_access_iterator_tag : public bidirectional_iterator_tag { };
//@}
/**
* @brief Common %iterator class.
*
* This class does nothing but define nested typedefs. %Iterator classes
* can inherit from this class to save some work. The typedefs are then
* used in specializations and overloading.
*
* In particular, there are no default implementations of requirements
* such as @c operator++ and the like. (How could there be?)
*/
template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
typename _Pointer = _Tp*, typename _Reference = _Tp&>
struct iterator
{
/// One of the @link iterator_tags tag types@endlink.
typedef _Category iterator_category;
/// The type "pointed to" by the iterator.
typedef _Tp value_type;
/// Distance between iterators is represented as this type.
typedef _Distance difference_type;
/// This type represents a pointer-to-value_type.
typedef _Pointer pointer;
/// This type represents a reference-to-value_type.
typedef _Reference reference;
};
/**
* @brief Traits class for iterators.
*
* This class does nothing but define nested typedefs. The general
* version simply @a forwards the nested typedefs from the Iterator
* argument. Specialized versions for pointers and pointers-to-const
* provide tighter, more correct semantics.
*/
#if __cplusplus >= 201103L
_GLIBCXX_HAS_NESTED_TYPE(iterator_category)
template<typename _Iterator,
bool = __has_iterator_category<_Iterator>::value>
struct __iterator_traits { };
template<typename _Iterator>
struct __iterator_traits<_Iterator, true>
{
typedef typename _Iterator::iterator_category iterator_category;
typedef typename _Iterator::value_type value_type;
typedef typename _Iterator::difference_type difference_type;
typedef typename _Iterator::pointer pointer;
typedef typename _Iterator::reference reference;
};
template<typename _Iterator>
struct iterator_traits
: public __iterator_traits<_Iterator> { };
#else
template<typename _Iterator>
struct iterator_traits
{
typedef typename _Iterator::iterator_category iterator_category;
typedef typename _Iterator::value_type value_type;
typedef typename _Iterator::difference_type difference_type;
typedef typename _Iterator::pointer pointer;
typedef typename _Iterator::reference reference;
};
#endif
/// Partial specialization for pointer types.
template<typename _Tp>
struct iterator_traits<_Tp*>
{
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef ptrdiff_t difference_type;
typedef _Tp* pointer;
typedef _Tp& reference;
};
/// Partial specialization for const pointer types.
template<typename _Tp>
struct iterator_traits<const _Tp*>
{
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef ptrdiff_t difference_type;
typedef const _Tp* pointer;
typedef const _Tp& reference;
};
/**
* This function is not a part of the C++ standard but is syntactic
* sugar for internal library use only.
*/
template<typename _Iter>
inline typename iterator_traits<_Iter>::iterator_category
__iterator_category(const _Iter&)
{ return typename iterator_traits<_Iter>::iterator_category(); }
//@}
// If _Iterator has a base returns it otherwise _Iterator is returned
// untouched
template<typename _Iterator, bool _HasBase>
struct _Iter_base
{
typedef _Iterator iterator_type;
static iterator_type _S_base(_Iterator __it)
{ return __it; }
};
template<typename _Iterator>
struct _Iter_base<_Iterator, true>
{
typedef typename _Iterator::iterator_type iterator_type;
static iterator_type _S_base(_Iterator __it)
{ return __it.base(); }
};
#if __cplusplus >= 201103L
template<typename _InIter>
using _RequireInputIter = typename
enable_if<is_convertible<typename
iterator_traits<_InIter>::iterator_category,
input_iterator_tag>::value>::type;
#endif
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif /* _STL_ITERATOR_BASE_TYPES_H */那你也进来吧
代码
SC-J00495\travel\travel.cpp
...
/*
8:31 解压,密码:Trick||Treat! ?
8:32 读 T1
8:33 红题!!!
8:42 秒杀!
8:42 读 T2
8:44 T2 黄?
8:49 测大样例......
8:51 大样例全过了?!
8:52 读 T3
8:54 坏了,T3 一眼没思路
8:56 有一点点思路,试试?说干就干!
9:01 测大样例
9:02 坏了,挂了,调代码......
9:03 饭堂了,0 写成 1 了
9:04 再测大样例,全对
9:05 读 T4
9:06 嗯...不会,想一想
9:08 盲猜留下来的数有一定性质
9:11 有点模糊的思路,模拟一下(终于用上草稿纸了)
9:15 思路假了
9:39 好像分析出思路了~~~
9:47 写完了,测大样例
9:50 大样例全过?我...AK了?
9:55 用虚拟机跑一下
9:57 !不对,我怎么用size类型和long long比,强转!
9:58 编译通过
9:58 开始提交
9:58 交完了,开始对...不对,暴力好像不是很好写
9:59 算了,总结一手,反正也没事干。
10:00 总结
# 总结
今天是CSP考试,应该会挂分吧。。。但是又不想对拍。
今天上午的思维过程如上,下面应该还会写。
这个应该可以进人类迷惑行为大赏吧。
再看看题目:
T1 : 我的评价是上红下橙,算法:选择结构,大唐题,
只是细节有点多,成功成为四道题中最长最屎的代码,O(1)。
T2 : 黄题吧,定义两个指针从两边往中间扫就行了,
O(n)。
T3 : 黄 or 绿?反正感觉好像很水,
贪心考虑从大往小枚举每一位,
然后将那位是 1 的放进候选,其余不要。
分类讨论如果候选有 m 个答案的那一位就是 1,
反之为 0 。需要注意的是下一次选侯选应从
上一轮选出的里面选,复杂度 O(n log maxa)。
T4 : 绿 or 青?有点思维含量,但是通过手玩样例,
从而发现一些性质,即设一个数的贡献为一个状态,
即:从一个位置开始操作剩下的有哪些作为一个状态,
每次从后往前扫,若是第一次出现,就是在上一个状态
中加上它自己,反之就是上一个它自己的状态,
通过这些指针可以成功建出一颗树,同时保存每一个数
第一次出现的位置作为根,然后统计子树大小就行了,
复杂度 O(n+m)。
题目难度大概是红黄黄青吧,但是我感觉我赛事切青
不太可能,还是评绿吧,J 组也是越来越简单了。
10:17 写完总结
10:18 无聊
10:19 睡觉
10:47 椅子太高了,不舒服,睡不着
10:48 玩会虚拟机(这学校机房竟然没有蜘蛛纸牌,太恶心了)
11:04 不好玩,玩会...不知道玩啥了,睡觉
真心想进迷惑行为大赏,感谢作者。
qwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwq
qwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwq
qwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwq
qwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwq
*/作者显然是好人啊,有求必应,😋
咋考试的时候有人在楼下弹《妄想感伤代偿联盟》?
代码
SC-J00520\and\and.cpp
...
/*
????咋考试的时候有人在楼下弹《妄想感伤代偿联盟》???
孩子的思路是错的好难受
哎对了?
这个特殊B咋没过但是样例5过了呢?
赌一把只是过不了特性B
...这么牛,哪个考场的,
Buy buy baby blue~
代码
SC-J00531\travel\travel.cpp
...
/*
Buy buy baby blue~
_|__|_|_
/ \
| . . | _____
| V | /____/|
\_______/ ___________ | | |
| / /\ |RP++| |
----|---- / 999.99$ / \ |RK--| |
| /__________/____\ |____|/
|
/\
/ \
| |
\O/
|
/\
\O/
|
/\
\O/
|
/\
\O/
|
/\
\O/
|
/\
\O/
|
/\
\O/
|
/\
\O/
|
/\
\O/
|
/\
\O/
|
/\
...我还是绷住吧,!
人赢😡捅死你喵😡
@wsy_I😡😡😡
代码
SC-J01653\card\card.cpp
...
//code by wsy_I. luogu uid: 1152799
/*
J 组 AK 了,这个题在对拍。我猜的结论,目前拍了很多组没拍出来。
应该是时候写点什么,发表一下感慨了?
(话说我这个不会要上迷惑行为大赏吧)
哎,其实我这个时候来打比赛实际上是心态爆炸的,很容易情绪失控。
J 组当时 T4 跑过所有大样例的时候都差点哭出来了。
学校分班之后,也不知道我和 npy 现在关系怎么样了。
我对她还重要吗。我是不是一个可有可无的人了。
她曾是我前途路上的灯塔啊。而我之前对她啥也不是。
我就是一个初一下学期分班考全班倒一的滚木。
她已经给我很多面子了,我还强求永远在一起干嘛。
她现在都在遂宁了。跟现在在考试的我隔着几百公里。
至少她给过我美好的回忆。至少我一直会对她好。这就足够了。
*/[僵尸喝治疗药水.png]