会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
晨阳
导航
博客园
首页
新随笔
联系
订阅
管理
公告
上一页
1
2
3
4
5
6
7
8
下一页
2018年7月24日
map用法详解
摘要: 迭代器用法map m; //第一个为键,第二个为值 for(int i=10;i>=0;i--) // 这里是按从大到小的顺序,但是迭代器是按从小到大的顺序输出 if(i%2==0) //因为map自带按键从小到大...
阅读全文
posted @ 2018-07-24 11:48 ~~晨阳
阅读(981)
评论(0)
推荐(0)
2018年7月23日
随机生成一个0到100的数,让用户猜,允许猜5次,每次猜大了或猜小了,都要给出提示,最后给出正确答案
摘要: #include #include #include int main(){ int n,i,k; srand(time(NULL)); n=rand()%101; for(i=1;in) ...
阅读全文
posted @ 2018-07-23 20:40 ~~晨阳
阅读(437)
评论(0)
推荐(0)
LIS LCS (最长上升子序列,最长公共子序列)
摘要: LIS 最长上升子序列 #include #include using namespace std;int a[1001],ans[1001],len;int main(){ int n,T; cin>>T; while(T--) { ...
阅读全文
posted @ 2018-07-23 17:30 ~~晨阳
阅读(140)
评论(0)
推荐(0)
去重,lower_bound(),upper_bound()
摘要: bool cmp(int a,int b){ return a<b;}int main(){ int a[10]={2,7,1,4,4,6}; sort(a,a+6,cmp); // 去重之前先排序 int m=unique(a,...
阅读全文
posted @ 2018-07-23 17:15 ~~晨阳
阅读(120)
评论(0)
推荐(0)
hh
摘要: import java.io.*;import java.util.*;import java.math.*;import java.text.*;public class Main { public static void main(String args[]) ...
阅读全文
posted @ 2018-07-23 11:44 ~~晨阳
阅读(147)
评论(0)
推荐(0)
2018年7月21日
SDUT 3923 打字
摘要: snow 是个热爱打字的家伙,每次敲出更快的速度都会让他很开心。现在,他拿到一篇新的打字文章,已知这篇文章只有 26 个小写英文字母,给出 snow 打出这 26 个英文字母分别需要多少时间 (s),问 snow 打完这篇文章获得的 kpm(打正确的字数/所花的分钟数...
阅读全文
posted @ 2018-07-21 20:43 ~~晨阳
阅读(117)
评论(0)
推荐(0)
最短路
摘要: 对四种最短路算法的总结 博客来源:转自 https://blog.csdn.net/JKdd123456/article/details/80615322大佬博客 迪杰斯特拉算法最短路的四种算法总结师哥博客(代码来源)最短路径问题介绍问题解释:从图中的某个顶点出发到达...
阅读全文
posted @ 2018-07-21 08:40 ~~晨阳
阅读(224)
评论(0)
推荐(0)
2018年7月20日
阶乘后面0的个数(51Nod 1003)
摘要: n的阶乘后面有多少个0?6的阶乘 = 1*2*3*4*5*6 = 720,720后面有1个0。Input一个数N(1 int main(){ int n,a,sum=0; scanf("%d",&n); while(n>=5) { ...
阅读全文
posted @ 2018-07-20 17:08 ~~晨阳
阅读(194)
评论(0)
推荐(0)
大数加法
摘要: 给出2个大整数A,B,计算A+B的结果。Input第1行:大数A第2行:大数B(A,B的长度 #include #include#include#include using namespace std;typedef long long LL;int main(){ ...
阅读全文
posted @ 2018-07-20 16:46 ~~晨阳
阅读(204)
评论(0)
推荐(0)
Biorhythms(中国剩余定理)
摘要: 中国剩余定理详解见博客:https://www.cnblogs.com/linyujun/p/5199415.html BiorhythmsSome people believe...
阅读全文
posted @ 2018-07-20 16:07 ~~晨阳
阅读(147)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
下一页