n个数,找到两个下标i和j(i < j),在1-i中选取若干个数的异或值等于在j-n中选取若干个数的按位与值,两个集合都非空,求满足条件的集合数有多少...
分类:
其他 时间:
2014-08-01 13:50:11
收藏:
0 评论:
0 赞:
0 阅读:
361
#include
#include
typedef struct
{ char *ch;
int length;
}HString;
void StrAssign(HString &T,char *chars);
void StrLength(HString S);
void StrCompare(HString S,HString T);
void ClearString(HString &S...
分类:
其他 时间:
2014-08-01 13:50:01
收藏:
0 评论:
0 赞:
0 阅读:
309
Agri-Net
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 39730
Accepted: 16145
Description
Farmer John has been elected mayor of his town! One of his campaig...
分类:
Web开发 时间:
2014-08-01 13:49:51
收藏:
0 评论:
0 赞:
0 阅读:
330
#include
#include
#define LENGTH 100 //初始分配栈的长度
#define ADD_LEN 10 //栈长增量
typedef struct
{//构造栈的数据类型
int *base;
int *top;
int stacksize;
}SqStack;
void CreateStack(SqStack &S);//初始化一个栈
void PushS...
分类:
其他 时间:
2014-08-01 13:49:41
收藏:
0 评论:
0 赞:
0 阅读:
416
linux下多进程的调试:
(1)follow-fork-mode
set follow-fork-mode [parent | child] ———— fork之后选择调试父进程还是子进程
(parent: fork之后继续调试父进程;child: fork之后调试父进程。默认的是fork之后调试父进程)
set detach...
分类:
系统服务 时间:
2014-08-01 13:49:31
收藏:
0 评论:
0 赞:
0 阅读:
434
UVA 1328 - Period
题目链接
题意:给定一个字符串,求出有几个位置的前缀串是由个数大于1的串循环得到的,求出位置和循环次数
思路:利用kmp的next数组的性质,i - next[i]就是循环长度,然后判断一下是不是正好是倍数即可
代码:
#include
#include
const int N = 1000005;
int n, next[...
分类:
其他 时间:
2014-08-01 13:49:11
收藏:
0 评论:
0 赞:
0 阅读:
224
题意:第一排输入n(货币的种类) m(兑换货币的站点数) t(你现在拥有的货币是第几类货币) v(你现在拥有多少该类货币)
下面每行输入的数:a b 就是a兑换b rab 兑率 cab (手续费) rba 同样的意思 (ab表示a 兑换 b)
问t币的金额经过交换最终得到的t币金额数能否增加
思路:寻找正环 果断bellman_ford算法 寻找最长的路,...
分类:
其他 时间:
2014-08-01 13:49:02
收藏:
0 评论:
0 赞:
0 阅读:
294
outlook关闭时最小化插件...
分类:
其他 时间:
2014-08-01 13:48:51
收藏:
0 评论:
0 赞:
0 阅读:
371
就多个等于号纠结死
先按di排序,(从小到大)。然后依次完成合同,若发现第i个合同无法在截止日期前完成,便从之前已经完成的任务中选一个aj最大的合同,付钱来使得这个合同尽快完成。
#include
#include
#include
#include
#include
using namespace std;
struct node
{
int q;
in...
分类:
其他 时间:
2014-08-01 13:48:41
收藏:
0 评论:
0 赞:
0 阅读:
357
1.3.1 HSB模式的色彩空间模型及其分支
第一次接触HSB模式的原理,是从以下这个地址开始的。
http://zh.wikipedia.org/wiki/HSL%E5%92%8CHSV%E8%89%B2%E5%BD%A9%E7%A9%BA%E9%97%B4
图1.21是我从上面的文章拷过来的一张色彩空间示意图,可见HSB在业界至少还可以...
分类:
其他 时间:
2014-08-01 13:48:31
收藏:
0 评论:
0 赞:
0 阅读:
319
dp、动态规划、01背包...
分类:
其他 时间:
2014-08-01 13:48:21
收藏:
0 评论:
0 赞:
0 阅读:
313
问题描述:
Given two binary trees, write a function to check if they are equal or not.
Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
解题思路:...
分类:
其他 时间:
2014-08-01 13:48:11
收藏:
0 评论:
0 赞:
0 阅读:
279
Suppose that the fourth generation mobile phone base stations in the Tampere area operate as follows....
分类:
其他 时间:
2014-08-01 13:48:01
收藏:
0 评论:
0 赞:
0 阅读:
329
在c#中要扩展一个现有类很容易,比如这样:
?
1
2
3
4
5
6
7
public static class Utils
{
public static void PrintToConsole(this string strSrc)
{
Con...
分类:
其他 时间:
2014-08-01 13:47:51
收藏:
0 评论:
0 赞:
0 阅读:
376
二叉树主要有三种遍历方式:前序遍历、中序遍历和后序遍历,每种方式都有递归和非递归两种方法。递归的方法简单明了,但是会比较耗时,非递归的方法效率相对较高,但是算法也比较晦涩。本文就这三种遍历方式做简单的介绍。...
分类:
其他 时间:
2014-08-01 13:47:41
收藏:
0 评论:
0 赞:
0 阅读:
342
1.基础概念:
(1) 10折交叉验证:英文名是10-fold cross-validation,用来测试算法的准确性。是常用的测试方法。将数据集分成10份。轮流将其中的9份作为训练数据,1分作为测试数据,进行试验。每次试验都会得出相应的正确率(或差错率)。10次的结果的正确率(或差错率)的平均值作为对算法精度的估计,一般还需要进行多次10折交叉验证,在求其平均值,对算法的准确性进行估计。
...
分类:
其他 时间:
2014-08-01 13:47:32
收藏:
0 评论:
0 赞:
0 阅读:
459
详解Ray-Triangle交叉检测算法,并且提供代码示例,供您参考...
分类:
其他 时间:
2014-08-01 13:47:21
收藏:
0 评论:
0 赞:
0 阅读:
509
A data stream is a real-time, continuous, ordered sequence of items. Some examples include sensor data, Internet traffic, financial tickers, on-line auctions, and transaction logs such as Web usage lo...
分类:
其他 时间:
2014-08-01 13:47:14
收藏:
0 评论:
0 赞:
0 阅读:
354
全选
function SelectAll(checked,checkbox_id) {
var checkboxs=document.getElementsByName(checkbox_id);
for (var i=0;i<checkboxs.length;i++) {
var e=checkboxs[i];
e.checked=checked;
}
}
反向选...
分类:
其他 时间:
2014-08-01 13:47:01
收藏:
0 评论:
0 赞:
0 阅读:
222
VS unicode 转化为 Gbk 编码...
分类:
移动平台 时间:
2014-08-01 13:46:51
收藏:
0 评论:
0 赞:
0 阅读:
550