关闭

poj3276 Face The Right Way 反转问题

Face The Right Way Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 5709   Accepted: 2641 Description Farmer John has arranged his N (1 ≤ N ≤ 5,000) cows in a...
阅读(5) 评论(0)

《挑战程序设计竞赛》 坐标离散化技巧实现

问题: w*h的格子上画了n条或垂直或水平的宽度为1的直线。求出这些线将格子划分了多少个区域 。w和h的范围都为[1, 1000000],n的范围为[1,500]。 输入: w,h,n x1,x2,y1,y1 10 10 5 1 9 4 1 10 6 9 4 10 10 4 1 1 8 6 4 5 10 8 10 结果: 6 分析: w和h都较大,直接搜索肯定超时...
阅读(8) 评论(0)

ubuntu下安装Anaconda后打不开ipython notebook (jupyter notebook)

一.安装Anaconda 1.打开Anaconda官网 Anaconda下载官网, 64位电脑一般情况下使用第一个x86_64,只要记住这个能兼容32就行了。 x86_64,x64基本上是同一个东西,我们现在用的intel/amd的桌面级CPU基本上都是x86_64,与之相对的ppc等都不是x86_64。 2.打开终端,跳到相应目录,输入:bash Anaconda3-5.0.1-Linu...
阅读(111) 评论(0)

《挑战程序设计竞赛》 超大背包问题实现

问题:有n个重量和价值分别为w[i]和v[i]的物品,从这些物品中挑选总重量不超过W的物品,求所有挑选方案中价值总和的最大值。 1 ≤ n ≤ 40 1 ≤ w[i], v[i] ≤ 10^15 1 ≤ W ≤ 10^15 分析:直接用01背包肯定超时。可以对前n/2个元素进行枚举sw1,然后后n-n/2个元素进行枚举sw,然后再sw1中二分查找 #include #include...
阅读(49) 评论(0)

poj2785 折半枚举 双向查找

4 Values whose Sum is 0 Time Limit: 15000MS   Memory Limit: 228000K Total Submissions: 24737   Accepted: 7467 Case Time Limit: 5000MS Description The SUM problem can...
阅读(17) 评论(0)

斐波那契数列 python实现

一.递归 #递归计算第n项 def febonaqi(n): if(n<=1): return n else: return febonaqi(n-1)+febonaqi(n-2) 二.迭代 1.迭代返回列表 def febonaqi(n): febo = [] for i in range(n): if i <= 1:...
阅读(27) 评论(0)

poj3104 二分

Drying Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 18783   Accepted: 4727 Description It is very hard to wash and especially to dry clothes in winter. Bu...
阅读(14) 评论(0)

poj2674 弹性碰撞

Linear world Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 4304   Accepted: 977 Description The Disc, being flat, has no real horizon. Any adventurous sail...
阅读(14) 评论(0)

POJ3684 弹性碰撞

Physics Experiment Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2758   Accepted: 987   Special Judge Description Simon is doing a physics experiment wit...
阅读(10) 评论(0)

poj3273 二分 易错题

Monthly Expense Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 29665   Accepted: 11263 Description Farmer John is an astounding accounting wizard and has re...
阅读(15) 评论(0)

poj3258 二分

River Hopscotch Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 16187   Accepted: 6791 Description Every year the cows hold an event featuring a peculiar ver...
阅读(9) 评论(0)

poj 3111 K Best 二分

K Best Time Limit: 8000MS   Memory Limit: 65536K Total Submissions: 11677   Accepted: 3016 Case Time Limit: 2000MS   Special Judge Description Demy has n jewels....
阅读(14) 评论(0)

poj 2456 二分

Aggressive cows Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 16384   Accepted: 7837 Description Farmer John has built a new long barn, with N (2 His C...
阅读(10) 评论(0)

poj 1064 二分

Cable master Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 51858   Accepted: 10912 Description Inhabitants of the Wonderland have decided to hold a regiona...
阅读(7) 评论(0)

poj3320 尺取法

Jessica's Reading Problem Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 14120   Accepted: 4837 Description Jessica's a very lovely girl wooed by lots of bo...
阅读(9) 评论(0)
122条 共9页1 2 3 4 5 ... 下一页 尾页
    查看我的豆瓣,交流读书心得
    个人资料
    • 访问:44135次
    • 积分:1553
    • 等级:
    • 排名:千里之外
    • 原创:114篇
    • 转载:8篇
    • 译文:0篇
    • 评论:2条
    博客专栏
    最新评论