easy 个屁啊,一点都不easy,题目就是要求公式的值,但是要求公式在最后的取模前的值向上取整,再取模,无脑的先试了快速幂 double fmod来做,结果发现是有问题的,这题要做肯定得凑整数,凑整 题目给 a+√b 那么加上a-√b就可以了,可是这样加上后面怎么处理还得减去,想了半年也想不出来,
原来用了负数的共轭思想,还有就是题目给的b的范围 是 ((a-1)*(a-1),a*a),所...
分类:
其他好文 时间:
2014-07-11 00:27:45
阅读次数:
204
Spring使用AnnotationMethodHandlerAdapter的handleResponseBody方法, AnnotationMethodHandlerAdapter使用request
header中"Accept"的值和messageConverter支持的MediaType进行匹配,然后会用"Accept"的第一个值写入 response的"Content-Type"。一般...
分类:
编程语言 时间:
2014-07-11 00:17:02
阅读次数:
724
/**
* 功能:使用标准库:文本查询程序
* 时间:2014年7月10日09:10:15
* 作者:cutter_point
*/
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
using line_no=vector::size_type;
/**...
分类:
编程语言 时间:
2014-07-11 00:16:17
阅读次数:
305
Description
Let us consider a special type of a binary search tree, called a cartesian tree. Recall that a binary search tree is a rooted ordered binary tree, such that for its every node x the fol...
分类:
其他好文 时间:
2014-07-11 00:12:52
阅读次数:
379
函数的原型如下所示:
HRESULT DrawIndexedPrimitive(
[in] D3DPRIMITIVETYPE Type,
[in] INT BaseVertexIndex,
[in] UINT MinIndex,
[in] UINT NumVertices,
[in] UINT StartIndex,
[in] UINT PrimitiveCount
);...
参考材料:C++ primer 5th, 4.11
起因是UNIX中一些函数返回void *指针,使用之前要转换成char *指针使用,不清楚会出现什么现象,所以找到type conversion来看
*************************************************************************************
第一部分是i...
分类:
编程语言 时间:
2014-07-10 21:40:11
阅读次数:
217
作用:
禁止当前命令的显示,不受echo的影响
格式
@[command]
demo:
@echo on
@type a.txt
type b.txt
pause
a.txt:
aaaaaaaa
b.txt
bbbbbbbbbb
结果...
本人自己录制的swift菜鸟入门,欢迎大家拍砖,有什么问题可以在这里留言。 主要内容: 存储属性(Stored Properties) 计算属性(Computed Properties) 属性观察器(Property Observers) 全局变量和局部变量(Global and Local Variables) 类型属性(Type Properties) 视频地址: 百度网盘:http://p...
分类:
其他好文 时间:
2014-07-10 20:45:28
阅读次数:
293
The volatile keyword indicates that a field might be modified by multiple threads that are executing at the same time. Fields that are declared volati...
分类:
其他好文 时间:
2014-07-10 15:44:40
阅读次数:
185
最近工程中一个需求就是从本地选择图片设置成用户头像,但是用在onchange事件中得到的路径中包含fakepath。这个问题一直没有找到好的解决办法,无意间发现下面的方法,但是通过打印event.target.result这个变量,发现不是路径,而是一串很长的base64编码,也没弄明白是怎么回事,...
分类:
其他好文 时间:
2014-07-10 15:39:24
阅读次数:
145