Fork me on GitHub
摘要: #include <stdio.h> int Queenes[8]={0},Counts=0; k =0; int Check(int line,int list){ //遍历该行之前的所有行 for (int index=0; index<line; index++) { //挨个取出前面行中皇后 阅读全文
posted @ 2020-11-26 14:57 暗里有光 阅读(116) 评论(0) 推荐(0) 编辑
摘要: #include <stdlib.h> #include <stdio.h> #define N 20 void MatrixChain(int p[N],int n,int m[N][N],int s[N][N]){ int i,j,t,k; int r; //记录相乘的矩阵个数变量 for(i= 阅读全文
posted @ 2020-11-12 15:27 暗里有光 阅读(322) 评论(0) 推荐(1) 编辑
摘要: #include<stdio.h> void package_part(int *w,int *v,double *p,int n,int c,int *flag) { int i,j,temp; double tempD,totalValue = 0.0; //计算单位 for(i=0;i<n;i 阅读全文
posted @ 2020-11-12 15:15 暗里有光 阅读(287) 评论(1) 推荐(0) 编辑
摘要: #include<stdio.h> /* * s[]:活动的开始时间 * f[]:活动的结束时间(非降序排列) * a[]:0或者1,为0表示活动不被安排,1表示活动被安排 * k:活动个数 */ void greedy(int s[],int f[],int a[],int k) { int i; 阅读全文
posted @ 2020-11-12 14:57 暗里有光 阅读(504) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<stdlib.h> int V[100][100];//前i个物品装入容量为j的背包中获得的最大价值 int max(int a,int b){ if(a>=b) return a; else return b; } int KnapSack(i 阅读全文
posted @ 2020-10-29 15:12 暗里有光 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 打开txt ,观察反常必有妖: 提取全文故意大写的字母; kali@kali:~/桌面$ strings sherlock.txt | grep -o '[A-Z]' | tr -d '\n' strings 打印文件中可打印的字符 grep -o 只显示匹配到的字符串 tr -d 删除指定字符 发 阅读全文
posted @ 2020-10-26 20:10 暗里有光 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 题目: 已知椭圆曲线加密Ep(a,b)参数为 p = 15424654874903 a = 16546484 b = 4548674875 G(6478678675,5636379357093) 私钥为 k = 546768 求公钥K(x,y) 题解: 数据为十进制,其次椭圆曲线类型为G§,接着输入 阅读全文
posted @ 2020-10-25 14:19 暗里有光 阅读(502) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python # visit http://tool.lu/pyc/ for more information import base64 def encode1(ans): s = '' for i in ans: x = ord(i) ^ 36 x = x + 25 阅读全文
posted @ 2020-10-24 22:50 暗里有光 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 题目:在一次RSA密钥对生成中,假设p=473398607161,q=4511491,e=17求解出d RSA的计算过程是: 任选两个大质数p和q,p!=q,计算N=pq 计算N的欧拉函数r(n)=(p-1)(q-1) 任选一个e满足 1<e<r(n) ,且e与r(n)互质 找到d,使e*d/r(n 阅读全文
posted @ 2020-10-24 15:37 暗里有光 阅读(706) 评论(0) 推荐(0) 编辑
摘要: Web89 include("flag.php"); highlight_file(__FILE__); if(isset($_GET['num'])){ $num = $_GET['num']; if(preg_match("/[0-9]/", $num)){ die("no no no!"); 阅读全文
posted @ 2020-10-10 19:49 暗里有光 阅读(1215) 评论(0) 推荐(0) 编辑
1