Problem Description
Given a base b and two non-negative base b integers p and m, compute p mod m and print the result as a base b integer. p mod m is defined as the smallest non-negative integer k ...
分类:
其他好文 时间:
2014-08-16 21:11:11
阅读次数:
169
题目链接:Intersection
判断线段与矩形的关系,与矩形相交打印T,否则打印F;
坑题,精度。。。。
思路就是,先判断 线段是否在矩形里面,再判断线段和两条对角线的关系,利用叉积模板即可
测试数据有个坑,就是 左上角的坐标并不一定比右下角的小。。。这根本不符合题意嘛
#include
#include
#include
#include
#include
#includ...
分类:
其他好文 时间:
2014-08-16 19:49:41
阅读次数:
231
NSString的使用。1、 - (NSUInteger)length; 返回字符串的长度NSString *demo = @"hello world";NSString *demo two=@"good morning";NSLog(@"%ld", [demo length]);输出为 112- ...
分类:
其他好文 时间:
2014-08-16 18:18:50
阅读次数:
263
To The Max
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 8210 Accepted Submission(s): 3991
Problem Description
Given a two-dimensi...
分类:
其他好文 时间:
2014-08-16 17:12:10
阅读次数:
260
to get the ans of how many roads at most that can be built between two line without intersection of roads,we need sort the input sequence at ont edge ...
分类:
其他好文 时间:
2014-08-16 17:01:30
阅读次数:
288
#include #include int zhuanhuan(char str[20]){ if(strcmp(str,"zero")==0) return 0; if(strcmp(str,"one")==0) return 1; if(strcmp(str,"two")==0) ret...
分类:
其他好文 时间:
2014-08-16 16:25:50
阅读次数:
244
Changing Digits
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 2960
Accepted: 952
Description
Given two positive integers n and k, you are asked to genera...
分类:
其他好文 时间:
2014-08-16 15:12:30
阅读次数:
198
The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the sequence of ...
分类:
其他好文 时间:
2014-08-16 12:37:20
阅读次数:
219
Given two sorted integer arrays A and B, merge B into A as one sorted array.
Note:
You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elements fro...
分类:
其他好文 时间:
2014-08-16 11:12:43
阅读次数:
317
1.NSArray 是一个父类,NSMUtableArray是其子类,他们构成了OC的数组。2.NSArray的创建NSArray * array = [[NSArray alloc]initWithObjects:@"one",@"two",@"three",@"four good",nil];/...
分类:
其他好文 时间:
2014-08-16 01:01:09
阅读次数:
209