摘要: 题目:我已经明示到这个程度了你还不用并查集? #include<bits/stdc++.h> using namespace std; const int MAXN=1010; int F[MAXN]; int GetFather(int x) { return F[x]==x?x:F[x]=Get 阅读全文
posted @ 2020-12-19 16:04 Do1phln 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 思路 prim的最小生成树,套上肝就完事了 代码 #include<iostream> #include<cstdio> #include<string.h> #define MAX 999999; using namespace std; int map[105][105],dist[105]; 阅读全文
posted @ 2020-12-19 16:03 Do1phln 阅读(79) 评论(0) 推荐(0) 编辑
摘要: P200汉诺塔 #include<bits/stdc++.h> using namespace std; int main() { int n,i; long long s[40]; s[1]=2; for(i=2;i<=35;i++) s[i]=3*s[i-1]+2; while(cin>>n) 阅读全文
posted @ 2020-12-19 16:02 Do1phln 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 汇编工具DTDebug 下载后设置好odd与插件路径,同时在属性中设置为管理员身份运行(无Administrator权限进入的时候一直在提示) 寄存器 存储数据: CPU>内存>硬盘 32位CPU: 8 16 32 64位CPU: 8 16 32 64 EIP:存储CPU下一次执行的指令集,不能作他 阅读全文
posted @ 2020-12-15 17:21 Do1phln 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 常用汇编指令 MOV指令 指令格式 指令解释 MOV r/m8,r8 r通用寄存器 MOV r/m16,r16 m代表内存 MOV r/m32,r32 imm代表立即数 MOV r8,r/m8 r8代表8位通用寄存器 MOV r16,r/m16 m8代表8位内存 MOV r32,r/m32 imm8 阅读全文
posted @ 2020-12-15 17:20 Do1phln 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 八进制运算 加法表 1+1=2 1+2=3 2+2=4 1+3=4 2+3=5 3+3=6 1+4=5 2+4=6 3+4=7 4+4=10 1+5=6 2+5=7 3+5=8 4+5=11 5+5=12 1+6=7 2+6=10 3+6=11 4+6=12 5+6=13 6+6=14 1+7=10 阅读全文
posted @ 2020-12-15 17:19 Do1phln 阅读(101) 评论(0) 推荐(0) 编辑
摘要: A.小林找工作 #include<bits/stdc++.h> using namespace std; const int MAXN=1e5+10; int p[MAXN]; int main() { int n,m; cin>>n>>m; for(int i=1;i<=n;i++) { scan 阅读全文
posted @ 2020-12-15 17:17 Do1phln 阅读(98) 评论(0) 推荐(0) 编辑
摘要: A. 三角形面积 #include <bits/stdc++.h> using namespace std; int main() { double a,b,c; double ans,p,tmp; cin>>a>>b>>c; p=(a+b+c)*0.5; tmp=p*(p-a)*(p-b)*(p- 阅读全文
posted @ 2020-12-15 17:16 Do1phln 阅读(94) 评论(0) 推荐(0) 编辑
摘要: P2031凯撒密码 #include<bits/stdc++.h> using namespace std; int main(){ string s; int d; while(cin>>s) { cin>>d; int len=s.length(); for(int i=0;i<len;i++) 阅读全文
posted @ 2020-12-15 17:14 Do1phln 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 题目 给定一个数组和一个数s,在这个数组中找一个区间,使得这个区间之和等于s。 例如:给定的数组int x[14] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};和一个s = 15。那么,可以找到的区间就应该有0到4, 3到5, 6到7.(注意这 阅读全文
posted @ 2020-12-15 17:13 Do1phln 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 同样一个问题,位运算可以提高程序的运行效率。 下面讲一下关于奇偶性的判断。 常规方法 public static boolean isOdd(int i){ ​ return i % 2 != 0; } 位运算方法 public static boolean isOdd(int i){ ​ retu 阅读全文
posted @ 2020-12-15 17:11 Do1phln 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 概念解释 PHP 反序列化漏洞又叫做 PHP 对象注入漏洞,我觉得这个表达很不直白,也不能说明根本的问题,不如我们叫他 PHP 对象的属性篡改漏洞好了(别说这是我说的~~) 反序列化漏洞的成因在于代码中的 unserialize() 接收的参数可控,从上面的例子看,这个函数的参数是一个序列化的对象, 阅读全文
posted @ 2020-12-15 17:08 Do1phln 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 问题 DPL_3_A: Largest Square #include<iostream> #include<algorithm> #include<cstdio> using namespace std; #define MAX 1400 int dp[MAX][MAX], G[MAX][MAX] 阅读全文
posted @ 2020-12-01 22:16 Do1phln 阅读(122) 评论(0) 推荐(0) 编辑
摘要: DPL_1_A: Coin Changing Problem 每次均有两种选择,即选择当前的,即为在当前状态+1,否则维持原来的T[j+d[i]] #include<iostream> #include<cstdlib> #include<cstring> using namespace std; 阅读全文
posted @ 2020-12-01 22:14 Do1phln 阅读(69) 评论(0) 推荐(0) 编辑
摘要: AOJ-ALDS1_1_D Maximum Profit 本题主要考虑要将复杂度降到O(n),否则过不了最后五组数据 #include<iostream> #include<bits/stdc++.h> using namespace std; int main(){ int n,maxv=-1e1 阅读全文
posted @ 2020-12-01 22:13 Do1phln 阅读(99) 评论(0) 推荐(0) 编辑