简单DP题。可以用运算符重载来写,简单一些。#include #include #include #include using namespace std;class STRS{public: char str[100]; void operator=(STRS b){ strcpy(str,b.....
分类:
其他好文 时间:
2014-08-23 12:31:20
阅读次数:
235
MFC编码时报错:
显示:error C2248: “CObject::operator =”: 无法访问 private 成员(在“CObject”类中声明)
这种问题是你刚开始声明的是指针类型变量,后来又改为了非指针型,最好直接改为指针型变量。...
分类:
其他好文 时间:
2014-08-23 10:02:00
阅读次数:
156
Precedence
Operator
Description
Example
Associativity
1
()
[]
->
.
::
++
--
Grouping operator
Array access
Member access from a pointer
Member access from an object
Scoping operat...
分类:
编程语言 时间:
2014-08-22 17:50:09
阅读次数:
279
1,创建测试数据库,表;2,数据库连接对象函数sqlite3是数据库连接对象(database connection object),用来操作数据库(operator DBs);打开数据库对象函数(open db object function),int sqlite3_open(const cha...
分类:
数据库 时间:
2014-08-22 00:13:05
阅读次数:
395
仿函数是行为类似函数的类或结构体,类或结构体重载了operator(),它比函数指针更加灵活易用。...
分类:
其他好文 时间:
2014-08-19 16:43:15
阅读次数:
245
这是 thread 的construct定义:default (1)thread() noexcept;initialization (2)template explicit thread (Fn&& fn, Args&&... args);copy [deleted] (3)thread (con...
分类:
编程语言 时间:
2014-08-19 16:23:34
阅读次数:
304
以下标程均为十进制,如改为10n进制可提高n倍速度。建议不要使用operator对运算符进行重载,虽然用起来很方便,但是NOIP中不一定能用,速度也会慢一些。高精度数大小比较function a_dy_b(a,b:arr):boolean;var i:integer;begin i:=a[0]; ....
分类:
其他好文 时间:
2014-08-17 22:31:02
阅读次数:
401
解题报告
题意:
又是求面积并
思路:
又是求面积并,还被坑了,题目明明描述的是int坐标,用了double才过。。。
#include
#include
#include
#include
using namespace std;
struct Seg {
double lx,rx,h;
int v;
friend bool operator <(Seg...
分类:
其他好文 时间:
2014-08-17 13:07:12
阅读次数:
195
解题报告
题意:
矩形面积并。
思路:
扫描线+线段树
#include
#include
#include
#include
using namespace std;
struct Seg
{
int lx,rx,h,v;
friend bool operator < (Seg a,Seg b)
{
return a.h<b.h;
...
分类:
其他好文 时间:
2014-08-16 21:10:01
阅读次数:
241
知识点切片切片 取一个list或tuple的部分元素。 原理:调用__getitem__,__setitem__,__delitem__和slice函数。 根据官方的帮助文档(https://docs.python.org/2/library/operator.html)可知,_getitem_返回...
分类:
编程语言 时间:
2014-08-16 18:30:10
阅读次数:
327