会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
luopengting
勿忘初心,方得始终
导航
博客园
首页
新随笔
联系
订阅
管理
公告
上一页
1
···
3
4
5
6
7
2014年4月20日
hdu 1.2.3
摘要: 很简单的算法基础题...闰年判断以及计算 1 #include 2 #include 3 using namespace std; 4 int main() 5 { 6 //freopen("input.txt","r",stdin); 7 int year,n; 8 int...
阅读全文
posted @ 2014-04-20 10:13 lpt
阅读(160)
评论(0)
推荐(0)
ZOJ 1789 The Suspects
摘要: 与2833差不多基本上只是merge函数那里的优先做父亲的条件改一下便可提高效率... 1 //The Suspects 2 #include 3 #include 4 int parent[30001]; 5 int find(int i) 6 { 7 while(parent[i] >=...
阅读全文
posted @ 2014-04-20 10:06 lpt
阅读(327)
评论(0)
推荐(0)
ZOJ 2833 Friendship
摘要: 第一次敲并查集... 1 #include 2 #include 3 int parent[100002];//注意下标值,不然交了会segmentation fault 4 int find(int i) 5 { 6 while(parent[i] >= 0) 7 i = ...
阅读全文
posted @ 2014-04-20 10:04 lpt
阅读(190)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7