2022年A组国赛 小蓝与钥匙 题目大意: ​​ 题解: 显然,$ans=C_{28}^{14}\cdotf\left[14\right]$ 其中f[i]表示i个人都没拿到自己的钥匙的情况数 f[i]的递推式见代码 Code: include<bits/stdc.h> usingnamespacestd; defineiossios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); typedeflonglongll; llC[30][30],fact[15]; voidinit(){ for(lli=0;i<=28;...

  EEp8yVjT9N2T   2024年03月27日   45   0   0 算法与数据结构

编写并调试一个堆栈溢出的程序 编写存在栈溢出漏洞的c程序: stack_overflow.cpp include<iostream> usingnamespacestd; voidhello(){ charname[8]; scanf("%s",name); printf("hello,%s!\n",name); } voidstack_overflow(){ printf("Aha,suprise!\n"); } intmain(){ hello(); return0; } 对于GCC编译器,可以尝试使用-fno-stack-protector​选项来禁用堆栈保护。 使用-g​...

  EEp8yVjT9N2T   2024年03月27日   27   0   0 网络安全
关注 更多

空空如也 ~ ~

粉丝 更多

空空如也 ~ ~