题意:在 [a, b] 取一个整数 x,在 [c, d] 取一个整数 y,求满足 (x + y) % p = m 的 (x, y) 的对数(0
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4790
——>>2013年成都区赛最后一题,当时TLE6次无果。。。。加上 B 的无限WA,铁铁地铁了。。
。。。。。。。
设 f(a, b) 表示...
分类:
其他好文 时间:
2014-11-05 17:16:49
阅读次数:
189
push是定义的一个button push.layer.masksToBounds = YES; push.layer.cornerRadius = 100; push.layer.borderWidth = 10; push.layer.borderColor = [[UIColor b...
分类:
移动开发 时间:
2014-11-05 14:28:12
阅读次数:
157
UILabel *titleText = [[UILabel
alloc] initWithFrame: CGRectMake(kWidth/2 -60,
0, 120,
50)];
titleText.backgroundColor = [UIColor
clearColor];
titleText.textAlignment =
NSTextAlignmentCe...
分类:
其他好文 时间:
2014-11-05 13:10:39
阅读次数:
137
UIView *backView = [[UIView
alloc] initWithFrame:CGRectMake(0,
0, _searchBar.size.width,
_searchBar.size.height)];
[backView setBackgroundColor:[UIColor
colorWithRed:248/255.0
green:248/25...
分类:
其他好文 时间:
2014-11-05 13:10:04
阅读次数:
165
产生0-9之间的10个随机数,并且10个随机数不能重复;var arr = [0,1,2,3,4,5,6,7,8,9];//定个数组;for(j=0;j<=9;j++){ varc = arr[Math.floor(Math.random() * arr.length)];//产生的随机数; arr...
分类:
编程语言 时间:
2014-11-05 10:47:54
阅读次数:
226
#import @interface UIImage (ImageWithColor)+ (UIImage *)imageWithColor:(UIColor *)color;@end#import "UIImage+ImageWithColor.h"@implementation UIImage ...
分类:
移动开发 时间:
2014-11-04 19:22:43
阅读次数:
726
在Java中我们能够使用java.util.Random类来产生一个随机数发生器。它有两种形式的构造函数,各自是Random()和Random(long seed)。Random...
分类:
编程语言 时间:
2014-11-04 14:34:32
阅读次数:
232
/**
* Definition for singly-linked list with a random pointer.
* struct RandomListNode {
* int label;
* RandomListNode *next, *random;
* RandomListNode(int x) : label(x), next(NULL), ...
分类:
其他好文 时间:
2014-11-04 11:11:48
阅读次数:
216
1. 实现UITextView的代理方法
text.view.delegate = self;
2. 在UITextView上覆盖UILabel
ps:必须实现
label.enabled = NO;
label.backgroundColor = [UIColor
clearColor];
3. 在UITextView - Delegate中实现
-(void)textVie...
分类:
其他好文 时间:
2014-11-04 11:07:23
阅读次数:
204
1.随机获取网页16进制颜色值1 color ="#"+("00000"+((Math.random()*16777215+0.5)>>0).toString(16)).slice(-6);2.有待添加
分类:
其他好文 时间:
2014-11-04 10:52:03
阅读次数:
153