会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
dy blog
大学喵
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
17
18
19
20
21
22
23
24
下一页
2015年11月30日
linux 终端相关
摘要: echo cd ~/桌面 >> .bashrc 将终端默认路径设为桌面 ~/.bashrc、/etc/bash.bashrc、/etc/profile这几个文件。这些文件的的作用时机:/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/pro
阅读全文
posted @ 2015-11-30 14:34 cdongyang
阅读(172)
评论(0)
推荐(0)
2015年11月26日
LA2965 n个数中选出最多个数异或和为0
摘要: intput n 1<=n<=24 n串只有大写字母的字符串 output 选出最多个字符串且每个大写字母出现的次数为偶数 第一行输出个数x 第二行输出x个字符串的下标 做法:将每个字符串转化为一个26bit数,1为奇数个大写字母,0为偶数个,则转化为找出最多个数异或和为0,直接枚举为O((2^n)
阅读全文
posted @ 2015-11-26 10:05 cdongyang
阅读(957)
评论(0)
推荐(0)
2015年11月25日
UVALive 2678 大于s的最短子序列和
摘要: inputn s 10 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #define MAX 1000...
阅读全文
posted @ 2015-11-25 20:48 cdongyang
阅读(284)
评论(0)
推荐(0)
UVA 1193 区间相关(greedy)
摘要: input n d 1<=n<=1000 n行坐标xi,yi output 位于x轴扫描器的扫描距离为d,至少要多少个扫描器才能扫描到所有坐标 如果无法扫描完输出-1,否则输出扫描器个数 做法:将每个坐标转化为扫描器可扫到它的区间,然后取最少区间,最少区间为最多的不连续区间数 1 #include<
阅读全文
posted @ 2015-11-25 19:17 cdongyang
阅读(331)
评论(0)
推荐(0)
2015年11月23日
UVA 11992 线段树
摘要: inputr c m r 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #d...
阅读全文
posted @ 2015-11-23 20:29 cdongyang
阅读(238)
评论(0)
推荐(0)
UVA 1400 线段树
摘要: inputn m 1 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #defi...
阅读全文
posted @ 2015-11-23 09:09 cdongyang
阅读(283)
评论(0)
推荐(0)
2015年11月22日
NBUT 1120 线段树
摘要: inputq nq行 F a b或者Q a boutputface left face top face right可以用map或者线段树做 1 //map 2 #include 3 #include 4 using namespace std; 5 mapa; 6 int main() 7 {...
阅读全文
posted @ 2015-11-22 19:32 cdongyang
阅读(161)
评论(0)
推荐(0)
2015年11月18日
最大连续区间和的算法总结(转)
摘要: 最大连续区间和是一个经典的问题。给定一个长度为n的序列a[1],a[2]...a[n-1],a[n],求一个连续的子序列a[i],a[i+1]...a[j-1],a[j],使得a[i]+a[i+1]...a[j-1]+a[j]最大。①最简单最容易想到的就是根据定义来枚举。枚举上下界{i,j | 0<
阅读全文
posted @ 2015-11-18 20:46 cdongyang
阅读(350)
评论(0)
推荐(0)
2015年11月5日
hiho 1015 KMP
摘要: input1 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 13 using namespace st...
阅读全文
posted @ 2015-11-05 10:11 cdongyang
阅读(172)
评论(0)
推荐(0)
2015年11月3日
hiho#1128 : 二分·二分查找
摘要: input 1<=n<=1e6 1<=k<=2*1e9 a1 a2 ... an 1<=an<=2*1e9 output k存在则输出k是第几大的数,否则输出-1 做法,从两端开始找到中间,把比b大的和比b小的交换 1 #include <cstdio> 2 #include <queue> 3 #
阅读全文
posted @ 2015-11-03 12:28 cdongyang
阅读(184)
评论(0)
推荐(0)
上一页
1
···
17
18
19
20
21
22
23
24
下一页
公告