会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
晨阳
导航
博客园
首页
新随笔
联系
订阅
管理
公告
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)