//暴力,从每一行的开始处开始寻找要查询的字符#include#include#include#includeusing namespace std;char str[100005];int main(){ while(gets(str)){ for(int i=0; str[i...
分类:
其他好文 时间:
2014-09-16 00:12:29
阅读次数:
339
简单字符串处理。 1 #include 2 #include 3 #include 4 #include 5 6 #define MAXN 25 7 char str[MAXN]; 8 int ten[15]; 9 10 int gcd(int m, int n) {11 if (...
分类:
其他好文 时间:
2014-09-15 22:49:59
阅读次数:
259
无向图求欧拉回路:
1、图连通
2、所有顶点的度数位偶数
随便从一个点开始递归遍历即可求出路径
#include
#include
#include
using namespace std;
const int maxcolor = 50;
int n, G[maxcolor+1][maxcolor+1], deg[maxcolor+1];
str...
分类:
其他好文 时间:
2014-09-15 21:24:29
阅读次数:
229
python int是python把任何类型转换成int类型的方法,但是你如果运用不好的话,会引发异常,但是python的str字符串转换方法运用起来倒是比较安全,它把任何对象转换成字符串类型都不会报异常。现给个python int的例子:比如a = '123' b = int(a) print b...
分类:
编程语言 时间:
2014-09-15 19:12:19
阅读次数:
235
1 #include "string" 2 typedef std::basic_string tstring; 3 int _tmain(int argc, _TCHAR* argv[]) 4 { 5 6 tstring str= _T("没2有60最脑40残只有100更脑残!...
分类:
其他好文 时间:
2014-09-15 19:11:49
阅读次数:
154
1、http://blog.csdn.net/szchtx/article/details/10396149 char ss[]="C++"; ss[0]='c'; // 合法 char *p="C++"; p[0]='c'; // 合法但不正确 该段代码在VS2010下编译可以通过,但是运...
分类:
其他好文 时间:
2014-09-15 17:10:39
阅读次数:
194
1. 要不要学习汇编可以只懂一点,工作中基本不用,一旦用就是出了大问题ldr : load 读内存ldr r0, [r1]: r1里存放的是地址值, 去这个地址读取4字节的内容,存入r0str : stroe 写内存str r0, [r1]: r1里存放的是地址值, 把r0里的4字节数据存入这个地址...
分类:
其他好文 时间:
2014-09-15 14:16:18
阅读次数:
189
Oracle中如何使用转义字符:SeparChchar :=chr(1);NVL( string1, replace_with):功能:如果string1为NULL,则NVL函数返回replace_with的值,否则返回string1的值,如果两个参数都为NULL ,则返回NULL。注意事项:str...
分类:
其他好文 时间:
2014-09-15 12:42:38
阅读次数:
240
#include<stdio.h>
#include<stdlib.h>
typedefenumBOOL//C语言中不含有BOOL类型的数据,需要自己定义,C++中含有!
{
FALSE,
TRUE
}BOOL;
intgetWorldNumber(constchar*str)
{
intcount=0;
BOOLflag=TRUE;
while(*str!=‘\0‘)
{
if((*str>=‘A‘&&*str&..
分类:
其他好文 时间:
2014-09-15 11:25:19
阅读次数:
141
1.函数
public static bool IsFloat(string str)
{
string regextext = @"^(-?\d+)(\.\d+)?$";
Regex regex = new Regex(regextext, RegexOptions.None);
retur...
分类:
其他好文 时间:
2014-09-15 02:13:48
阅读次数:
197