= $min) ? true : false;break;case 2: //只匹配最大值return ($max >= $len) ? true : false;break;default: //min = 1000 && $timeArr[0] = 0 && $dateArr[1] = 0 &&...
分类:
Web程序 时间:
2014-07-19 17:07:29
阅读次数:
286
点显示进度条后→ android:max="100" 进度条的最大值 android:progress 进度条已经完成的进度值 android:progressDrawable 已经完成的进度条轨道显示的Drawable对象in...
分类:
其他好文 时间:
2014-07-19 15:23:13
阅读次数:
393
class Solution {public: int maxSubArray(int A[], int n) { int cur_sum = 0; int max_sum = INT_MIN; for (int i=0; i max_...
分类:
其他好文 时间:
2014-07-19 15:18:15
阅读次数:
160
HDU1754 1 #include 2 3 using namespace std; 4 5 const int MaxSIZE = 2e6 + 10; 6 7 typedef struct { 8 int Max ; 9 int left, right ...
分类:
其他好文 时间:
2014-07-19 09:14:48
阅读次数:
250
#include
#include
#define MAX 200020
char s[MAX],ss[MAX*2],str[2];
int p[MAX*2];
int chance(char s)
{
return (s- str[0] + 26) % 26 + 'a';
}
int min(int a,int b){return a>b?b:a;}
int main()
{
...
分类:
其他好文 时间:
2014-07-19 02:31:05
阅读次数:
201
接触动态规划的第一题是数塔问题,第二题就是01背包问题了。当时看的懵懵懂懂,回过头来再看这道题还是非常简单的了。用 dp[i][j] 表示取前i种物品,使它们总体积不超过j的最优取法取得的价值总和状态转移方程:dp[i][j] = max(dp[i-1][j],dp[i-1][j-cost[i]]+...
分类:
其他好文 时间:
2014-07-18 19:00:42
阅读次数:
266
binarySearch原理: public static index halfSearch(List list, String key) { int max,min,mid; max = list.size()-1; min = 0; while(min>1; String str = list....
分类:
其他好文 时间:
2014-07-18 18:32:20
阅读次数:
238
progress标签:从名字上来看,估计大家也能猜到这个标签是什么标签了,没错,他是一个进度条。在HTML5中我们终于可以不用模拟了。复制代码progress属性:value:表示当前进度max:表示总进度注:value和max属性的值必须大于0,value的值小于或等于max属性的值。案例: .....
分类:
Web程序 时间:
2014-07-18 14:28:53
阅读次数:
204
题意:
一个充满0和1的矩形 最多将k个数字翻转 问 最少翻转几个数字可以使所有0或1的连通块都是矩形 如果不可能输出-1
思路:
首先 如果确定了一行 那么整个矩形就确定了
因为在最后的状态中 每一行要么与确定的行完全一致 要么完全相反 这才能保证连通块都是矩形
然后 本题k很小 因此可以分类讨论
如果 max(n,m)k 那么至少有一行或者一列是没有被修改的 那么可以枚举...
分类:
其他好文 时间:
2014-07-18 12:25:56
阅读次数:
189
1. 用数组元素作函数实参 1 #include 2 using namespace std; 3 4 int max_value(int x, int max) 5 { 6 return max > x ? max : x; 7 } 8 9 int main()10 {11 ...
分类:
编程语言 时间:
2014-07-18 12:24:41
阅读次数:
241