组合数时间限制:3000ms | 内存限制:65535KB难度:3描述找出从自然数1、2、... 、n(0#includeint a[20],b[20];int n,m;void dfs(int cur,int pos){ int i; if(pos==m+1) { for(i=1;in) ret....
分类:
其他好文 时间:
2015-08-06 21:45:16
阅读次数:
125
分层遍历二叉树的集中情况 ? 从上而下的打印 vector<vector<int>>?printLevel(TreeNode?*root)
{
????
????vector<vector<int>>??ret;
????if(root?==?NULL)?return?ret;
????
????...
分类:
编程语言 时间:
2015-08-06 17:04:41
阅读次数:
244
1. 安装IPypip3 install IPy2. 写脚本:yuyue@workplace:~ $ cat combine_ip.pyfrom IPy import IPSet, IPimport sysdef handler(file_name): ret = IPSet() for...
分类:
其他好文 时间:
2015-08-06 01:49:08
阅读次数:
820
#define ret_ok 1
#define ret_err 1
int judge_score(int score,char *ch)
{
if(score > 100 || score
{
printf("The score you input should little than 100 and bigger than 0\n");
return ret_err...
分类:
其他好文 时间:
2015-08-06 00:37:32
阅读次数:
210
#include#include#include#include#includeusing namespace std;int n,c;int a[100000+100];int solve(int m){ int ret=1; int i,j,k; int l=0,r; f...
分类:
其他好文 时间:
2015-08-06 00:07:26
阅读次数:
160
跨域待测
<?php
$ret?=?array(
????‘name‘?=>?isset($_POST[‘name‘])??$_POST[‘name‘]?:?‘‘,
????‘gender‘?=>?isset($_POST[‘gender‘])??$_POST[‘gender‘]?:?‘‘
);
header(‘content-type:a...
分类:
Web程序 时间:
2015-08-05 20:33:55
阅读次数:
142
编写一个函数,将一个数字字符串转换成这个字符串对应的数字(包括正浮点数、负浮点数)
例如:“12.34“
返回12.34“ - 123.34“ 返回 - 123.34函数原型:double my_atof(char *str)
#include
#include
#include
double my_atof(char *str)
{
double ret = 0.0;
int ...
分类:
其他好文 时间:
2015-08-05 10:36:50
阅读次数:
127
通道题意:根据那个递推式,找找规律即可。代码:#include #include #include #include #include using namespace std;typedef long long ll;inline bool rd(int &ret) { char c; int...
分类:
其他好文 时间:
2015-08-05 00:47:11
阅读次数:
281
for(var i=0; i<ret.result.length; i++) { var f_time = getLocaleTimeByUnixTime(ret.result[i].receivedTime); var f_time_st...
分类:
移动开发 时间:
2015-08-03 18:46:53
阅读次数:
126
【腾讯2015春招web前端开发练习卷】请给Array本地对象增加一个原型方法,它用于删除数组条目中重复的条目(可能有多个),返回值是一个包含被删除的重复条目的新数组。 1 Array.prototype.distinct = function() { 2 var ret = []; 3 ...
分类:
编程语言 时间:
2015-08-02 16:42:51
阅读次数:
124