简单大数模拟题;#includeusing namespace std;typedef long long ll;string Num;vector Big;ll MOD(vector Big, ll m){ ll ret = 0; for(int i = 0; i > Num >> n...
分类:
其他好文 时间:
2015-10-28 22:33:37
阅读次数:
178
1、count#include<stdio.h>
intmy_strlen(char*str)
{
intcount=0;
while(*str!=‘\0‘)
{
count++;
}
returncount;
}
intmain()
{
char*str="helloworld";
intret=my_strlen(str);
printf("len=%d\n",ret);
return0;
}2、递归#include<stdio.h>
intmy_st..
分类:
其他好文 时间:
2015-10-28 15:46:24
阅读次数:
141
A simple application to binary tree traversal.class Solution { typedef pair Rec; // last val - length unsigned ret; void go(TreeNode *p, Rec ...
分类:
其他好文 时间:
2015-10-28 12:09:31
阅读次数:
140
Based on Bucketing and "Majority Number I".class Solution { pair majorityNumber0(vector &num) { int count = 0; int ret = 0; fo...
分类:
其他好文 时间:
2015-10-28 07:03:29
阅读次数:
151
1、基本操作capture = cv2.VideoCapture(0)ret, image = capture.read()cv2.imwrite("photo.jpg", image)capture.release()2、相机属性设置(读、写)set:cv2.VideoCapture.set(pr...
分类:
其他好文 时间:
2015-10-27 15:15:04
阅读次数:
350
#include<stdio.h>
intmy_atoi(chars[])/*字符串转换函数*/
{
char*p=s;
intflag=1;
intret=0;
if(*p==‘-‘)
{
flag=-1;
}
if((*p==‘+‘)||(*p==‘-‘))
{
p++;
}
while(*p!=‘\0‘)
{
if((*p>=‘0‘)&&(*p<=‘9‘))
{
ret=10*ret+*p-‘0‘;
p++;
}
}
returnflag*ret;
..
分类:
编程语言 时间:
2015-10-27 07:09:46
阅读次数:
262
/* * control menu show or hide(expand and collapse) */var status = [];function menuOperation() { $("#menu li ul").on("click",function(){ ret...
分类:
Web程序 时间:
2015-10-26 20:25:11
阅读次数:
178
//第一种方法:
#include<stdio.h>
intmy_strlen(char*str)
{
intret=0;
while(*str)
{
str++;
ret++;
}
returnstr;
}
intmain()
{
char*p="abcdef";
printf("%d\n",my_strlen(p));
return0;
}
第二种方法:
#include<stdio.h>
intmy_strlen(char*str)
{
char*left..
分类:
其他好文 时间:
2015-10-26 19:02:31
阅读次数:
113
6.1.2 参数 当函数接受参数时,就必须指定下述内容: 函数在其定义中指定要接受的参数列表,以及这些参数的类型。 在每个函数调用中匹配的参数列表。 这涉及到下述代码: static ( , ...) { ... ret...
抓取网页数据后 数据录入到discuz中load($lines_string); $ret = $dom->find(".dataList ul",1)->innertext; //数据分析 // print_r($ret); return $ret;}$ret = urlText...
分类:
Web程序 时间:
2015-10-25 19:14:44
阅读次数:
240