题意:多维的曼哈顿最远距离
思路:做了1,2,3维的,其实就是枚举所有绝对值的可能的表达式
#include
#include
#include
#include
using namespace std;
const int MAXN = 100005;
const int M = 5;
const double inf = 1e200;
struct node{
double x...
分类:
其他好文 时间:
2014-05-01 17:31:01
阅读次数:
283
OpenMP是一种应用程序接口(API),支持多平台共享内存的C/C++/Fortran多处理器编程,可以运行在绝大多数处理器架构和操作系统上,包括Solaris, AIX, HP-UX, GNU/Linux, Mac OS X和Windows平台。它由编译器指令集、库函数和环境变量组成,影响运行时行为。...
分类:
移动开发 时间:
2014-04-29 13:44:23
阅读次数:
550
字符串的内部表示?
字符串在java中统一用unicode表示( 即utf-16 LE) ,
对于 String s = "你好哦!";
如果源码文件是GBK编码, 操作系统(windows)默认的环境编码为GBK,那么编译时, JVM将 按照GBK编码将字节数组解析成字符,然后将字符转换为unicode格式的字节数组,作为内部存储。
当打印这个字符串时,JVM...
分类:
编程语言 时间:
2014-04-29 13:41:21
阅读次数:
333
在项目中有时需要验证用户是否以post方式提交。下面是验证源码:
public boolean checkMethod(String method) {
if (request.getMethod().equalsIgnoreCase(method)) {
return true;
}
else {
...
分类:
Web程序 时间:
2014-04-29 13:34:20
阅读次数:
350
参考博客:http://blog.kuoe0.tw/posts/2014/01/31/install-gnu-gcc-on-os-x-and-use-the-header-bits-stdcplusplus-h-and-policy-based-data-structure
做CF看见别人用这个函数,然后就能直接用vector,set,string那些函数了,摸不着头脑,感觉特神奇就百度了一下,...
分类:
编程语言 时间:
2014-04-29 13:32:22
阅读次数:
433
hdu 1047 高精度加法模板(用 string写的)...
分类:
其他好文 时间:
2014-04-29 13:28:21
阅读次数:
236
1、
??
String to Integer (atoi)
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yours...
分类:
其他好文 时间:
2014-04-29 13:22:22
阅读次数:
341
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
思路同十进制的大数相加。代码如下:
class Solution {
public:
string addBinary(string a, str...
分类:
其他好文 时间:
2014-04-29 13:12:20
阅读次数:
328