码迷,mamicode.com
首页 >  
搜索关键字:int    ( 143001个结果
POJ-1046
#include #include #include using namespace std; typedef struct coordinate{ int x; int y; int z; }SCoordinate; typedef struct input{ SCoordinate cTarget; SCoordinate cInput; }SInput; int main(i...
分类:其他好文   时间:2015-07-12 01:50:04    阅读次数:144
POJ 3299 Humidex 难度:0
题目链接:http://poj.org/problem?id=3299#include #include using namespace std;double exp(double x){ double ans=1; double td=1; for(int i=1;i1){ ...
分类:其他好文   时间:2015-07-12 01:42:34    阅读次数:129
一维数组的初始化方面
怎样定义一个一维数组: 为N个连续变量分配存储空间 所有的变量数据类型必须相同 所有变量所占的字节大小必须相同 例子: int a[5]; 注意: 一位数组名不代表数组中所有的元素, 一位数组名代表数组中第一个元素的地址。 有关一位数组的操作: 初始化 ...
分类:编程语言   时间:2015-07-12 01:36:33    阅读次数:158
!codeforces 538B-Quasi Binary-(思维)
题意:由01两个数字组成的十进制数,加起来等于n,求最少有多少个这样的数字 分析:灵活创新,思维转换;如:415=111+101+101+101+1,不用想什么十进制减法什么的 代码: #include using namespace std; int main() { char a[10]; int i=0,hight=0; while(cin>>a[i]) i++; for(in...
分类:其他好文   时间:2015-07-12 00:22:19    阅读次数:288
三目表达式
A ? B : C; 等价于if(A){ B;}else{ C;}/**目的:三目运算符的举例时间:2015年7月11日22:59:03*/#include int main(void){ int i; i = (2 > 3 ? 8 : 2); printf("i = %d\n",i); ...
分类:其他好文   时间:2015-07-12 00:12:56    阅读次数:98
逗号表达式
/**目的:逗号表达式的例子时间:2015年7月11日23:11:11*/#include int main(void){ int i; int j = 2; i = (j++, ++j, j + 2, j - 3); printf("i = %d\n",i); printf("j = %d\n.....
分类:其他好文   时间:2015-07-12 00:11:37    阅读次数:168
hdu 4597 Play Game (记忆化搜索 区间dp)
#include#include#include#include#includeusing namespace std;int dp[30][30][30][30];int vis[30][30][30][30];int a[2][30],sum[2][30];int dfs(int i,int j...
分类:其他好文   时间:2015-07-12 00:07:23    阅读次数:178
c实现任意行输出杨辉三角
#include#includeint** fmalloc(int n){ int** array; int i; array = (int** )malloc(sizeof(int*) * n); for(i=0; i<n; ++i){ array[i] = (int*)malloc(sizeo....
分类:其他好文   时间:2015-07-12 00:07:01    阅读次数:139
[LeetCode] Path Sum
This problem has a very easy recursive code as follows. 1 class Solution { 2 public: 3 bool hasPathSum(TreeNode* root, int sum) { 4 if (!r...
分类:其他好文   时间:2015-07-12 00:05:25    阅读次数:167
MFC带标题栏的窗口和不带标题栏的窗口最大化
原文链接:http://blog.csdn.net/smartgps2008/article/details/7741223不带标题栏的窗口最大化:第一种情况:覆盖任务栏ShowWindow(SW_SHOWMAXIMIZED);第二种情况:不覆盖任务栏int cx = GetSystemMetric...
分类:编程语言   时间:2015-07-12 00:02:03    阅读次数:146
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!