码迷,mamicode.com
首页 >  
搜索关键字:int    ( 143001个结果
@property属性关键字
关于@property属性关键字使用注意:*weak(assign):代理\UI控件*strong(retain):其他对象(除代理\UI控件\字符串以外的对象)*copy:字符串*assign:非对象类型(基本数据类型int\float\BOOL\枚举\结构体)
分类:其他好文   时间:2015-07-12 11:07:19    阅读次数:115
sort功能使用
头:#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
install.php文件建表时设置编码方式
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
设计并测试一个名为Rectangle的矩形类
//其属性为矩形的左下角和右上角两个点的坐标,能计算矩形的面积。 #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
HDU 1723-Distribute Message-dp-(有向图路径模型)
题意:一队人传递消息,一个人可以向后传给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
char*,const char*,char[],string之间的转换问题。
#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
vijos P1028 最长上升子序列变形题
样例输入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
LeetCode Summary Ranges
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
1001: [BeiJing2006]狼抓兔子(最小割)
题意很明显就是求最小割了,根据最小割最大流定理,数值等价于求最大流。上模板。#include#include#includeusing namespace std;const int MAXN = 1000010;//点数的最大值const int MAXM = 6000060;//边数的最大值co...
分类:其他好文   时间:2015-07-12 09:33:50    阅读次数:117
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!