// AllPointFunc1.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include using namespace std; //指针函数 int *func1(int i) { return &i; } //和func1相同 int* fun...
分类:
其他好文 时间:
2015-11-06 12:47:22
阅读次数:
195
QuestionDivide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.Solutiondividend = divisor * quo...
分类:
其他好文 时间:
2015-11-06 07:07:56
阅读次数:
186
题意:给n个数字串,求它们的所有不包含前导0的不同子串的值之和思路:把数字串拼接在一起,构造SAM,然后以每个状态的长度len作为特征值从小到大排序,从前往后处理每个状态,相当于按拓扑序在图上合并计算答案。#include using namespace std;#define X first#de...
分类:
编程语言 时间:
2015-11-06 07:04:13
阅读次数:
227
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApplication14{ clas...
分类:
编程语言 时间:
2015-11-06 01:34:56
阅读次数:
225
Using Redis to store php session默认情况下,php将会将session信息存储在文件系统上,在单机情况下没有问题,但是当系统负载增大,或者在对系统可用性要求很高的场景下,当台机器不仅处理能力跟不上,而且当机器故障时整个系统就处于不可用状态了。所以多机器负载均衡就非常有...
分类:
Web程序 时间:
2015-11-06 00:19:30
阅读次数:
228
using System;using System.Text;using System.IO; namespace HelloCsharp.Utilities{ /// /// 文件操作类 /// public static class DirFile { ...
分类:
其他好文 时间:
2015-11-06 00:04:20
阅读次数:
187
最裸的迪杰斯特拉这是以后用来安利学弟学妹的这题要求最长边,所以我们sort之后用ans保留最长边,然后初始化就好了以下是我手写迪杰斯特拉 1 #include 2 #include 3 using namespace std; 4 struct shit{ 5 int in; 6 i...
分类:
其他好文 时间:
2015-11-05 22:21:39
阅读次数:
291
给你足够多的1,2,5面值的钱币,输入一个钱数n,设计一个程序使能够计算出所有的组合! 1 #include 2 using namespace std; 3 int main() 4 { 5 int N; 6 cin>>N; 7 int a=N/5,b=N/2; 8 ...
分类:
其他好文 时间:
2015-11-05 22:13:57
阅读次数:
132
std::tuple不支持输入输出,就想实现一下。最初想用模板函数实现,无奈总是不行,就改用模板类了,下面是实现代码。 1 #include 2 #include 3 using namespace std; 4 5 template 6 struct print_imp 7 { 8 ...
分类:
其他好文 时间:
2015-11-05 22:03:37
阅读次数:
166
1 using UnityEngine; 2 using System.Collections; 3 4 public class Bird : MonoBehaviour { 5 6 public float timer = 0; 7 public int freamNumb...
分类:
其他好文 时间:
2015-11-05 20:48:53
阅读次数:
166