NOIP2015
衢州,浙江,2015.11
DAY 0
开了4个半小时的车才到衢州QAQ,全程听歌碎觉于是晃着晃着就到衢州辣
晚餐傻逼点了4个菜,吔都吔不玩,感觉RP暴跌
晚上吃了一点点K然而觉得自己可以胖好几斤了
看了Marvels Agents of S.H.I.E.L.D和The Blacklist,感觉编剧的脑洞太大辣,希望CCF的脑洞不要更大啊啊啊(在YT的要求下看了半集没字幕版的,好爽QAQ。。。RP暴跌,捂脸逃(๑•ᴗ•๑)
小紧张,希望考好吧
DAY 1
早上6:20被手机闹醒然而赖床赖到6:40感觉再不起来要没救辣才起床,RP暴跌?
吃早饭的时候看到好多好多的大神QAQ,%%%
要去考场了才发现自己要滚到华茂去了,于是RP跌?
又等了一会儿才放窝萌进考场哎(窝萌那桌妹子好多QAQ
翻开题目就是爆炸即视感啊(NOIP竟然有朝一日给了大样例!!T3竟然给了1G的内存,2s的时间!!!“斗地主!!!!”
T1应该是题库里拉下来的QAQ;T2看上去是求最小的环,BFS了一下,过掉了大样例然后小小的自鏼了一下(感觉好虚啊,两题都SB了一下,希望把错都调出来了吧呜呜呜
于是T3码农题即视感~~~~(>_<)~~~~ 感觉自己肯定要滚粗辣,写了老长老长哎,果真被鏼死了,只剩两分钟的时候好不容易调了大样例(根本没时间检查辣
粗了考场发现自己T3没写剪枝简直斯波,还是代码能力弱啊,时间都快不够,(%%%Mars_cat 提前一小时AK辣
吔完午饭就会了旅馆,也没什么事,带去的书也都没看哎,(没看书RP跌呜呜呜
看了Bones和Elementary还有剪刀手爱德华,后面是部挺好的电影辣,还看了习马会,愣在那里看了一分多钟的握手QAQ
感觉就是,自己太弱啦,还要继续努力啊,只能期待DAY2好运
DAY 2
怎么总感觉DAY 2总是一副人品暴跌的样子
于是就真的爆炸辣
考场上真是斯波,T1明明想到了二分答案但还是写了乱七八糟的贪心,T2不会写DP爆炸,骗分走人辣,T3还是不会,骗分走人辣
于是出考场的一瞬间就觉得这样100分都没有辣
然后看到各种大神都AK了的样子感觉NOIP真的滚粗了
于是一直都心情不好哎,也无力吐槽了QAQ(⊙︿⊙)
只能像YT说的那样希望CCF的数据不要太强啊
所以说,NOIP2015就这么滚粗了,一等也肯定拿不到了,又是一年该重新开始了吧
Postscript
11.9 听说有了源程序和民间数据,测试了几发,luogu上350,余姚中学的数据310,算是很差了吧,完全没到预期,连DAY 1写得比较顺的题也有错的了,只A掉了T1然而并没有什么卵用了,其他高一的都好厉害,xmc都500+,酱油也有400+,哎,其实自己傻逼只能怪自己,伤心也只能一个人伤心去了呜呜呜
11.12 期中考的成绩都粗来了,于是看到童鞋们的成绩,突然发现自己没考挺幸运的。可是。。。听说11.17-11.19要发成绩,哎,发现DAY2 T1简直斯波哎,还是不开森o(︶︿︶)o
11.17 成绩粗来了,330滚粗,好桑心
于是开始改程序,DAY1 T2明显超时了,然后发现自己斯波,改了1分钟,就A掉了呜呜呜。。。这可是多了20分啊啊啊
DAY2 T1明显是2分+贪心,然后重新打了个程序,果真斯波,于是又该多40分了
所以这是用来告诉我自己当时是有多蠢吗,哎 ̄へ ̄
11.19 听说发现landlords死在哪里了,又听说改好了好像还是错的(;′⌒`)
11.22 听说窝终于订完了2题,还有为什么窝的计数器上500惹(。・・)ノ
(ー`´ー)当时为什么会这么斯波呢
11.28 大礼拜回到家。。。发现CCF出分数线惹。。。%%%QLJ %%%Scarlet %%%MYK 蒟蒻不愉快地滚粗辣(ಥ _ ಥ) aw。。。
感觉贴程序只是为了说明自己有多傻逼,所以还是先不贴了
订正程序:
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <algorithm> #include <queue> #define LL long long #define D double using namespace std; struct REC { int x,y; }; int n; REC a[2500]; int ans[50][50]; int main() { freopen("magic.in","r",stdin); freopen("magic.out","w",stdout); scanf("%d",&n); memset(a,0,sizeof(a)); memset(ans,0,sizeof(ans)); a[1].x=1; a[1].y=(n+1)>>1; ans[a[1].x][a[1].y]=1; for (int i=2;i<=n*n;++i) { if (a[i-1].x==1 && a[i-1].y!=n) { a[i].x=n; a[i].y=a[i-1].y+1; ans[a[i].x][a[i].y]=i; continue; } else if (a[i-1].y==n && a[i-1].x!=1) { a[i].x=a[i-1].x-1; a[i].y=1; ans[a[i].x][a[i].y]=i; continue; } else if (a[i-1].x==1 && a[i-1].y==n) { a[i].x=a[i-1].x+1; a[i].y=a[i-1].y; ans[a[i].x][a[i].y]=i; continue; } else { if (ans[a[i-1].x-1][a[i-1].y+1]==0) { a[i].x=a[i-1].x-1; a[i].y=a[i-1].y+1; ans[a[i].x][a[i].y]=i; continue; } else { a[i].x=a[i-1].x+1; a[i].y=a[i-1].y; ans[a[i].x][a[i].y]=i; continue; } } } for (int i=1;i<=n;++i) { for (int j=1;j<n;++j) printf("%d ",ans[i][j]); printf("%d\n",ans[i][n]); } fclose(stdin); fclose(stdout); return 0; }
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <algorithm> #include <queue> #include <ctime> #define LL long long #define D double #define NN 200020 using namespace std; struct REC { int p,fa; }; int num[NN],ne[NN<<1],head[NN],v[NN<<1]; int n,x,tot,minn,tott; int vis[NN]; queue<REC> que; REC tmp; void Build(int xx,int yy) { ne[++tot]=head[xx]; v[tot]=yy; head[xx]=tot; } void BFS(int xx) { while (!que.empty()) que.pop(); vis[xx]=tott; num[xx]=1; tmp.p=xx; tmp.fa=0; que.push(tmp); while (!que.empty()) { REC h=que.front(); que.pop(); for (int i=head[h.p];i;i=ne[i]) { if (vis[v[i]]==tott) { minn=min(minn,num[h.p]+1-num[v[i]]); continue; } else if (!vis[v[i]]) { vis[v[i]]=tott; tmp.p=v[i]; tmp.fa=h.p; num[v[i]]=num[h.p]+1; que.push(tmp); } } } return; } int main() { freopen("message.in","r",stdin); freopen("message.out","w",stdout); scanf("%d",&n); tot=0; minn=0x7fffffff; memset(ne,0,sizeof(ne)); memset(head,0,sizeof(head)); memset(v,0,sizeof(v)); for (int i=1;i<=n;++i) { scanf("%d",&x); Build(i,x); } memset(vis,0,sizeof(vis)); tott=0; for (int i=1;i<=n;++i) if (!vis[i]) { tott++; BFS(i); } printf("%d\n",minn); fclose(stdin); fclose(stdout); return 0; }
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <algorithm> #include <queue> #define LL long long #define D double using namespace std; struct REC { int num,ne,cs; }; REC sum[50]; bool f[50],huojian; int x,y,tot,T,n,a[50],minn,one,two,three,four,maxx3,maxx4,checker[10]; void DFS(int pr,int tot) { if (tot-maxx3>minn) return; if (pr>17) { int ans=tot; checker[1]=one,checker[2]=two,checker[3]=three,checker[4]=four; //去4 带走尽量多的2个对子 若不足带走两个单牌 for (int w=1;w<=checker[4];++w) { if (checker[2]>=2) ans++,checker[2]-=2; else if (checker[1]>=2) ans++,checker[1]-=2; else if (checker[2]==1) ans++,checker[2]-=1; else ans++; } //去3 先带光对子,然后带光单牌 for (int w=1;w<=checker[3];++w) { if (checker[2]>0) ans++,checker[2]--; else if (checker[1]>0) ans++,checker[1]--; else ans++; } if (checker[1]>=2&&huojian) ans++,checker[1]-=2; ans+=checker[1]+checker[2]; minn=min(ans,minn); return; } if (a[pr]==0) {DFS(pr+1,tot); return;} if (pr<=14) { bool flag; int t; if (pr+4<=14) { flag=1,t=0; for (int w=pr;w<=pr+4;++w) if (a[w]<1) {flag=0; break;} if (flag) { for (int w=pr;w<=pr+3;++w) a[w]--; for (int w=pr+4;w<=14;++w) if (a[w]>=1) { a[w]--; t=w; DFS(pr,tot+1); } else break; for (int w=pr;w<=t;++w) a[w]++; } } //单顺子 if (pr+2<=14) { flag=1,t=0; for (int w=pr;w<=pr+2;++w) if (a[w]<2) { flag=0; break;} if (flag) { for (int w=pr;w<=pr+1;++w) a[w]-=2; for (int w=pr+2;w<=14;++w) if (a[w]>=2) { a[w]-=2; t=w; DFS(pr,tot+1); } else break; for (int w=pr;w<=t;++w) a[w]+=2; } } //双顺子 if (pr+1<=14) { flag=1,t=0; for (int w=pr;w<=pr+2;++w) if (a[w]<3) { flag=0; break;} if (flag) { a[pr]-=3; for (int w=pr+1;w<=14;++w) if (a[w]>=3) { a[w]-=3; t=w; DFS(pr,tot+1); } else break; for (int w=pr;w<=t;++w) a[w]+=3; } } //三顺子 } if (a[pr]>=4) { ++four; a[pr]-=4; DFS(pr,tot); --four; a[pr]+=4; }//4 if (a[pr]>=3) { ++three; a[pr]-=3; DFS(pr,tot); --three; a[pr]+=3;}//3 if (a[pr]>=2) { ++two; a[pr]-=2; DFS(pr,tot); --two; a[pr]+=2; }//2 if (a[pr]>=1) { ++one; a[pr]-=1; DFS(pr,tot); --one; a[pr]+=1; }//1 return; } int main() { freopen("landlords.in","r",stdin); freopen("landlords.out","w",stdout); scanf("%d%d",&T,&n); while (T--) { memset(a,0,sizeof(a)); memset(sum,0,sizeof(sum)); minn=0x7fffffff; for (int i=1;i<=n;++i) { scanf("%d%d",&x,&y); if (x>=3) a[x]++; else { if (x==0) { if (y==1) a[16]++; else a[17]++;} else a[x+13]++; } } for (int i=3;i<=17;++i) { if (a[i]>=3) ++maxx3; if (a[i]>=4) ++maxx4; } maxx3+=maxx4*2; one=two=three=four=0; if (a[16]==1 && a[17]==1) huojian=1; else huojian=0; DFS(3,0); printf("%d\n",minn); } fclose(stdin); fclose(stdout); return 0; }
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <queue> #include <set> #define NN 50010 using namespace std; int tot,l,r,len,n,m,a[NN],g[NN],ans; bool Check(int xx) { tot=0; int i=0; while (i<n+1) { i++; int sum=g[i]; while (sum<xx) { sum+=g[++i],tot++; if (tot>m) return 0; if (i>n+1) return 1; } } return 1; } int main() { freopen("stone.in","r",stdin); freopen("stone.out","w",stdout); scanf("%d%d%d",&len,&n,&m); a[0]=0; a[n+1]=len; for (int i=1;i<=n;++i) scanf("%d",&a[i]); for (int i=1;i<=n+1;++i) g[i]=a[i]-a[i-1]; l=0; r=len; ans=0; while (l<=r) { int mid=(l+r)>>1; if (Check(mid)) l=mid+1,ans=mid; else r=mid-1; } printf("%d\n",ans); fclose(stdin); fclose(stdout); return 0; }
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #define mod 1000000007 #define LL long long using namespace std; LL f[3][1010][210],ans[3][1010][210]; int t,n,m,k; char a[1010],b[210]; int main() { freopen("substring.in","r",stdin); freopen("substring.out","w",stdout); scanf("%d%d%d",&n,&m,&k); scanf("%s",a+1); scanf("%s",b+1); t=0; for (int i=0;i<=n;++i) ans[0][i][0]=1; for (int w=1;w<=k;++w) { t^=1; for (int i=1;i<=n;++i) for (int j=1;j<=m;++j) if (a[i]==b[j]) { f[t][i][j]=(f[t][i-1][j-1]+ans[t^1][i-1][j-1])%mod; ans[t][i][j]=(f[t][i][j]+ans[t][i-1][j])%mod; } else f[t][i][j]=0,ans[t][i][j]=ans[t][i-1][j]; for (int i=0;i<=n;++i) ans[t^1][i][0]=0; } printf("%lld\n",ans[t][n][m]); fclose(stdin); fclose(stdout); return 0; }
#include <iostream> #include <algorithm> #include <cstdio> #include <cmath> #include <cstring> #include <cstdlib> #include <queue> #define LL long long #define INF 0x3f3f3f3f using namespace std; #define NN 300100 int read() { int xx=0,ff=1; char ch; for (ch=getchar();ch<'0'||ch>'9';ch=getchar()) if (ch == '-') ff=-1; for (;ch>='0';ch=getchar()) xx=xx*10+ch-'0'; xx*=ff; return xx; } int sz=0, fa[NN][20], deep[NN], pos[NN], dis[NN], tot=0, head[NN], n, m; int sum=0, x[NN], y[NN], z[NN], l, r, ans, maxx2=0, val[NN]; struct E { int v,w,ne; }e[NN<<1]; struct S { int u,v,d,lca; }s[NN]; void Build(int xx,int yy,int zz) { e[++tot].ne=head[xx], head[xx]=tot, e[tot].v=yy, e[tot].w=zz; e[++tot].ne=head[yy], head[yy]=tot, e[tot].v=xx, e[tot].w=zz; } void DFS(int xx) { pos[++sz]=xx; for (int i=1;i<=17;++i) if ((1<<i)<=deep[xx]) fa[xx][i]=fa[fa[xx][i-1]][i-1]; for (int i=head[xx];i;i=e[i].ne) if (e[i].v != fa[xx][0]) { deep[e[i].v] = deep[xx]+1, fa[e[i].v][0] = xx, dis[e[i].v] = dis[xx] + e[i].w, val[e[i].v] = e[i].w; DFS(e[i].v); } } int LCA(int xx,int yy) { if (deep[xx]<deep[yy]) swap(xx,yy); int tmp=deep[xx]-deep[yy]; for (int i=0;i<=17;++i) if (tmp>>i&1) xx=fa[xx][i]; for (int i=17;i>=0;--i) if (fa[xx][i] != fa[yy][i]) xx=fa[xx][i], yy=fa[yy][i]; return xx==yy?xx:fa[xx][0]; } int tmp[NN]; bool Check(int xx) { int cnt=0, lim=0; memset(tmp,0,sizeof(tmp)); for (int i=1;i<=m;++i) if (s[i].d > xx) { ++tmp[s[i].u], ++tmp[s[i].v], tmp[s[i].lca]-=2; lim = max(s[i].d-xx, lim); cnt++; } if (!cnt) return 1; for (int i=n;i>1;--i) tmp[fa[pos[i]][0]]+=tmp[pos[i]]; for (int i=2;i<=n;++i) if (val[i] >= lim && tmp[i]==cnt) return 1; return 0; } int main() { n=read(), m=read(); for (int i=1;i<n;++i) { x[i]=read(), y[i]=read(), z[i]=read(), sum+=z[i]; Build(x[i],y[i],z[i]); } dis[1]=0, deep[1]=1, fa[1][0]=0; DFS(1); for (int i=1;i<=m;++i) { s[i].u=read(), s[i].v=read(); s[i].lca=LCA(s[i].u, s[i].v); s[i].d=dis[s[i].u] + dis[s[i].v] - 2*dis[s[i].lca]; } l=0, r=sum; while (l<=r) { int mid=(l+r)>>1; if (Check(mid)) ans=mid, r=mid-1; else l=mid+1; } printf("%d\n", ans); return 0; }
2022年9月19日 01:16
Urdu is one of the main languages in the state, and this is the first language for Urdu Medium students, there are fewer schools are working in all districts of the state, all the applicable students also can download AP SSC Urdu Model Paper 2023 Pdf in chapter wise for all lessons of the course, AP SSC Urdu Model Paper download, and practice the Ibtedai Question bank to get better rank in all exams conducted by BSEAP. Urdu is one of the main languages in the state, and this is the first language for Urdu Medium students, there are fewer schools are working in all districts of the state, all the applicable students also can download AP SSC Urdu Model Paper 2023 Pdf in chapter wise for all lessons of the course.
2023年4月13日 16:21
KSEEB 9th exam has been Download by the Karnataka State Secondary Education Examination Board. These exams were previously set to take place between June. The board will publish https://modelpapers2020.in/ the updated Karnataka 9th Question Paper.This article, as well as the official website, 9th karnataka has been Download by the Karnataka State Secondary Education Examination Board. These exams were previously Previous Paper to take place from June to July .The exam times, pacing, and guidelines are all included in the Karnataka