http://poj.org/problem?id=2891 解线性模方程组。 比较坑爹,数据比较大,很容易溢出。 1 Program poj2891; 2 3 var m:int64; 4 5 a,r:array[1..30000000]of int64; 6 7 ans,x,y,lcm:int6
分类:
其他好文 时间:
2016-03-02 21:43:25
阅读次数:
149
IOS手机截屏主要步骤1.创建一个图形上下文2.将屏幕绘制到其中3.保存图片到相册4.关闭图形上下文IOS手机截屏具体实现-(IBAction)truncation:(UIButton*)sender{//延迟2秒之后再截屏dispatch_after(dispatch_time(DISPATCH_TIME_NOW,(int64_t)(2.0*NSEC_PER_SEC)),dispatch_get_m..
分类:
移动开发 时间:
2016-02-26 19:02:55
阅读次数:
203
欧几里德算法又称辗转相除法,用于计算两个整数a,b的最大公约数。 基本算法:设a=qb+r。当中a,b。q,r都是整数。则gcd(a,b)=gcd(b,r)。即gcd(a,b)=gcd(b,a%b)。 递归代码: __int64 gcd(__int64 a,__int64 b) { return b
分类:
其他好文 时间:
2016-02-21 22:45:30
阅读次数:
249
综合性很强的一道题目,结合manacher,后缀数组,哈希,RMQ,二分可解。基本思路是通过manacher可以找到所有可能的回文串,哈希去重,后缀数组二分找数目。最后暴力求解。需要注意kth需要为__int64。 1 /* 4426 */ 2 #include <iostream> 3 #incl
分类:
其他好文 时间:
2016-02-05 01:49:59
阅读次数:
177
1.__int64找不到符号 采用int64_t来代替: #if defined(__ANDROID__) typedef int64_t __int64; #endif 2.<sys/io.h>找不到 android下不需要直接引用该文件,用下面的宏去掉即可 #if !defined(__APPL
分类:
移动开发 时间:
2016-02-02 14:55:44
阅读次数:
132
翻译找到在二维平面中两个相交矩形的总面积。每个矩形都定义了其左下角和右上角的坐标。(矩形如下图)假设,总占地面积永远不会超过int的最大值。原文分析这题前天试过,写了一堆判断,终究还是无果……贴几个别人的解决方案……int computeArea(int A, int B, int C, int D, int E, int F, int G, int H)
{
int64_t xmin1 =...
分类:
其他好文 时间:
2016-01-27 13:07:10
阅读次数:
148
1 - (IBAction)captureView:(UIButton *)sender { 2 3 // 延迟1 ~2 秒之后再截屏 4 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NS...
分类:
移动开发 时间:
2016-01-23 18:00:14
阅读次数:
162
1、输出double类型时,如果采用G++提交,scanf采用%lf,prinf采用%f,否则会报错2、使用GCC/G++的提醒:对于64位整数, long long int 和 __int64 都是支持并且等价的.但是在读和写的时候只支持scanf("%I64d", ...)和printf("%I...
分类:
编程语言 时间:
2016-01-20 12:51:12
阅读次数:
145
Int64:表示有符号 64 位整数,表示值介于 -2^63 ( -9,223,372,036,854,775,808) 到2^63-1(+9,223,372,036,854,775,807 )之间的整数。相当于C++的long long,C#中long,SQL Server的bigint
分类:
数据库 时间:
2016-01-20 11:08:53
阅读次数:
173
简单题。#include#include#include#include#include#include#include#define INF 99999999#define ll __int64#define lson l,m,rt= p){ updata(p,v,lson); ...
分类:
其他好文 时间:
2016-01-15 22:57:52
阅读次数:
245