#include #include using namespace std;class Complex //复数类{public:double real;//实数double imag;//虚数Complex(double real=0,double imag=0){ this->real=rea....
分类:
编程语言 时间:
2014-07-07 00:57:44
阅读次数:
273
1 #include 2 #include 3 using namespace std; 4 int main(){ 5 string s; 6 int i,sum; 7 getline(cin,s); 8 for(i=0;i='0')10 ...
分类:
其他好文 时间:
2014-07-06 23:41:23
阅读次数:
279
1 #include 2 using namespace std; 3 int main(){ 4 int a,n,g,i=1; 5 cin>>a>>n; 6 while(cin>>g){ 7 if(i>n||ga)13 co...
分类:
其他好文 时间:
2014-07-06 23:39:23
阅读次数:
243
1 #include 2 #include 3 using namespace std; 4 int main(){ 5 int a[10][10]; 6 int i,j,n; 7 cin>>n; 8 for(i=0;i<n;++i){ 9 a[i]...
分类:
其他好文 时间:
2014-07-05 20:29:22
阅读次数:
199
1 #include 2 using namespace std; 3 int main(){ 4 int i,j,k=0,l,a[20],b[20],c[40],m,n; 5 cin>>m; 6 for(i=0;i>a[i]; 8 cin>>n; 9 fo...
分类:
其他好文 时间:
2014-07-05 20:19:27
阅读次数:
164
题目链接:点击打开链接
题意:
给定3个字符串,进行拼接
重复的一段可以覆盖,问拼接后最小的长度(若一个串s1是s2的子串,则s1可以认为嵌入了s2内,不需要进行拼接
思路:
kmp搞一下。
#include
#include
#include
#include
#include
#include
using namespace std;
#define N 300005
...
分类:
其他好文 时间:
2014-07-03 18:34:24
阅读次数:
215
题目大意:
求在m个串中同时出现两次以上且不覆盖的子串的长度。
思路分析:
二分答案,然后check是否满足,判断不覆盖的方法就是用up down 来处理边界。
#include
#include
#include
#include
#include
#include
#define maxn 110005
using namespace std;
char ...
分类:
其他好文 时间:
2014-07-03 16:55:30
阅读次数:
350
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define inf 0x3f3f3f3f
#define eps 1e-6
#define ll __int64
using namespace std;
#define N 10010
#define M 1000...
分类:
其他好文 时间:
2014-07-03 16:22:19
阅读次数:
224
Iwanttostudyitallthetime,andnowIamreadytostudythisbookinthenextmouth.Time:2014/07/02先看一个程序体验一下:#include<iostream>
intmain()
{
/*Thisisatestexample*/
std::cout<<"Entertwonumbers:"<<std::endl;
intv1,v2;
std::cin>>v1>>v..
分类:
编程语言 时间:
2014-07-03 15:24:04
阅读次数:
221
题目链接:点击打开链接
#include
#include
#include
#include
#include
#include
using namespace std;
#define N 105
int n,m,a,b,c;
char s[N][N];
setmyset;
bool inmap(int x,int y){return 0<=x&&x<n&&0<=y&&y<m;}...
分类:
其他好文 时间:
2014-07-03 13:48:14
阅读次数:
150