码迷,mamicode.com
首页 >  
搜索关键字:sunday    ( 300个结果
July 17th 2017 Week 29th Sunday
A heart is a heavy burden. 心,可是很重的。 Follow your heart, but always take your brain with you. Easy to say, but hard to comply with it in the actual worl ...
分类:其他好文   时间:2017-09-30 00:27:23    阅读次数:201
Problem A. Array Factory XVII Open Cup named after E.V. Pankratiev Stage 4: Grand Prix of SPb, Sunday, Octorber 9, 2016
思路: 直接二分长度不可行,因为有负数。 考虑枚举坐便删l个数,那如果可以在短时间内求出符合条件的右边最小删的数的个数,这题便可做了。 即:当左边删l个数时,要使sum[n]-sum[l]-fsum[n+1-x] <= s成立,求出最小的x。(sum为前缀和,fsum为后缀和) 思考后可以发现可行的 ...
分类:其他好文   时间:2017-09-28 22:33:17    阅读次数:428
【找规律】【递归】XVII Open Cup named after E.V. Pankratiev Stage 4: Grand Prix of SPb, Sunday, Octorber 9, 2016 Problem F. Doubling
题意: 给你一个n,问你R(n)对应的字符串长度最小的是啥。 dp打个表出来,f(i)表示i值对应的字符串的最小长度,发现f(1)=1,f(2)=2,其他的情况下,若是偶数,则恰好在其外面加一对中括号,然后中间填i/2最优,若是奇数,恰好在i-1前面加个1最优。 于是递归输出答案即可。 ...
分类:其他好文   时间:2017-09-28 19:16:20    阅读次数:181
【枚举】XVII Open Cup named after E.V. Pankratiev Stage 4: Grand Prix of SPb, Sunday, Octorber 9, 2016 Problem D. Cutting Potatoes
题意:有n个土豆,每个有体积V(i),你可以将每个土豆等分为不超过K份,问你最大块和最小块比值最小为多少。 直接枚举切法,只有n*K种,然后保证其为最大块,去算其他块的切法,即让其他块切得尽可能大即可。O(n*n*K)。 ...
分类:其他好文   时间:2017-09-28 19:13:25    阅读次数:193
【推导】【贪心】XVII Open Cup named after E.V. Pankratiev Stage 4: Grand Prix of SPb, Sunday, Octorber 9, 2016 Problem H. Path or Coloring
题意:给你一张简单无向图(但可能不连通),再给你一个K,让你求解任意一个问题:K染色或者输出一条K长路径。 直接贪心染色,对一个点染上其相邻的点的颜色集合之中,未出现过的最小的颜色。 如果染成就染成了。如果到某个点,发现染不成,则倒着按照颜色从大到小回去,则一定恰好可以找出一条K长度的路径。 ...
分类:其他好文   时间:2017-09-28 19:13:04    阅读次数:143
2017 ACM-ICPC 亚洲区(青岛赛区)网络赛 1003
#include<iostream> #include<cstdio> #include<cmath> #include<string> #include<vector> using namespace std; typedef long long int LL; int Sunday(string ...
分类:其他好文   时间:2017-09-17 19:06:49    阅读次数:486
July 02nd 2017 Week 27th Sunday
No safe wading in an unknown water. 未知水深浅,涉水有危险。 Is this the theory that has been the guideline for the China's reformation: Crossing the river by fee ...
分类:其他好文   时间:2017-09-15 01:41:07    阅读次数:247
MySql按周,按月,按日分组统计数据
知识关键词:DATE_FORMAT DATE_FORMAT(date,format) 根据format字符串格式化date值。下列修饰符可以被用在format字符串中: %M 月名字(January……December) %W 星期名字(Sunday……Saturday) %D 有英语前缀的月份的日 ...
分类:数据库   时间:2017-09-12 17:38:10    阅读次数:116
记一次生产的bug
第一个在代码中使用 new SimpleDateFormat("EEEE")来判断周几。在本地测试过程中通过日志打印出来的周几 比如周日对应的是中文汉字“星期日”,然后使用判断 if("星期日".equals(weekDay)){ } (其中weekDay是要使用的日期)。在本地测试通过后就愉快的上 ...
分类:其他好文   时间:2017-09-04 10:57:47    阅读次数:155
java获取上周任意一天的日期
public static Date getDayOfWeek(int dayOfWeek,int weekOffset){ if(dayOfWeek>Calendar.SATURDAY || dayOfWeek<Calendar.SUNDAY){ return null; } Calendar d... ...
分类:编程语言   时间:2017-09-02 01:09:02    阅读次数:260
300条   上一页 1 ... 9 10 11 12 13 ... 30 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!