- 博客(32)
- 资源 (1)
- 收藏
- 关注
原创 CTF-Bugku-MISC-look
好久没做题了,这么简单的题刚看到就解了第一步,看到提示 look very closely 也没仔细看,我果然是菜鸡。使用HxD看文件头发现这是一个压缩包,果断修改后缀名,得到look图片,得到如下图提示。使用 Steg 仔细观察,发现flag就在其中得到flag——flag{3c15d07e-5d9a-4ccb-b67c-d2369eb2c1b9}...
2022-03-04 17:55:41
838
原创 C语言—素数判断方法
方法一:int isprime(int n){ int m; if (m<2) return 0; for (m=2;m<n;m++) { if (n%m==0) return 0; } return 1;}方法二:int isprime(int n){ int m; if (n<2) return 0; for (m=2;m
2021-12-21 20:03:14
484
原创 ZOJ 3927 Programming Ability Test
签到题#include <stdio.h>#include <string.h>int main(){ int T,n,sum,p; scanf("%d",&T); while (T--) { for (n=0,sum=0;n<4;n++) { scanf("%d",&p); sum+=p; } if (sum>=80) printf("Yes\n"); else printf("No\n")
2021-11-21 21:04:54
783
原创 ZOJ 3860 Find the Spy
简单题#include <stdio.h>#include <string.h>int main(){ int T,N,n,b[10]; char a[2][50],c[50]; scanf("%d",&T); while (T--) { memset(a,0,sizeof(a)); memset(b,0,sizeof(b)); scanf("%d%*c",&N); for (n=0;n<N;n++) { if (
2021-11-21 20:55:42
481
原创 ZOJ 4118 Stones in the Bucket
昂 怎么说呢 还以为是公平分配那种题 会时间超时 试了一下居然不会#include <stdio.h>#include <string.h>#define MAX 100001#define LL long longint main(){ int T,a[MAX],n,N; LL sum,count; scanf("%d",&T); while (T--) { memset(a,0,sizeof(a)); scanf("%d",&N)
2021-11-19 17:55:04
134
原创 ZOJ 4113 Calandar
嗯...卡了好长时间 稍微难一点的简单题都快写不来了 还好最后绕出来了 两次才AC 继续努力#include <stdio.h>#include <string.h>#include <math.h>#define MAX 100int main(){ int T,y1,y2,m1,m2,d1,d2,m,day; char p[MAX]; scanf("%d",&T); while (T--) { scanf("%d%d%d%*c%s
2021-11-19 17:14:07
417
原创 ZOJ 3322 Who is Older?
WL#include <stdio.h>#include <string.h>int main(){ int T,a,b,c,d,e,f; scanf("%d",&T); while (T--) { scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f); if (a==d) { if (b==e) { if (c==f) printf("sa
2021-11-19 09:08:03
382
原创 ZOJ 3479 Chinese Zodiac
dd#include <stdio.h>#include <string.h>int main(){ int T,p; scanf("%d",&T); while (T--) { scanf("%d",&p); switch(p%12) { case 0:printf("Dragon\n");break; case 1:printf("Rabbit\n");break; case 2:printf("Tiger\n")
2021-11-19 09:01:34
393
原创 ZOJ 3610 Yet Another Story of Rock-paper-scissors
无聊题#include <stdio.h>#include <string.h>#define MAX 30int main(){ int T; char a[MAX],b[MAX],c[MAX]; scanf("%d%*c",&T); while (T--) { memset(a,0,sizeof(a)); memset(b,0,sizeof(b)); memset(c,0,sizeof(c)); scanf("%s%*c%s%*c%
2021-11-19 08:48:20
253
原创 ZOJ 3767 Elevator
无聊题#include <stdio.h>#include <string.h>int main(){ int T,N,n,m,p,k; scanf("%d",&T); while (T--) { scanf("%d%d",&N,&m); for (n=0,p=0;n<N;n++) { scanf("%d",&k); p+=k; } if (p<=m) printf("Safe\n"
2021-11-18 21:41:59
243
原创 ZOJ 3819 Average Score
没啥好考虑的 测试案例过一遍就基本上没问题 注意其他班用来整除时无论如何都要+1#include <stdio.h>#include <string.h>int main(){ int T,N,M,n,m,x,y,p; scanf("%d",&T); while (T--) { scanf("%d%d",&N,&M); for (n=0,x=0;n<N-1;n++) { scanf("%d",&p);
2021-11-18 21:33:29
249
原创 ZOJ 3809 The Himalayas
太久没写这种题 差点掉坑里 还好一次就AC了 PS:天天刷签到题人快废了#include <stdio.h>#include <string.h>#define MAX 10000int main(){ int T,n,m,p,k,a[MAX]; scanf("%d",&T); while (T--) { memset(a,0,sizeof(a)); scanf("%d",&m); for (n=0;n<m;n++) sc
2021-11-18 21:22:12
297
原创 ZOJ 3947 Very Happy Great BG
签到...#include <stdio.h>#include <string.h>int main(){ int T,N,n,m,p,k; scanf("%d",&T); while (T--) { scanf("%d",&N); for (m=0,n=0;n<N;n++) { scanf("%d",&p); m+=p; } printf("%d\n",m+N); } return 0;}
2021-11-18 17:58:14
135
原创 ZOJ 3936 Apples and ldeas
签到题....#include <stdio.h>#include <string.h>int main(){ int T,n,m,a,b,c,d; scanf("%d",&T); while (T--) { scanf("%d%d%d%d",&a,&b,&c,&d); printf("%d %d\n",c,b+d); printf("%d %d\n",a,b+d); } return 0;}...
2021-11-18 17:54:27
97
原创 ZOJ 4037 Peer Review
一道有点离谱的题目#include <stdio.h>#include <string.h>int main(){ int T,n,m; scanf("%d",&T); while (T--) { scanf("%d",&m); for (n=0;n<m;n++) { if (n==m-1) printf("0\n"); else printf("0 "); } } return 0;}
2021-11-18 17:46:06
127
原创 ZOJ 4036 Lucky 7
又又又是签到题#include <stdio.h>#include <string.h>int main(){ int T,n,m,p,k,b,flag; scanf("%d",&T); while (T--) { scanf("%d%d",&m,&b); for (n=0,flag=0;n<m;n++) { scanf("%d",&p); if ((p+b)%7==0) flag=1; }
2021-11-18 17:39:03
119
原创 ZOJ 4023 PPAP
签到题 太常见了 题目都没看#include <stdio.h>#include <string.h>#include <ctype.h>#define MAX 100int main(){ int T,n,m; char a[MAX],b[MAX]; scanf("%d%*c",&T); while (T--) { scanf("%s%*c%s",a,b); for (n=0,m=strlen(b);n<m;n++)
2021-11-17 14:46:51
170
原创 ZOJ 2807 Electrical Outlets
签到题 把每个排插的插口加上再减去排插占用的数量即可#include <stdio.h>#include <string.h>#define MAX 100int main(){ int T,N,n,sum,p,a[MAX]; scanf("%d",&T); while (T--) { scanf("%d",&N); for (n=0,sum=1;n<N;n++) { scanf("%d",&p); sum+
2021-11-17 14:33:20
122
原创 vrrp 与 热备份路由
根据拓扑图 用小黄帽和CRT进行操作核心1与核心2连接1号楼为vlan101 均使用1口 连接8号楼为108 使用8口两个核心之间使用1口连接 (15口留作上连口) 配置trunksw mode trunksw turnk e d以核心1为例在全局模式下配置生成树 使其封闭我们想要封闭的端口 (设置大小 越小优先级越高)在vlan101中设置vrrp与热备份路由vrrp 101 pre (开启抢夺模式)vrrp 101 pri 150 (设置优先级大小 越大...
2021-11-17 14:13:12
196
原创 ZOJ 3323 Somali Pirates
#include <stdio.h>#include <string.h>int main(){ int T,n,m; char a[100]; scanf("%d%*c",&T); while (T--) { scanf("%s",a); for (n=0,m=strlen(a);n<m;n++) { if (a[n]>='0' && a[n]<='9') continue; printf(.
2021-11-16 10:49:08
175
原创 ZOJ 2722 Head-to-Head Match
又是一道签到题#include <stdio.h>#include <string.h>int main(){ int n,m,p,k,count; while (1) { scanf("%d",&p); count=0; if (p==0) break; while (p!=1) { count++; if (p%2==0) p/=2; else p=p/2+1; } printf("%d
2021-11-16 10:18:00
146
原创 ZOJ 2388 Beat the Spread
每天刷刷签到题 铁废物无疑#include <stdio.h>#include <string.h>#include <math.h>int main(){ int T,x,y,s,d; scanf("%d",&T); while (T--) { scanf("%d%d",&s,&d); y=(s-d)/2; x=d+y; if (x<0 || y<0 || x+y!=s || abs(x-y)!=
2021-11-15 22:00:48
476
原创 ZOJ 2321 Filling Out the Team
上课的时候利用课余时间写了大部分 一直超时 没想明白 到现在坐下来才发现也不是超时的原因 写的太糙了#include <stdio.h>#include <string.h>int main(){ int flag=0,b,c; double a; while (1) { scanf("%lf%d%d",&a,&b,&c); if (a==0 && b==0 && c==0) break;
2021-11-15 21:45:13
264
原创 ZOJ 3714 Java Beans
一道签到题 但卡了很久 题目理解错了 原本不想这样写的 后面再改了#include <stdio.h>#include <string.h>#include <stdlib.h>#define MAX 220int cmp(const void *a,const void *b);int main(){ int T,n,m,p,k,t,a[MAX],b[MAX]; scanf("%d",&T); while (T--) { memse
2021-11-14 20:55:51
588
原创 ZOJ 2208 To and Fro
看了第一眼 没看题目描述 以为是栅栏密码 写了个栅栏密码解密的脚本发现不对 是从左到右 再从右到左循环 写完后居然报wrong answer 发现数组大小搞错了...#include <stdio.h>#include <string.h>#define MAX 1000int main(){ int n,m,p,k,x,y; char a[MAX],b[MAX][30]; while (1) { scanf("%d%*c",&p); if (p
2021-11-13 10:44:48
409
原创 ZOJ 2212 Argus
这题还行 题意:register n m n 为Q_num 类似于账户 m为耗时 #为注册结束 p为输出个数#include <stdio.h>#include <string.h>#include <stdlib.h>#define MAX 10000int cmp(const void *a,const void *b);int main(){ int n,m,p,k=0,a[MAX][3...
2021-11-13 09:52:20
489
原创 ZOJ 2201 No Brainer
一道签到题 比较僵尸需要吃掉的脑子 和 现有的脑子数量 当大于等于时输出MMM BRAINS 否则输出NO BRAINS#include <stdio.h>#include <string.h>int main(){ int N,x,y; scanf("%d",&N); while (N--) { scanf("%d%d",&x,&y); if (x>=y) ...
2021-11-13 09:19:59
269
原创 ZOJ 2302 Elevator
题目大意: 有N个员工 N后跟3*N个数 分别为员工所在层数、员工到达层数及员工到达所在层数的时间,每次求出最快把所有员工送到相应层数所耗时,当N取为负数时停止。看了很久,有想法但不知道怎么写,大概看了十分钟发现用链表应该好做点,现在真是越来越菜了,做道题找思路花了这么长时间。代码过段时间发,太久不写链表 指针啥的 全都不会了 =-=...
2021-11-11 21:19:05
420
原创 Python 100以内素数
a = 2b = 2while a <= 100: for c in range(2, a+1): if a % c == 0: break if a == 2 or c == a: print(a, "是素数") else: print(a, "不是素数") a += 1
2021-10-25 22:10:03
1113
原创 Python 最大公约数和最小公倍数
a = int(input("输入第一个数"))b = int(input("输入第二个数"))i = 1j = 1if a > b: while j <= b: if a % j == 0 and b % j == 0: i = j j += 1else: while j <= a: if a % j == 0 and b % j == 0: i = j .
2021-10-25 22:02:42
512
原创 Base64 原理 及 Base64 隐写
Base64由 a-z 、A-Z 、+ 、/ 、=组成,= 为填充字符。索引 对应字符 索引 对应字符 索引 对应字符 索引 对应字符 0 A 17 R 34 i 51 z 1 B 18 S 35 j 52 0 2 C 19 T 36 k 53 1 3 D 20 U 37 l 54..
2021-10-20 22:21:51
549
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人