#include
#include
#include
#include
#include
using namespace std;
const int MAXN = 120;
const int INF = INT_MAX;
int G[MAXN][MAXN], N;
int dist[MAXN], Pre[MAXN];
bool visited[MAXN];
int times = 0...
分类:
编程语言 时间:
2015-06-20 09:10:43
阅读次数:
155
#include
using namespace std;
const int N=5*1e4+100;
const int MOD=998244353;
#pragma comment(linker,"/STACK:102400000,102400000")
int n,m,k,tot;
char word[N][27];
typedef long long LL;
struct dictr...
分类:
其他好文 时间:
2015-06-20 00:22:41
阅读次数:
204
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?同Le...
分类:
其他好文 时间:
2015-06-20 00:15:40
阅读次数:
121
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?LL经典题:一个指针每次前进1node,另一个指针每次前进2node,如果有环则必会...
分类:
其他好文 时间:
2015-06-19 23:00:46
阅读次数:
164
首先拷贝构造函数的声明方法:类名::类名(const 类名&)1、浅拷贝的实现程序:#include "stdafx.h"#include #include using namespace std;class Person{public: //构造函数 Person(const char *nam....
分类:
编程语言 时间:
2015-06-19 23:00:21
阅读次数:
213
抽象工厂中,不同的对象通过的不同的输入符号来判断。当要添加新的类时,需要修改工厂类,不利于扩展。工厂模式中,不同的类由不同的工厂创建出来,相互之间不受影响。#ifndef Factory_H_H#define Factory_H_H#include #include using namespace ...
分类:
其他好文 时间:
2015-06-19 21:32:46
阅读次数:
193
把公用的放到基类,把不同的放到子类中实现,实现功能的共享。 1 #ifndef Template_H_H 2 #define Template_H_H 3 4 #include 5 #include 6 using namespace std; 7 8 class Base{ 9 publi...
分类:
其他好文 时间:
2015-06-19 21:29:49
阅读次数:
188
1、错误描述
1 queries executed, 0 success, 1 errors, 0 warnings
查询:show master logs
错误代码: 1381
You are not using binary logging
执行耗时 : 0 sec
传送时间 : 0 sec
总耗时 : 0.002 sec
2、错误原因
#显示二进制日志数目
SH...
分类:
其他好文 时间:
2015-06-19 20:18:32
阅读次数:
121
题意:
裸的高精度取余。
分析:
http://blog.csdn.net/sepnine/article/details/44092055有poj 1220任意进制转换的代码,这题用到其中的一部分,可作对比。
代码:
//poj 2305
//sep9
#include
using namespace std;
int b,m;
char s1[1024],s2[16],ans[16...
分类:
其他好文 时间:
2015-06-19 18:55:26
阅读次数:
144
#include
using namespace std;void InitIt(int b[],int n)
{
int j = n;
int flags = j - 1;
if (flags= 0; flags--)
{...
分类:
编程语言 时间:
2015-06-19 18:49:24
阅读次数:
158