题意 问题描述 万能的红太阳J 君正在研究量子信息的纠缠。 具体来说,J 君有一个初始为空的信息集。她会进行m 次操作,有时,她会向信息集内加入一个长度不超过L 的的数字串(一个数字串为一个仅由0 到9 组成的非空字符串),有时她会给出一个数字串,询问这个数字串是否包含在她的信息集中,有时她会选取两 ...
分类:
其他好文 时间:
2018-09-21 23:01:02
阅读次数:
240
前言 由于JUnit的Assert是公认的烂API,所以不推荐使用,目前推荐使用的是AssertJ。 AssertJ网站: http://joel-costigliola.github.io/assertj/ github上examples 地址 https://github.com/joel-co ...
分类:
其他好文 时间:
2018-09-21 16:54:56
阅读次数:
386
1、strcpy函数的实现 编写 strcpy 函数 已知 strcpy 函数的原型是 Char *strcpy(char *strDest,const char *strSrc); 其中 strDest 是目的字符串, strSrc 是源字符串。 (1) 不调用 c++ 、 /c 的字符串库函数, ...
分类:
其他好文 时间:
2018-09-19 22:38:59
阅读次数:
184
#include <iostream> using namespace std; #include <assert.h> void* myMemcpy(void* dst, const void* src, size_t count); int main(void) { int test[4] = ...
分类:
其他好文 时间:
2018-09-16 17:38:49
阅读次数:
180
Assert:失败时,该测试将终止 Verify:失败时,该测试继续执行,并将错误日志记录在日显示屏 Waitfor:等待某些条件变为真,一般使用在AJAX应用程序的测试 断言常用的有,具体见如下:assertLocation:判断当前是在正确的页面assertTitle:检查当前页面的title是 ...
分类:
其他好文 时间:
2018-09-16 12:32:38
阅读次数:
182
#include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <set> #include <cassert> using ...
分类:
其他好文 时间:
2018-09-15 22:01:38
阅读次数:
267
#ifndef RedBlack_hpp #define RedBlack_hpp /* 由红黑两色节点组成的二叉搜索树若满足以下条件,即为"红黑树(red-black tree)" (1)树根始终为黑色 (2)外部节点均为黑色 (3)其余节点若为红色,则其孩子节点必为黑色 (4)从任一外部节点到根... ...
分类:
其他好文 时间:
2018-09-10 17:59:07
阅读次数:
129
重写基础函数 1. 字符串拷:strcpy() 函数strcpy的原型是char* strcpy(char* des , const char* src),des 和 src 所指内存区域不可以重叠且 des 必须有足够的空间来容纳 src 的字符串。 1) 最后拷贝了结束符’\0’; 2)源指针应 ...
分类:
其他好文 时间:
2018-09-09 14:58:50
阅读次数:
138
# -*- coding: utf-8 -*-""" File Name: printsquare Description : Author : Administrator date: 2018/9/8 0008 """def print_square(n): """ 5(-2,-1,0,1,2)- ...
分类:
其他好文 时间:
2018-09-08 23:29:29
阅读次数:
155
1 #include 2 #include 3 void multiply(const char *a,const char *b) 4 { 5 assert(a!=NULL && b!=NULL); 6 int i,j,ca,cb,*s; 7 ca=strlen(a); 8 cb=strlen(b... ...
分类:
其他好文 时间:
2018-09-08 22:33:00
阅读次数:
138