洛谷题单
文章平均质量分 75
幽殇默
他时若遂凌云志,敢笑黄巢不丈夫。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【入门1-3】的普及题 【完结】
目录P5707 【深基2.例12】上学迟到 P5707 【深基2.例12】上学迟到 https://www.luogu.com.cn/problem/P5707 #include<cstdio> #include<iostream> #include<cmath> using namespace std; int a1=8*60; int a2=24*60; int main(void) { int s,v; cin>>s>>v; int原创 2021-04-27 20:07:46 · 188 阅读 · 1 评论 -
【入门4】数组【完结】
目录P1428 小鱼比可爱 P1428 小鱼比可爱 https://www.luogu.com.cn/problem/P1428 #include<cstdio> #include<iostream> using namespace std; int a[105],b[105]; int main(void) { int n; cin>>n; for(int i=0;i<n;i++) cin>>a[i]; b[0]=0; for(int i=1原创 2021-04-26 22:02:47 · 683 阅读 · 0 评论 -
【入门5】字符串 【完结】
目录P1125 [NOIP2008 提高组] 笨小猴P1957 口算练习题 P1125 [NOIP2008 提高组] 笨小猴 https://www.luogu.com.cn/problem/P1125 #include<cstdio> #include<iostream> #include<string> #include<cmath> using namespace std; int hush[30]; bool judge(int x) { if(原创 2021-04-25 15:23:03 · 569 阅读 · 1 评论 -
【入门6】函数与结构体【完结】
目录P5735 【深基7.例1】距离函数P5736 【深基7.例2】质数筛 P5735 【深基7.例1】距离函数 https://www.luogu.com.cn/problem/P5735 #include<cstdio> #include<iostream> #include<cmath> using namespace std; double x_1,y_1,x_2,y_2,x_3,y_3; double F() { double a=sqrt( (x_1-x原创 2021-04-24 20:44:47 · 1045 阅读 · 0 评论 -
【洛谷算法1-1】模拟与高精度
目录P2670 [NOIP2015 普及组] 扫雷游戏 【dfs / 模拟】P1601 A+B Problem(高精加)P1303 A*B Problem(高精度乘) P2670 [NOIP2015 普及组] 扫雷游戏 【dfs / 模拟】 https://www.luogu.com.cn/problem/P2670 #include<cstdio> #include<iostream> #include<string> using namespace std; cha原创 2021-04-22 22:37:51 · 802 阅读 · 0 评论 -
【洛谷算法1-2】【排序】习题解析
目录P1271 【深基9.例1】选举学生会 题解 【水题】 P1271 【深基9.例1】选举学生会 题解 【水题】 https://www.luogu.com.cn/problem/P1271 方法一: sort() #include<cstdio> #include<iostream> #include<algorithm> using namespace std; int a[2000005]; int main(void) { int n,m; cin>原创 2021-04-23 19:21:41 · 650 阅读 · 0 评论 -
【洛谷算法1-3】暴力枚举
目录P2089 烤鸡 P2089 烤鸡 https://www.luogu.com.cn/problem/P2089 #include<cstdio> #include<iostream> #include<cmath> using namespace std; int n; int a[10]; int b[60005][10]; int ans=0; void dfs(int index) { if(index==10) { int sum=0; for原创 2021-04-27 22:44:45 · 1020 阅读 · 0 评论 -
【洛谷算法1-4】递推与递归
目录P1255 数楼梯 P1255 数楼梯 https://www.luogu.com.cn/problem/P1255 #include<cstdio> #include<iostream> #include<vector> using namespace std; vector<int>A,B,C; vector<int> add(vector<int> &A,vector<int> &B) { ve原创 2021-04-27 22:14:57 · 283 阅读 · 0 评论 -
【洛谷算法1-5】贪心
目录P1223 排队接水 P1223 排队接水 https://www.luogu.com.cn/problem/P1223 #include<cstdio> #include<iostream> #include<algorithm> using namespace std; struct student { int id; int t; }stu[1005]; bool cmp(student a,student b) { return a.t<b.t;原创 2021-04-28 22:39:33 · 485 阅读 · 0 评论 -
【洛谷算法1-6】二分查找与二分答案
目录P1024 [NOIP2001 提高组] 一元三次方程求解 果真自己还是菜啊,二分模板背的比较熟悉了,做二分的题还是笨的摸不着边际。 P1024 [NOIP2001 提高组] 一元三次方程求解 https://www.luogu.com.cn/problem/P1024 方法一: 暴力 首先零点的左右两边的符号一定是不同的。 #include<cstdio> #include<iostream> using namespace std; double a,b,c,d; do原创 2021-04-28 18:40:13 · 771 阅读 · 0 评论 -
【洛谷算法1-7】【搜索DFS】习题解析
目录[USACO1.5]八皇后 Checker Challenge 【经典】P1135 奇怪的电梯【经典】P1036 [NOIP2002 普及组] 选数 【经典 n中选k】P1605 迷宫 【经典】P1101 单词方阵 【有意思】P2404 自然数的拆分问题 【有点意思 / 经典】P1596 [USACO10OCT]Lake Counting S 【经典】P1162 填涂颜色 【思维秒】 [USACO1.5]八皇后 Checker Challenge 【经典】 https://www.luogu.com.原创 2021-04-17 22:48:05 · 966 阅读 · 1 评论 -
【数据结构1-1】线性表
目录P3156 【深基15.例1】询问学号 P3156 【深基15.例1】询问学号 https://www.luogu.com.cn/problem/P3156 #include<cstdio> #include<iostream> #include<map> using namespace std; int a[2000005]; int main(void) { int n,m;cin>>n>>m; int number; for(in原创 2021-05-02 10:59:30 · 137 阅读 · 0 评论 -
【数学1】基础数学问题
目录P1143 进制转换 P1143 进制转换 https://www.luogu.com.cn/problem/P1143 #include<cstdio> #include<iostream> #include<cmath> #include<string> using namespace std; int n,m; string a; int change_D(string s,int n) { int sum=0; for(int i=0;i&l原创 2021-05-02 20:03:01 · 235 阅读 · 0 评论 -
【算法2-1】前缀和与差分
目录P3397 地毯 P3397 地毯 https://www.luogu.com.cn/problem/P3397 #include<cstdio> #include<iostream> using namespace std; int a[1005][1005]; int n,m; int main(void) { cin>>n>>m; while(m--) { int x,y,xx,yy; cin>>x>>y>&原创 2021-05-04 16:26:21 · 157 阅读 · 1 评论 -
【数据结构1-4】图的基本应用
目录P5318 【深基18.例3】查找文献 【图的两种遍历】 P5318 【深基18.例3】查找文献 【图的两种遍历】 https://www.luogu.com.cn/problem/P5318 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<queue> using namespace std; const int N=1e原创 2021-05-13 12:48:57 · 186 阅读 · 0 评论
分享