码迷,mamicode.com
首页 >  
搜索关键字:day 7    ( 6063个结果
Problem F CodeForces 16E
Descriptionnfish, numbered from1ton, live in a lake. Every day right one pair of fish meet, and the probability of each other pair meeting is the same...
分类:其他好文   时间:2014-07-28 11:30:30    阅读次数:367
javascript学习 - js的Date对象函数
js的Date函数功能很强大。一般用到的。 首先获取当前日期: var CurDate = new Date(); var Year = CurDate.getFullYear(); //年份(四位 例:2014) var Month = CurDate.getMonth()+1; //月 0~11 var Day = CurDate.getDate(); //获得几号 1~31 var week = CurDate.getDay(); //获得周几 0~6 解释:0是周日 1是周一...
分类:编程语言   时间:2014-07-27 11:30:33    阅读次数:235
POJ2239_Selecting Courses(二分图最大匹配)
解题报告 题目传送门 题意: 每天有12节课,一周上7天,一门课在一周有多天上课。求一周最多上几节课。 思路: 把课程看成一个集合,上课的时间看成一个集合,二分图就出来了。 #include #include #include using namespace std; int n,day[10][15],mmap[500][500],vis[500],cnt,pre[500];...
分类:其他好文   时间:2014-07-27 11:24:42    阅读次数:227
题目1043:Day of Week(输入日期与当前日起天数差%7,在做相关星期调整)
题目描述:We now use the Gregorian style of dating in Russia. The leap years are years with number divisible by 4 but not divisible by 100, or divisible by...
分类:其他好文   时间:2014-07-26 01:34:27    阅读次数:252
[LeetCode] Best Time to Buy and Sell Stock
Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction ...
分类:其他好文   时间:2014-07-26 01:23:26    阅读次数:229
java实现一个月的最后一个星期天
Calendar instance = Calendar.getInstance(); System.out.println(instance.getTime()); instance.add(Calendar.MONTH, 1);//月份+1 instance.set(Calendar.DAY_OF_MONTH, 1);//天设为一个月的第一天 System.out.printl...
分类:编程语言   时间:2014-07-24 23:14:24    阅读次数:298
日期大小判断js
//判断date1是否大于date2+dayfunction compareDate(date1, date2, day) { var startdate = new Date((date1).replace(/-/g, "/")); var enddate = date2 == null ? ne...
分类:Web程序   时间:2014-07-24 17:16:05    阅读次数:226
【LeetCode】【Python题解】Best Time to Buy and Sell Stock II
Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy on...
分类:编程语言   时间:2014-07-24 10:25:36    阅读次数:227
POJ 3684 Priest John's Busiest Day 2-SAT+输出路径
强连通算法判断是否满足2-sat,然后反向建图,拓扑排序+染色。 一种选择是从 起点开始,另一种是终点-持续时间那个点 开始。 若2个婚礼的某2种时间线段相交,则有矛盾,建边。 容易出错的地方就在于判断线段相交。 若s1 输出路径的做法可以参考论文2-SAT解法浅析 #include #include #include #include #include #include #...
分类:其他好文   时间:2014-07-23 16:39:31    阅读次数:262
HDU 4861(多校)1001 Couple doubi
Problem Description DouBiXp has a girlfriend named DouBiNan.One day they felt very boring and decided to play some games. The rule of this game is as following. There are k balls on the desk. Every...
分类:其他好文   时间:2014-07-23 00:05:27    阅读次数:344
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!