/*
*字符串的朴素匹配
通过每一个字母对应着主串
进行一次的进行比较,知道
其中的一个串的所有字母都匹配成功
*/
#include
#include
#include
#include
using namespace std;
int index(char *a, char *b)
{
int tarindex = 0;
while(a[tarindex] != '\0'...
分类:
编程语言 时间:
2015-05-03 19:06:06
阅读次数:
158
问题:给定一个十进制的正整数,写下从1开始,到N的所有整数,然后数一下其中出现“1”的个数。课上先试数然后总结规律最后编程。代码: 1 #include 2 using namespace std; 3 4 int main() 5 { 6 int i; 7 int N; 8 ...
分类:
其他好文 时间:
2015-05-03 18:56:57
阅读次数:
88
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication17{ public static class STSD { public st...
分类:
其他好文 时间:
2015-05-03 18:51:38
阅读次数:
76
题意:给出n个点的坐标,(2 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 using namespace std;12 ...
分类:
其他好文 时间:
2015-05-03 18:46:09
阅读次数:
99
问题:去珠宝店抢饰品,给出饰品种数n,能带走的重量m,以及每种饰品的重量w与价值v。求能带走的最大量。思路:常规01背包。 1 #include 2 using namespace std; 3 const int N=100000; 4 int w[N], v[N],dp[N]; 5 6 vo.....
分类:
其他好文 时间:
2015-05-03 18:42:54
阅读次数:
105
新建C#类库,编译。添加引用using Microsoft.SqlServer.Server;方法[SqlFunction]public static int GenerateTxt(){ ......}修改数据库配置---修改配置exec sp_configure 'clr enabled',.....
分类:
数据库 时间:
2015-05-03 18:41:58
阅读次数:
153
分析:线段树的应用,区间修改,使用延迟标记进行延迟修改。
#include
using namespace std;
#define N 100010
class SegmentTree
{
private:
struct Node
{
int left,right; //左右子节点
int sum; //区间和
int lazy; ...
分类:
其他好文 时间:
2015-05-03 16:06:09
阅读次数:
126
题目大意:给定一棵树,每个点是一个齿轮,1号齿轮顺时针旋转,每条边有同向和反向两种连接方式,求n号齿轮的旋转方向
DFS一遍即可#include
#include
#include
#include
#define M 1010
using namespace std;
struct abcd{
int t...
分类:
其他好文 时间:
2015-05-03 16:00:43
阅读次数:
134
最近师兄找我说白猫的操作如何做, 0.0 结果白猫没有android的客户端玩不了,看了下视频介绍就简单做了下 效果图: 核心代码: using UnityEngine;
using System.Collections;
using System.Collections.Generic;
usin...
分类:
编程语言 时间:
2015-05-03 15:53:13
阅读次数:
150
#include using namespace std;class Test1
{
public:
Test1()
{
//赋值
//p=NULL;
// or p=new int; }
//重要
Test1& operator=(const Test1& test1)
{
i...
分类:
编程语言 时间:
2015-05-03 14:39:17
阅读次数:
109