11 2020 档案
[ACM]Uva572-Oil Deposits-DFS应用
摘要:#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> using namespace std; const int maxn = 100 + 5; char piece[maxn][maxn]; int n,m
[ACM]NOIP2011D1T1复现-铺地毯
摘要:逆向考虑即可解决 #include<iostream> using namespace std; const int maxn= 100000 +5; int a[maxn][4];//0-x,1-y,2-x-length,3-y-length int main(){ int n,flag=0; c
[ACM]Uva839-Not So Mobile(树状天平)
摘要:在输入过程中同时进行数据处理,代码简洁,效率较高 #include<iostream> #include<cstdio> using namespace std; bool solve(int& W) { int W1,D1,W2,D2; bool b1=true,b2=true; cin>>W1>
常见文件头,文件尾总结
摘要:2022.4.20重新整理排版 图片类 文件类型 后缀 文件头 文件尾 标志 JPEG .jpg/.jpeg FFD8FF FFD9 JFIF PNG .png 89504E47 AE426082 PNG IEND IHDR GIF .gif 47494638 003B GIT9a TIFF .ti
[ACM]NEFUOJ-最长上升子序列
摘要:Description 给出长度为n的数组,找出这个数组的最长上升子序列 Input 第一行:输入N,为数组的长度(2=<N<=50000) 第二行:N个值,表示数组中元素的值(109<=a[i]<=109) Output 输出最长上升子序列的长度 Sample Input 5 -6 4 -2 10
[ACM]TL-Prim
摘要:#include<iostream> #include<cstdio> using namespace std; int main(){ int inf = 99999999; int n,m,t1,t2,t3,min; int e[7][7],dis[7],book[7]={0}; int cou
[ACM]TL-Kruskal
摘要:#include<iostream> #include<cstdio> using namespace std; struct edge { int u; int v; int w; }; struct edge e[10]; int n,m; int f[7]={0},sum=0,count=0;
[CTF]upload-lab靶场day1
摘要:Pass-01 前端js绕过 拿到题目看hint提示判定在前端,用burp代理,将1.php后缀名更改为.png格式即可通过前端检测,而后在burp中对修改包内容,将1.png改为1.php即可绕过前端js检测 Pass-02 MIME验证 上传php后显示不成功,但是上传图片显示正常,即使用bur
[CTF]picoCTF-day1
摘要:Lets Warm Up If I told you a word started with 0x70 in hexadecimal, what would it start with in ASCII? 这应该就是签到题了吧?爱了爱了,十六进制转十进制再打表(突然ACM)转ASCII,得到‘p’,
[ACM]queue队列模板
摘要:思路 队列的原理基本与站队一样,队首出,队尾入,变化以后也是大同小异,写起来主要就是注意struct的相关知识,以及伪指针(分别指向队首和队尾+1),队尾序号要+1以防首位变量数字重合造成不必要的麻烦(目前也不是很清楚会遇到什么) 代码 #include<iostream> using namesp
[ACM]快速排序模板
摘要:思路 快排基本思路应该就是二分+递归,从两侧同时(实则先从右往左)往中间找,同时和参变量对比,发现位置颠倒后交换位置,然后通过二分将其一块一块的分割开,直到分割到一个元素位置,即完成了快排。 代码 #include<bits/stdc++.h> using namespace std; int a[
[ACM]STL-dfs
摘要:#include<iostream> using namespace std; int book[101],sum,n,e[101][101]; void dfs(int cur) { cout<<cur<<" "; sum++; if(sum==n) return; for(int i=1;i<=
[CTF]Caser-Pass-Tool1-C++工具
摘要:刷pico遇到一个凯撒密码加密题,顺手写了个解密工具,但是暂时没有解决到边界字母的升降档问题 #include<iostream> using namespace std; int main(){ char s[100]; int n,k,s2[100]; cin>>n>>k; for(int i=
[CTF学习笔记]net-pack(WinShark)
摘要:题目:shark on wire 1 Description We found this packet capture. Recover the flag. 思路 这里懂得了winshark的一些基本用法(感谢wbl学长),例如常见的CTF的杂项的流量包分析,主要内容集中在TCP中进行TCP追踪流(