关于@property属性关键字使用注意:*weak(assign):代理\UI控件*strong(retain):其他对象(除代理\UI控件\字符串以外的对象)*copy:字符串*assign:非对象类型(基本数据类型int\float\BOOL\枚举\结构体)
分类:
其他好文 时间:
2015-07-12 11:07:19
阅读次数:
115
头:#include using namespace std;1.默认的sort函数是按升序排序。sort(a,a+n); //两个參数分别为待排序数组的首地址和尾地址2.能够自己写一个cmp函数,按特定意图进行排序。比如 :1).对数组a降序排序int cmp( const int ...
分类:
其他好文 时间:
2015-07-12 10:57:31
阅读次数:
140
DROP TABLE IF EXISTS `".$db_prefix."adminlog`;CREATE TABLE `".$db_prefix."adminlog` ( `adminlogid` int(11) NOT NULL auto_increment, `action` varchar.....
分类:
Web程序 时间:
2015-07-12 10:54:38
阅读次数:
128
F - Number Sequence#include#includeusing namespace std;struct mat{ int ans[2][2];};mat I,MID;int M;mat cal(mat a,mat b){ mat c; int i,j,k; for(i=0;i>=...
分类:
其他好文 时间:
2015-07-12 10:54:37
阅读次数:
137
//其属性为矩形的左下角和右上角两个点的坐标,能计算矩形的面积。
#include
using namespace std;
class Rectangle
{
public :
Rectangle()
{};
Rectangle(int iLeftX,int iLeftY,int iRightX,int iRightY)
{
this->iLeftX=iLeftX;
this...
分类:
其他好文 时间:
2015-07-12 09:44:10
阅读次数:
460
题意:一队人传递消息,一个人可以向后传给m个人,求最后一个人得到消息的方式有多少种
分析:dp[i]表示第i个人得到消息的方式有dp[i]种,dp[i]=dp[i-1]+.....+dp[i-m]。求方式的状态转移方程基本上都是这个样子
代码:
#include
#include
using namespace std;
int n,m;
int dp[100];
void DP()
{...
分类:
其他好文 时间:
2015-07-12 09:42:12
阅读次数:
100
#include
#include
#include
using namespace std;
int main()
{
// string和const char*互转
const char* a;
string str_1 = "my name is pang";
a = str_1.c_str();
cout
//const char*转string...
分类:
其他好文 时间:
2015-07-12 09:40:55
阅读次数:
120
样例输入1
4
样例输出1
#include
#include
#include
#include
#include
#include
#include
using namespace std;
bool judge(const string &aa,const string &bb)
{
for(int i=0;i<bb.size();++i)
{
if(bb[i]!=aa...
分类:
其他好文 时间:
2015-07-12 09:40:37
阅读次数:
167
Summary Ranges题目思路直接做代码class Solution {
public:
vector summaryRanges(vector& nums) {
vector ans;
if (nums.size() == 0) return ans;
int startPosition = 0...
分类:
其他好文 时间:
2015-07-12 09:39:12
阅读次数:
109
题意很明显就是求最小割了,根据最小割最大流定理,数值等价于求最大流。上模板。#include#include#includeusing namespace std;const int MAXN = 1000010;//点数的最大值const int MAXM = 6000060;//边数的最大值co...
分类:
其他好文 时间:
2015-07-12 09:33:50
阅读次数:
117