cspj2021-js
感谢囧仙提供的统计代码。
//JY,bilibilitdasc
文操类:
#include<bits/stdc++.h>
using namespace std;
int n,L,R,maxn;
int main()
{
//freopen("candy.in","r",stdin);
//freopen("candy.out","w",stdout);
cin>>n>>L>>R;
for(int i=L;i<=R;i++)
{
maxn=max(maxn,i-(i/n)*n);
if(maxn==n-1)break;
}
cout<<maxn;
return 0;
}
默哀注释freopen的人。
等这些人四个程序全部注释了freopen/jk/jk
出现了92个注释freopen 约合25-40人 其中好多人全部注释了 默哀
#include<bits/stdc++.h>
using namespace std;
int n,Q,a[8006];
int main(){
freopen("sort.in","r",stdin);
freopen("sort.out","w",stdin);
scanf("%d%d",&n,&Q);
for(int i=1;i<=n;i++){
scanf("%d",&a[i]);
}
for(int i=1;i<=n;i++){
cout<<1;
}
return 0;
}
"w" , s t d i n 人*4
对应4份"r",stdout……
int main()
{
//freopen("sort.in","r","stdin");
//freopen("sort.out","w","stdout");
cin>>n>>Q;
for(int i=1;i<=n;i++)
{
cin>>a[i];
b[i]=a[i];
a1[i]=i,b1[i]=i;
}
" s t d i n "人*7
对应7份"stdout"……
还好没有标准答案人 好
#include<bits/stdc++.h>
using namespace std;
int l,r,k,n,fa,sa,fb,sb;
int main(){
freopen("candy.in.txt","r",stdin);
freopen("candy.out.txt","w",stdout);
cin>>n>>l>>r;
if(l==r){
cout<<r%n;
exit(0);
}
sa=l%n;
sb=r%n;
if(sb<=sa)
cout<<n-1;
else
cout<<sb;
return 0;
}
.i n . t x t
迷惑行为类
#include<bits/stdc++.h>
using namespace std;
int n;
string op;
string s;
vector <string> s1(1,"");
vector <string> s2(1,"");
int main(){
freopen("network.in","r",stdin);
freopen("network.out","w",stdout);
cin>>n;
string a,b,c,d,e;
while(n--){
cin>>op;
cin>>s;
cout<<"OK";
}
return 0;
}
O K 人
关键是还不换行……
#include<bits/stdc++.h>
using namespace std;
long long n,a[20000+5],flag[20000+5],x,f,b[20005];
int main(){
freopen("sort.in","r",stdin);
freopen("sort.out","w",stdout);
a[0]=3;
b[0]=3;
scanf("%lld",&n);
for(int i=1;i<=n;i++){
scanf("%lld",&a[i]);
b[i]=a[i];
}
cout<<"1 3 5 8 9 11"<<endl;
cout<<"2 2 4 6 12"<<endl;
cout<<"3 7"<<endl;
cout<<"4 10"<<endl;
return 0;
}
抄 样 例 只 抄 一 个 人
#include<bits/stdc++.h>
using namespace std;
int n,ans;
bool ge=true,chong=false,finds=false;
void check(int q1,char q11,int q2,char q22,int q3,char q33,int q4,char q44,int q5){
if(q11!='.'||q22!='.'||q33!='.'||q44!=':'){
ge=false;
cout<<" "<<"ERR"<<endl;
return;
}
if(q1>255||q2>255||q3>255||q4>255||q5>65535){
ge=false;
cout<<"ERR"<<endl;
return;
}
}
struct node{
string name;
int a,b,c,d,e;
char a1,b1,c1,d1;
}stu[1005];
int main(){
freopen("network.in","r",stdin);
freopen("network.out","w",stdout);
string name,a;
scanf("%d",&n);
for(int i=1;i<=n;i++){
cin>>stu[i].name;
cin>>stu[i].a>>stu[i].a1>>stu[i].b>>stu[i].b1>>stu[i].c>>stu[i].c1>>stu[i].d>>stu[i].d1>>stu[i].e;
check(stu[i].a,stu[i].a1,stu[i].b,stu[i].b1,stu[i].c,stu[i].c1,stu[i].d,stu[i].d1,stu[i].e);
if(ge==true){
if(stu[i].name[0]=='S'){
for(int j=1;j<=i-1;j++){
if(stu[j].name[0]=='S'&&stu[j].a==stu[i].a&&stu[j].a1==stu[i].a1&&stu[j].b==stu[i].b&&stu[j].b1==stu[i].b1&&stu[j].c==stu[i].c&&stu[j].c1==stu[i].c1&&stu[j].d==stu[i].d&&stu[j].d1==stu[i].d1&&stu[j].e==stu[i].e)
{
chong=true;
break;
}
}
if(chong==false)
cout<<"OK"<<endl;
if(chong==true)
cout<<"FAIL"<<endl;
chong=false;
}
if(stu[i].name[0]=='C'){
for(int j=1;j<=i-1;j++){
if(stu[j].name[0]=='S'&&stu[j].a==stu[i].a&&stu[j].a1==stu[i].a1&&stu[j].b==stu[i].b&&stu[j].b1==stu[i].b1&&stu[j].c==stu[i].c&&stu[j].c1==stu[i].c1&&stu[j].d==stu[i].d&&stu[j].d1==stu[i].d1&&stu[j].e==stu[i].e)
{
finds=true;
ans=j;
break;
}
}
if(finds==true)
cout<<ans<<endl;
if(finds==false)
cout<<"FAIL"<<endl;
finds=false;
}
}
ge=true;
}
return 0;
}
电 脑 = 学 生 人
#include<bits/stdc++.h>
using namespace std;
int main()
{
return 0;
}
毕 生 所 学
#include<stdio>
using namespace std;
int main()
{
freopen("sort.in","r",stdin);
freopen("sort.out","w",stdout);
int n,q;
cin>>n>>q;
multset <int> st;
for(int i=0;i<=n;i++)
{
int x;
cin>>x;
st.insert(x);
}
while(q--)
{
int op,cin>>op;
for(int i=0;i<n;i++)
{
}
}
if(op==2)
{
int x;cin>>x;x--;
for(int i=0;i<n;i++)
set <int>: : iterator it=st.begin();
cout<<-*it<<endl;
}
else
{
int pos,x; cin>>pos>>x;
set <int> : : iterator it=st.begin();
}
return 0;
}
脱 裤 子 放 屁 人 + 乱 改 头 文 件 人
#include<bits/stdc++.h>
using namespace std;
int a[2^64];
int main()
{
int n,sum=0;
freopen(".in","r",stdin);
freopen(".out","w",stdout);
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>n;
}
for(int i=1;i<=n;i++)
{
if(a[i]==a[i+1])
{
sum++;
a[i]=' ';
cout<<i;
}
}
return 0;
}
留 给 老 师 写 名 字 人
#include<bits/stdc++.h>
using namespace std;
int main()
{
freopen("fruit.in","r",stdin);
freopen("fruit.out","w",stdout);
int n,a[200005],i,c;
scanf("%d",&n);
c=n;
for(i=1; i<=n; i++)
scanf("%d",&a[i]);
cout<<0<<endl;
return 0;
}
想 得 零 分 人
/*for(int i=1;i<=n;i++)
{
cout<<a[i].first<<' '<<a[i].second<<endl;
}*/
/*cout<<"$$$&\n";
for(int i=1;i<=n;i++)
{
cout<<i<<':'<<a[i].first<<' '<<a[i].second<<' '<<aid[i]<<endl;
}*/
C C F 式 调 试
#include<bits/stdc++.h>
using namespace std;
//fuck ccf --By Luogu-uid 4***69
int main()
{
freopen("candy.in","r",stdin);
freopen("candy.out","w",stdout);
int n,l,r;
cin>>n>>l>>r;
for(int i=n-1;i>=0;--i)
{
for(int j=l;j<=r;++j)
{
if((j-i)%n==0)
{
cout<<i;
return 0;
}
}
}
return 0;
}
青 史 留 名 人(已手动打码uid)
//10:23 finish
计 时 人
#include <bits/stdc++.h>
using namespace std;
int n,t,numd,numm,i,j;
bool d,m,c;
string s,num[1005];
int main(){
freopen("network1.in","r",stdin);
freopen("network.out","w",stdout);
cin>>n;
d=false;
for(i=1;i<=n;i++){
cin>>s;numd=numm=0;d=m=c=false;
if(s[0]=='S'){
for(j=7;j<=sizeof(s);j++){
if(s[j]>='0'&&s[j]<='9'){
t=t*10+s[j]-48;
if(t>65535||t>255&&m==false||s[j]=='0'&&s[j-1]=='0'){
t=0;
cout<<"ERR"<<endl;
break;
}
if(numd==3)m=true;
d=true;
}
if(s[j]=='.'){
if(d==true){d=false;t=0;numd++;if(numd>3)cout<<"ERR"<<endl;break;}
else {cout<<"ERR"<<endl;break;}
}
if(s[j]==':'){
if(numd==3)m=true;
else{cout<<"ERR"<<endl;break;}
}
}
for(j=1;j<i;j++)
if(num[j]==s){cout<<"FAIL"<<endl;break;}
if(j=i-1){num[i]=s;cout<<"OK"<<endl;}
}
if(s[0]=='C'){
for(j=7;j<=sizeof(s);j++){
if(s[j]>='0'&&s[j]<='9'){
t=t*10+s[j]-48;
if(t>65535||t>255&&m==false||s[j]=='0'&&s[j-1]=='0'){
t=0;
cout<<"ERR"<<endl;
break;
}
if(numd==3)m=true;
d=true;
}
if(s[j]=='.'){
if(d==true){d=false;t=0;numd++;if(numd>3)cout<<"ERR"<<endl;break;}
else {cout<<"ERR"<<endl;break;}
}
if(s[j]==':'){
if(numd==3)m=true;
else{cout<<"ERR"<<endl;break;}
}
}
for(j=1;j<i;j++){
for(int k=7;k<=sizeof(s);k++){
if(num[j][k]!=s[k])break;
else if(j==i-1&&k==sizeof(s)){cout<<j<<endl;c==true;}
}
}
if(c==false)cout<<endl;
}
}
return 0;
}
测样例不改人
/********************************************************
(省略n个空行)
3 4
3 2 1
2 3
1 3 2
2 2
2 3
(省略n个空行)
********************************************************/
供 奉 样 例 人
/*
visit me qwq: www.luogu.com.cn/user/4****4
*/
打广告人
#include<bits/stdc++.h>
using namespace std;
int main()
{
freopen("candy.in","r",stdin);
freopen("candy.out","w",stdout);
long long n,l,r;cin>>n>>l>>r;
long long wzh=0;
for(long long i=l;i<=r;i++)if(i%n>=wzh)wzh=i%n;
cout<<wzh<<endl;
return 0;
}
写 名 字 人
#include<bits/stdc++.h>
using namespace std;int main(){freopen("fruit.out","w",stdout);cout<<"1 3 5 8 9 11\n2 4 6 12\n7\n10";return 0;}
压 行 人
/*
finish it before nine o'clock.
wow
I
will
AK
CSP
soon
HaHaHA!!!
EASY!
*/
/*
finish it before nine o'clock.
Why it's SO
EASY?
*/
/*
played for about half an hour.
begin at ten o'clock.
keep examining.
Oh NO!!!
I won't get full marks in this problem!
I wonder why I'm wrong.
Please give me some points!
I'll be grateful!!!
*/
/*
finish at 9:25
This
is
SO
E
A
S
Y
*/
s o e a s y
#include<bits/stdc++.h>
using namespace std;
int main()
{
cout<<-1;
return 0;
}
- 1
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
string s;
cin >> s;
if(n==1)
{
cout << 1;
return 0;
}
else if(n==2)
{
cout << 1 << endl << 2;
return 0;
}
else if(n==3)
{
cout << "1 2 3";
}
else if(n==4)
{
if(s=="1 1 1 1"||s=="0 0 0 0"||s=="1 0 1 0"||s=="0 1 0 1" || s=="0 1 1 1" || s=="1 0 0 0")
cout << "1 2 3 4";
if(s=="0 1 1 0"|s=="1 0 0 1")
cout << "1 2 4\n3";
}
else if(n==5)
{
if(s=="1 1 1 1 1"||s=="0 0 0 0 0"||s=="1 0 1 0 1"||s=="0 1 0 1 0")
cout << "1 2 3 4 5";
}
else if(n==6)
cout << "1 2 3 4 5 6";
else
{
for(int i = 1;i <= n;i++)
cout << i << ' ';
}
return 0;
}
小 数 据 专 用
//by gzc
#include<bits/stdc++.h>
using namespace std;
int i,j,k,l,r,m=0,n,a[10005],b[10005],c=1,d[10005];
int main(){
//wobuhui
return 0;
}
老 实 人
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
string s;
string a;
for(int i=1;i<=n;i++)
{
cin>>s>>a;
}
for(int i=1;i<=n;i++)
{
cout<<"ERR"<<endl;
}
return 0;
}
E R R 人
#include <bits/stdc++.h>
#define I using
#define AK namespace
#define CSP std
I AK CSP;
int r(){
int num=0;
bool ne=0;
char c=getchar();
while((c>'9'||c<'0')&&c!='-'){
c=getchar();
}
if(c=='-'){
ne=1;
}else{
num=c-'0';
}
c=getchar();
while(c<='9'&&c>='0'){
num=num*10+c-'0';
c=getchar();
}
if(ne){
num=-num;
}
return num;
}
int n,a[200001],v[200001],vi;
int main(){
n=r();
for(int i=1;i<=n;i++){
a[i]=r();
}
memset(v,0,sizeof(v));
while(vi<n){
int q=2;
for(int i=1;i<=n;i++){
if(a[i]!=q&&v[i]==0){
printf("%d ",i);
q=a[i];
v[i]=1;
vi++;
}
}
cout<<endl;
}
return 0;
}
I A K C S P
int kkk=k;
work(kkk);
洛 谷 C E O
int main(){
freopen("sort/sort2.in", "r", stdin);
//freopen("candy/candy1.out", "w", stdout);
...
去 错 教 室 拿 错 试 卷
/*
check these:
1. freopen
2. int / long long
3. memory overflow
4. special cases
5. check names (a.cpp / a.in / a.out)
6. check %f %llf %d %lld
7. clear when multi-testing
8. delete debug statements
9. WRITE STUFF DOWN
*/
注 意 事 项 人
#include <bits/stdc++.h>
using namespace std;
int main()
{
//freopen("sort.in","r",stdin);
//freopen("sort.out","w",stdout);
int q,w,e,r,t,y,u,i,o,p,a,s,d,f;
cin>>q>>w>>e>>r>>t>>y>>u>>i>>o>>p>>a>>s>>d>>f;
if(q==3,w==4,e==3,r==2,t==1,y==2,u==3,i==1,o==3,p==2,a==2,s==2,d==2,f==3){
cout<<"1"<<" ";
cout<<"1"<<" ";
cout<<"2"<<" ";
}
}
键盘表+玄学+大空格
//谨以此代表属于我目前时间内OI时代的结束 也许几年后再见 也许不回来了
//反正明年也就最后一次参加j了 估计也还会来 不知道能不能带着s过来呢
// jimmy 20211023 Nanjing
//我实在是不会写这题了 出个yz麻烦死了
(T4)
//没想到T2我是一分不会 真的想不到 T1都没觉得意外
//本来没想着干啥的 但是真的有点离谱
//本来想打大样例的 但是那个程序出锅了 实在没时间修
//T2我是放在最后的
//本来T4我是想写点东西的 发现不会 就离谱 有什么办法呢……
//总之不管怎么样这次都结束了 下一次就是一年后了
//似乎提交上去我写的就看不到了 就这样吧 没办法
//jimmy 20211023, Nanjing
//谨以这两段话 表达我曾经(也许还有现在吧) 喜欢过OI 谢谢
(T2)
写 感 想 人
bool csp666(qrz x,qrz y){
return x.num<y.num;
}
C S P 6 6 6
/* T1 candy
pu****yuan
s10*-0**
JS-003*9
*/
保 险 (已手动打码)
bool operator < (node a,node b)
{
if(a.a < b.a)return 1;
if(a.a > b.a)return 0;
if(a.b < b.b)return 1;
if(a.b > b.b)return 0;
if(a.c < b.c)return 1;
if(a.c > b.c)return 0;
if(a.d < b.d)return 1;
if(a.d > b.d)return 0;
if(a.e < b.e)return 1;
if(a.e > b.e)return 0;
return 0;
}
整 洁 又 美 观
if(j>1&&a[j]<a[j-1]){
ans[a[j].second]--;
ans[a[j-1].second]++;
pair<int,int> p=a[j];a[j]=a[j-1];a[j-1]=p;
//swap常数好大啊啊啊啊啊啊啊啊啊啊啊
j--;
}
吐 槽 人
// CSP-J 2021 RP += INFINITY
许 愿 人
//找迷惑代码的兄弟们,放个我的吧,只是单纯想出名()
//卿人们,我上电视了(bushi
自 知 之 明
/*
* Never gonna give you up
* Never gonna let you down
* Never gonna run around and desert you~
* Never gonna make you cry
* Never gonna say goodbye
* Never gonna tell a lie and hurt you~
*/
// i miss julian
// CCF 全家死
// 前有 T1 儒略日
// 后有八色六十四
// 现有网络服务器
// (为什么最后一句读起来这么别扭
写 诗 人
//200points,PLEASE!!!!!!!!!!!
许愿人*2
//当你看到这个注释的时候,把它扔进年度整活(
//鹿AKIOI!
好
#include<bits/stdc++.h>
using namespace std;
string op[1005],ad[1005];
int n,fl;
int main()
{
freopen("network.in","r",stdin);
freopen("network.out","w",stdout);
ios::sync_with_stdio(false);
cin.tie(0),cout.tie(0);
/*cin>>n;
for(int i=1;i<=n;i++)
cin>>op[i]>>ad[i];
for(int i=1;i<=n;i++)
{
fl=0;
if(op[i]=="Server")
for(int j=1;j<i;j++)
if(ad[j]==ad[i])
{
fl=1;
cout<<i<<" chongfu ";
cout<<"FAIL"<<endl;
break;
}
if(fl)
continue;
cout<<i<<endl;
if(ad[i][0]=='0')
{
cout<<i<<" 0qiandao0 ";
cout<<"ERR"<<endl;
continue;
}
cout<<i<<endl;
int s1=0,s2=0;
for(int j=0;j<ad[i].length();i++)
{
if(s1>3 || s2>1)
{
fl=1;
cout<<i<<" duoyu:huo. ";
cout<<"ERR"<<endl;
break;
}
if(ad[i][j]=='.')
{
s1++;
if(ad[i][j+1]=='0')
{
fl=1;
cout<<i<<" .qiandao0 ";
cout<<"ERR"<<endl;
break;
}
}
if(ad[i][j]==':')
{
s2++;
if(ad[i][j+1]=='0')
{
fl=1;
cout<<i<<" :qiandao0 ";
cout<<"ERR"<<endl;
break;
}
}
}
if(fl)
continue;
cout<<i<<endl;
int x=0;
for(int j=0;j<ad[i].length();j++)
{
if(ad[i][j]>='0' && ad[i][j]<='9')
x=x*10+(ad[i][j]-'0');
if(ad[i][j]=='.' || ad[i][j]==':')
{
if(x>=255)
{
fl=1;
cout<<i<<" dayu250 ";
cout<<"ERR"<<endl;
break;
}
x=0;
}
}
if(fl)
continue;
cout<<i<<endl;
if(x>65535)
{
cout<<i<<" dayu65535 ";
cout<<"ERR"<<endl;
continue;
}
cout<<i<<endl;
if(op[i]=="Server")
{
cout<<i<<' ';
cout<<"OK"<<endl;
continue;
}
cout<<i<<endl;
if(op[i]=="Client")
{
for(int j=1;j<=n;j++)
if(op[j]=="Server" && ad[j]==ad[i])
{
cout<<i<<" lianjie ";
cout<<j<<endl;
break;
}
}
cout<<i<<" wufuwuji ";
cout<<"FAIL"<<endl;
}*/
int n;
cin>>n;
if(n==5)
cout<<"OK"<<endl<<"FAIL"<<endl<<'1'<<endl<<"FAIL"<<endl<<"ERR"<<endl;
if(n==10)
cout<<"OK"<<endl<<"1"<<endl<<"FAIL"<<endl<<"FAIL"<<endl<<"OK"<<endl<<"ERR"<<endl<<"ERR"<<endl<<"5"<<endl<<"1"<<endl<<"ERR"<<endl;
return 0;
}
可怜1s
//water code~water code~water code~water code~water code~water code~water code~
//O(1.04 * 10^8) ,出题人发发善心别卡常
//Upd: O(4 * 10^7)
/*
*以下时间复杂度都是撑死的算的
*
*ln 28-29: 64000000
*ln 34-38: 200000
*ln 49-55: 40000000
*
*Upd: ln28-29: 8000
**/
分 析 许 愿 人
//------------------------------------------------------------------------------------------------------
// without satisfying of 30pts, I will say it out loudly:
// n-square time-complex passes although n comes by million, bruce algorithm fucks the standard program!
//------------------------------------------------------------------------------------------------------
//O(n):
草
#include<bits/stdc++.h>
using namespace std;
int main(){
//freopen("fruit.in","r",stdin);
//freopen("fruit.out","w",stdout);
cout<<"hello world,this 题目 were very 难";
return 0;
}
自 娱 自 乐 人
int ha(string sa){
int ret=0;
for(int ii=0;ii<sa.size();ii++){
srand(sa[ii]);
ret=ret*ret+rand();
}
return ret%99999;
}
听 天 由 命 人
#include<bits/stdc++.h> // stO win10 peterha Orz
%%%
#include <bits/stdc++.h>
using namespace std;
int main(){
freopen("sort.in", "r", stdin);
freopen("sort.out", "w", stdout);
cout << "123647589" << endl;
return 0;
}
1 2 3 4 5 6 7 8 9
#include<bits/stdc++.h>
using namespace std;
int main(){
freopen("network.in","r",stdin);
freopen("network.out","w",stdout);
string s;
cin>>s;
cout<<"OK"<<endl<<"ERR"<<endl<<1<<endl<<"FAID"<<endl<<"ERR";
return 0;
}
F A I D
#include<bits/stdc++.h>//怎么优化?????????????????????
你 问 我 我 问 谁
/*一个符合规范的地址串应当具有以下特征:
1、必须形如 a.b.c.d:e 的格式,其中 a,b,c,d,e 均为非负整数;
2、0 ≤ a,b,c,d ≤ 255,0 ≤ e ≤ 65535;
3、a,b,c,d,e 均不能含有多余的前导 0。
相应地,不符合规范的地址串可能具有以下特征:
1、不是形如 a.b.c.d:e 格式的字符串,例如含有多于 3 个字符 . 或多于 1 个字
符 : 等情况;
2、整数 a,b,c,d,e 中某一个或多个超出上述范围;
3、整数 a,b,c,d,e 中某一个或多个含有多余的前导 0 。*/
抄 题 人
以上。
以上事例仅为代表性,实际发生情况不限于此。