码迷,mamicode.com
首页 >  
搜索关键字:int    ( 143001个结果
一个HexToInt的C/C++函数
int BetterVenca25(char* hex){ int res=0; for(;*hex;hex++) { int d=toupper(*hex); if(d >='0' && d ='A' && d <='F')d-='A'-10; else return -1; res=res*16...
分类:编程语言   时间:2014-10-09 14:40:43    阅读次数:231
黑马程序员___Foundation__NSFileManager和NSFileHandle
------Java培训、Android培训、iOS培训、.Net培训、期待与您交流! -------//NSFileManager#import #define PATH @"/Users/fengze/Desktop"int main(int argc, const char * argv[])...
分类:其他好文   时间:2014-10-09 14:18:23    阅读次数:225
Hex string convert to integer with stringstream
#include #include int main() { unsigned int x; std::stringstream ss; ss > x; // output it as a signed type std::cout (x) << std::end...
分类:其他好文   时间:2014-10-09 14:17:23    阅读次数:201
java io流之int数组数据的插入与取出
java io流大家都很熟悉吧,有时候如果用的不熟,对于数据的处理真的很头疼,下面是对与int数组的处理。 下面是代码: public class Stream { private int a[]; private BufferedWriter bufferedWriter; private BufferedReader bufferedReader; priv...
分类:编程语言   时间:2014-10-09 03:36:18    阅读次数:215
Codeforces Round #271 (Div. 2)
A题:因为数据量太小,所以直接暴力替换就好。。。。 #include #include #include #include #include #include using namespace std; typedef long long ll; int arr[100010]; int cnt[100010]; int col[100010]; int n,a,b; char c; ...
分类:其他好文   时间:2014-10-09 02:46:29    阅读次数:232
数据结构第一章——线性表的实现
#include #include #include #define LIST_INIT_SIZE 100 #define LISTINCREMENT 10 #define OVERFLOW -2 #define ERROR 0 #define OK 1 using namespace std; //typedef int Status; typedef struct { int *ele...
分类:其他好文   时间:2014-10-09 02:45:37    阅读次数:220
hdu 2899 hdu 3400 三分/几何
hdu2899 ; 水提,直接三分,其实求导后二分也可以。 #include #include using namespace std; double y; double inline f( long double x) { return 6*x*x*x*x*x*x*x+8*x*x*x*x*x*x+7*x*x*x+5*x*x-y*x; } int main() { in...
分类:其他好文   时间:2014-10-09 01:59:18    阅读次数:217
IplImage 封装释放
IplImage是openCV库中很重要的一个结构体,库中的图像都是保存为这个结构体后再进行操作的,具体结构如下: typedef struct _IplImage { int nSize;                /* IplImage大小 */ int ID;                  /* 版本 (=0)*/ int nChannels;           /...
分类:其他好文   时间:2014-10-09 01:57:37    阅读次数:201
POJ 2823 Sliding Window 单调队列
解题思路: 维护一个递增的单调队列和一个递减的单调队列,基础题。 代码: #include #include #include #include #include #include #include #include #include #include #include #define LL long long #define FOR(i,x,y) for(int i=...
分类:Windows程序   时间:2014-10-09 01:50:07    阅读次数:240
Gas Station [leetcode] 的两种解法
由于gas总量大于cost总量时,一定可以绕所有城市一圈。 第一种解法: 假设一开始有足够的油,从位置i出发,到位置k时剩余的油量为L(i,k)。 对任意的k,L(i,k)根据i的不同,只相差常数。 我们只需要找到最小的L(0, k)对应的k,k+1为所求。 代码如下: int canCompleteCircuit(vector &gas, vector &cost) { ...
分类:其他好文   时间:2014-10-09 01:33:38    阅读次数:175
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!