Loading

上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: 前言 近期发现我NEFU低年级组校赛题目只有模拟+数论,恰恰都是我最不会做的,数论方面反反复复用到的就是素数筛,特在此记录一下,闲来无事自己翻阅当作复习复习,以免被到时候一道题都做不出来菜到巨佬们。 代码 查找2-N的所有素数,如下 //线性筛 void init() { phi[1] = 1; f 阅读全文
posted @ 2020-12-01 22:09 Do1phln 阅读(152) 评论(0) 推荐(0)
摘要: 本人随便乱写,目前正确性未知 C.本质上升序列 #include<bits/stdc++.h> using namespace std; bool access[4][4]; int dfs(int idx, int x, int y) { if(x<0 || y<0 || x>=4 || y>=4 阅读全文
posted @ 2020-12-01 22:07 Do1phln 阅读(275) 评论(0) 推荐(0)
摘要: #include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> using namespace std; const int maxn = 100 + 5; char piece[maxn][maxn]; int n,m 阅读全文
posted @ 2020-11-10 20:02 Do1phln 阅读(104) 评论(0) 推荐(0)
摘要: 逆向考虑即可解决 #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 阅读全文
posted @ 2020-11-10 19:04 Do1phln 阅读(148) 评论(0) 推荐(0)
摘要: 在输入过程中同时进行数据处理,代码简洁,效率较高 #include<iostream> #include<cstdio> using namespace std; bool solve(int& W) { int W1,D1,W2,D2; bool b1=true,b2=true; cin>>W1> 阅读全文
posted @ 2020-11-10 18:00 Do1phln 阅读(129) 评论(0) 推荐(0)
摘要: 2022.4.20重新整理排版 图片类 文件类型 后缀 文件头 文件尾 标志 JPEG .jpg/.jpeg FFD8FF FFD9 JFIF PNG .png 89504E47 AE426082 PNG IEND IHDR GIF .gif 47494638 003B GIT9a TIFF .ti 阅读全文
posted @ 2020-11-10 16:13 Do1phln 阅读(4556) 评论(0) 推荐(1)
摘要: Description 给出长度为n的数组,找出这个数组的最长上升子序列 Input 第一行:输入N,为数组的长度(2=<N<=50000) 第二行:N个值,表示数组中元素的值(109<=a[i]<=109) Output 输出最长上升子序列的长度 Sample Input 5 -6 4 -2 10 阅读全文
posted @ 2020-11-06 22:20 Do1phln 阅读(184) 评论(0) 推荐(0)
摘要: #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 阅读全文
posted @ 2020-11-05 20:24 Do1phln 阅读(119) 评论(0) 推荐(0)
摘要: #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; 阅读全文
posted @ 2020-11-05 20:22 Do1phln 阅读(124) 评论(0) 推荐(0)
摘要: Pass-01 前端js绕过 拿到题目看hint提示判定在前端,用burp代理,将1.php后缀名更改为.png格式即可通过前端检测,而后在burp中对修改包内容,将1.png改为1.php即可绕过前端js检测 Pass-02 MIME验证 上传php后显示不成功,但是上传图片显示正常,即使用bur 阅读全文
posted @ 2020-11-04 22:56 Do1phln 阅读(233) 评论(0) 推荐(0)
摘要: Lets Warm Up If I told you a word started with 0x70 in hexadecimal, what would it start with in ASCII? 这应该就是签到题了吧?爱了爱了,十六进制转十进制再打表(突然ACM)转ASCII,得到‘p’, 阅读全文
posted @ 2020-11-04 22:55 Do1phln 阅读(367) 评论(0) 推荐(0)
摘要: 思路 队列的原理基本与站队一样,队首出,队尾入,变化以后也是大同小异,写起来主要就是注意struct的相关知识,以及伪指针(分别指向队首和队尾+1),队尾序号要+1以防首位变量数字重合造成不必要的麻烦(目前也不是很清楚会遇到什么) 代码 #include<iostream> using namesp 阅读全文
posted @ 2020-11-04 22:52 Do1phln 阅读(177) 评论(0) 推荐(0)
摘要: 思路 快排基本思路应该就是二分+递归,从两侧同时(实则先从右往左)往中间找,同时和参变量对比,发现位置颠倒后交换位置,然后通过二分将其一块一块的分割开,直到分割到一个元素位置,即完成了快排。 代码 #include<bits/stdc++.h> using namespace std; int a[ 阅读全文
posted @ 2020-11-04 22:51 Do1phln 阅读(308) 评论(0) 推荐(0)
摘要: #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<= 阅读全文
posted @ 2020-11-04 22:49 Do1phln 阅读(92) 评论(0) 推荐(0)
摘要: 刷pico遇到一个凯撒密码加密题,顺手写了个解密工具,但是暂时没有解决到边界字母的升降档问题 #include<iostream> using namespace std; int main(){ char s[100]; int n,k,s2[100]; cin>>n>>k; for(int i= 阅读全文
posted @ 2020-11-04 22:46 Do1phln 阅读(188) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 下一页