题目题意:给定a, b, x, y; 求使c, d; 使c:d = x :y; 且c 2
#include 3 #include 4 #include 5 using namespace std; 6 7 long long gcd(long
long a, long long b) 8 {...
分类:
其他好文 时间:
2014-05-01 19:30:04
阅读次数:
372
题意:
给定n长的数组(下标从1-n)(n个人的身高,身高各不相同
问:对于第i个人,他能看到的左边最矮的人下标。(如果这个最矮的人被挡住了,则这个值为0)
还有右边最高的人下标,同理若被挡住了则这个值为0
输出n行,每个人左右2边的下标。
单调队列,对于 front - rear 的队列(注意出队都是在rear,入队也是在rear)
当加入元素x,若这队列是单调递增的,显然q.fro...
分类:
其他好文 时间:
2014-05-01 17:21:43
阅读次数:
429
------《两种消息发送》--------------------
SendMessage()---->
ON_MESSAGE(注册的消息)
ON_NOTIFY(注册的消息)
SendPoMessage()--->
ON_PO_MESSAGE(注册的消息)...
分类:
其他好文 时间:
2014-05-01 17:10:55
阅读次数:
486
注意变换思维,然后就是水题。(如果卡时还可以进一步二分优化。)#include long
existed[10000][32];int main(void){ int N;// freopen("poj2443.txt", "r", stdin);
scanf("%d", &N);...
分类:
其他好文 时间:
2014-05-01 09:15:47
阅读次数:
373
首先,让我们看一看Android
Log的格式。下面这段log是以所谓的long格式打印出来的。从前面Logcat的介绍中可以知道,long格式会把时间,标签等作为单独的一行显示。
[ 12-09 21:39:35.510
396: 416 I/ActivityManager ]
Start proc
net.coollet.infzmreader:umengService_v1 for...
分类:
移动开发 时间:
2014-04-30 22:18:39
阅读次数:
523
long long定义方式可以用于gcc/g++,不受平台限制,但不能用于VC6.0。__int64是Win32平台编译器64位长整型的定义方式,不能用于Linux。“%lld”用于Linux i386平台编译器,”%I64d”用于Win32平台编译器。cout只能用于C++编译,在VC6.0中,cout不支持64位长整型。...
分类:
其他好文 时间:
2014-04-29 13:35:21
阅读次数:
309
long switchState = 0xf0000000000L;
int result = (switchState & 0xff00000000L) > 0 ? 0x01 : 0x00;
你觉得result是多少?1
result = (switchState & 0xff000000) > 0 ? 0x01 : 0x00;
你觉得result是多少?1 【还是没有完...
分类:
编程语言 时间:
2014-04-29 13:24:21
阅读次数:
323
链接:http://soj.me/show_problem.php?pid=1007
Description
Mo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns and write the message (letter...
分类:
其他好文 时间:
2014-04-29 13:23:21
阅读次数:
293
Aggressive cows
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 5436
Accepted: 2720
Description
Farmer John has built a new long barn, with N (2 <= N <= 100,...
分类:
其他好文 时间:
2014-04-29 13:22:21
阅读次数:
304
FAILED: Error in metadata: java.lang.RuntimeException: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException org.apache.hadoop.hive.hbase.HBaseSerDe: columns has 3 elements while hbase.columns.mapping has 4 elements (counting the key if implic...
分类:
其他好文 时间:
2014-04-29 13:17:21
阅读次数:
387