依然是酱油记,前几场打得太差不想发游记了。
比赛题目
A. The Artful Expedient
题目大意: 判断$a_i\,xor\,b_j$是否出现过。
题目分析: 好像可以直接输出Karen,我用的Hash,记得将Hash范围开大。
B. The Eternal Immortality
题目大意: 求$\frac{b!}{a!}$的末尾数字。
题目分析: 暴力乘遇到0就退。
C. The Intriguing Obsession
题目大意: 有三个颜色,每个颜色的点数为$a,b,c$,现在在点之间连边,使得任意两个相同颜色的点间要么不存在路径要么路径长度$\ge 3$。
题目分析: 戳这里
D. The Overdosing Ubiquity
题目大意: 有一棵树,现在在树上连边求能够得到的简单路径条数。
题目分析: 没什么想法,初步想法Dp?
E. The Untended Antiquity
题目大意: 给一个矩阵,有三种操作:给一个矩阵添加障碍物,给一个矩阵删除障碍物,求一个点能否到达另一个点。
题目分析: 二维线段树/划分树/二维树状数组+随机化,待补档。
比赛经历
KEKE_046:“30分钟打个**打。”
一来看懂A题后开始打代码,而achen、hyc还没看懂题意表示懵逼。
然后我一交,Runtime error on pretest 4,我靠Hash开小了,再交A了。
A题代码
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
| #include<algorithm> #include<iostream> #include<iomanip> #include<cstring> #include<cstdlib> #include<vector> #include<cstdio> #include<cmath> #include<queue> using namespace std; inline const int Get_Int() { int num=0,bj=1; char x=getchar(); while(x<'0'||x>'9') { if(x=='-')bj=-1; x=getchar(); } while(x>='0'&&x<='9') { num=num*10+x-'0'; x=getchar(); } return num*bj; } int n,a[2005],b[2005],Hash[5000005],cnt=0; int main() { n=Get_Int(); for(int i=1; i<=n; i++)a[i]=Get_Int(),Hash[a[i]]=1; for(int i=1; i<=n; i++)b[i]=Get_Int(),Hash[b[i]]=1; for(int i=1; i<=n; i++) for(int j=1; j<=n; j++) if(Hash[a[i]^b[j]])cnt++; if(cnt&1)puts("Koyomi"); else puts("Karen"); return 0; }
|
然后开始看B题,发现B题很水,开始敲代码,一交Wrong answer on pretest 6,嗯?看了10分钟的屏幕发现好像循环变量没开long long,好吧。
B题代码
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
| #include<algorithm> #include<iostream> #include<iomanip> #include<cstring> #include<cstdlib> #include<vector> #include<cstdio> #include<cmath> #include<queue> using namespace std; typedef long long LL; inline const LL Get_Int() { LL num=0,bj=1; char x=getchar(); while(x<'0'||x>'9') { if(x=='-')bj=-1; x=getchar(); } while(x>='0'&&x<='9') { num=num*10+x-'0'; x=getchar(); } return num*bj; } LL a,b,sum=1; int main() { a=Get_Int(); b=Get_Int(); for(LL i=b; i>a; i--) { sum=sum*i%10; if(sum==0) { puts("0"); return 0; } } printf("%I64d\n",sum); return 0; }
|
然后我转念一想,我都错了两次,一定有人错同样的地方!然后我就果断锁题开始hack人。
我一看,哈哈有个叫quanghsprocvp的循环变量没有开long long,我是倒着循环的所以会错pretest,果断hack得到100分。
然后achen表示我们来想C题吧。
好吧然后我就开始想C题了。
我:“这会不会是什么神奇的Dp,压压维。”
achen:“怎么可能,别想偏了。”
我以为achen说的是怎么可能是Dp,既然achen这个Dp大神都说怎么可能,那我还是想别的方法吧。
然后我就推了20多分钟的数学式子,发现推个**。
既然大家都没推出来,而且有这么多人都A了,应该不是太难,哪儿想复杂了吗?我还是去hack别人换换思维吧。
然后我就hack了一个叫做aerfafish的人。
接着和achen讨论了一下C题,还是没什么好的想法。
比赛结束前10分钟:
achen:“卧槽C是傻逼题啊!”
hyc:“???”
我:“????”
achen不说话了,估计在打代码,那好吧我还是去hack别人吧,于是我又hack掉了一个Romal_Vekasi的B题。
接下来的时间我的房间里已经没人可以被hack了,然后比赛结束了,achen并没有在比赛时间内提交C题。
所以这是最终的比赛结果(听说神犇学弟liuxiao成功hack8个人):

然后比赛结束后根据achen的思路写出了C题,还是太弱了。
C题代码
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
| #include<algorithm> #include<iostream> #include<iomanip> #include<cstring> #include<cstdlib> #include<vector> #include<cstdio> #include<cmath> #include<queue> using namespace std; typedef long long LL; inline const LL Get_Int() { LL num=0,bj=1; char x=getchar(); while(x<'0'||x>'9') { if(x=='-')bj=-1; x=getchar(); } while(x>='0'&&x<='9') { num=num*10+x-'0'; x=getchar(); } return num*bj; } const LL mod=998244353; LL n,a,b,c,f[5005][5005]; int main() { a=Get_Int(); b=Get_Int(); c=Get_Int(); n=max(a,max(b,c)); for(int i=0; i<=n; i++)f[i][0]=f[0][i]=1; for(int i=1; i<=n; i++) for(int j=1; j<=n; j++) f[i][j]=(f[i-1][j]+f[i-1][j-1]*j%mod)%mod; printf("%I64d\n",f[a][b]*f[a][c]%mod*f[b][c]%mod); return 0; }
|