MSDN中是这么介绍字段和属性的:A field is a variable of any type that is declared directly in a class or struct.字段:“字段”是直接在类或结构中声明的任何类型的变量。A property is a member th...
分类:
其他好文 时间:
2014-07-24 04:58:08
阅读次数:
290
一 MFC的消息映射机制(3) 1 消息映射机制的使用 1.1 自己的类必须派生自 CCmdTarget 1.2 自己的类内 必须添加声明宏 DECLARE_MESSAGE_MAP 1.3 自己的类外 必须添加实现宏 BEGIN_MESSAGE_MAP( th...
分类:
其他好文 时间:
2014-07-24 00:52:47
阅读次数:
375
题目链接:http://poj.org/problem?id=3292
题目大意:就是给你一个模4余1的数H-number,如果一个H-number是H-primes 当且仅当它的因子只有1和它本身(除1外)。一个H-number是H-semi-prime当且仅当它只由两个H-primes的乘积表示。H-number剩下其他的数均为H-composite。给你一个数h,问1到h有多少个H-sem...
分类:
其他好文 时间:
2014-07-23 22:38:17
阅读次数:
302
Dudu is a very starving possum. He currently stands in the first shelf of a fridge. This fridge iscomposed of N shelves, and each shelf has a number Q...
分类:
其他好文 时间:
2014-07-23 22:23:57
阅读次数:
300
题目描述,例如13195的质因子有5,7,13,29,其中29是最大质因子,现在给你一个数600,851,475,143,,让你求它的最大质因子。这个数记为number,在2-sqrt(number)内先找出质因子然后让number除这些比较小的质因子不断的变小最后剩下的number%i==0的nu...
分类:
其他好文 时间:
2014-07-23 22:10:47
阅读次数:
153
今天温习树状数组,果然忘记了好多,树状数组求逆序数,值得注意这道题所有的数都是0-n-1的,所以在求最小的时候不用每个数顺序在计算一遍,我已开始就是把每个顺序又计算了一遍,果断超时了。第i个数拿到后面去,逆序数会减少a[i]-1,同时会增加n-a[i]
#include
#include
using namespace std;
int a[5005],tree[5005],n;
int low...
分类:
其他好文 时间:
2014-07-23 21:00:35
阅读次数:
186
Maximum Sum
大意:给你一个n*n的矩阵,求最大的子矩阵的和是多少。
思路:最开始我想的是预处理矩阵,遍历子矩阵的端点,发现复杂度是O(n^4),就不知道该怎么办了。问了一下,是压缩矩阵,转换成最大字段和的问题。
压缩行或者列都是可以的。
int n, m, x, y, T, t;
int Map[1010][1010];
int m...
分类:
其他好文 时间:
2014-07-23 20:54:55
阅读次数:
324
题目大意:
要找出1到n之间有多少个数含13,并且能被13整除
记忆化搜索:
dp[pos][pre][mod][statu],pos位数,pre前一位,mod余数,statu状态
有2个状态:含13,不含13
#include
#include
#include
#include
#include
#include
#include
#include
#include
#inc...
分类:
其他好文 时间:
2014-07-23 18:08:05
阅读次数:
193
Big Number
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 4594 Accepted Submission(s): 3175
Problem Description
As we know, Big...
分类:
其他好文 时间:
2014-07-23 17:17:01
阅读次数:
334
※效果
※使用说明
Java代码
import android.app.Activity;
import android.os.Bundle;
import android.widget.Toast;
public class TestRolateAnimActivity extends Activity {
/** Called when th...
分类:
移动开发 时间:
2014-07-23 17:10:01
阅读次数:
272