码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
Codeforces Round #244 (Div. 2) B. Prison Transfer
题目是选出c个连续的囚犯,而且囚犯的级别不能大于t#include using namespace std;int main(){ int n,t,c; cin >> n >> t >> c; int a,cnt = 0, res =0;; for(int i = 0 ; i...
分类:其他好文   时间:2014-05-04 12:14:55    阅读次数:340
子屏幕的创建
SAP可以定义子屏幕,将所定义屏幕窗体作为一个新的对话框窗体来引用,子屏幕分为两种,一种为INCLUDE SCREEN,可以通过report端程序直接调用,另一种是subscreen,需要通过screen painter所创建引用,今天先写INCLUDE SCREEN1.在子屏幕引用中可以通过参数来...
分类:其他好文   时间:2014-05-04 12:10:44    阅读次数:324
Codeforces Round #244 (Div. 2) A. Police Recruits
题目的意思就是找出未能及时处理的犯罪数,#include using namespace std;int main(){ int n; cin >> n; int a,recruit = 0, crimes = 0;; for(int i = 0 ; i > a; ...
分类:其他好文   时间:2014-05-04 11:54:32    阅读次数:274
概率法计算PI
#include using namespace std;//概率计算PIint main(){ int inside=0; double val; int i; for ( i=0; i<100000000; i++) { double x = (dou...
分类:其他好文   时间:2014-05-04 11:47:49    阅读次数:262
c 深度剖析 5
1,指针没有指向一块合法的区域1指针没有初始化12345678910111213#include #include struct aa{char *pa;char c;}ssa,*ssb;void main(){strcpy(ssa.pa,"abc");printf("%s \n",ssa.pa);...
分类:其他好文   时间:2014-05-04 11:38:09    阅读次数:278
UVA 10405 Longest Common Subsequence
最长公共子系列,简单的dp,不过注意有空格,所以,在读字符串的时候,尽量用gets读,这样基本没问题#include#include#include#includeusing namespace std;int dp[1001][1001];int MAX(int x,int y){ if (...
分类:其他好文   时间:2014-05-04 11:34:41    阅读次数:294
UVA 1372 - Log Jumping(推理)
题目链接:1372 - Log Jumping 题意:给定一些n个木板的起始位置和长度k,相重叠的木板可以互相跳跃,求能构成环的最大数量。 思路:先按起始位置排序,然后每次多一个木板就去判断他和前一个和前前一个能不能互相跳跃,如果可以的话就可以多加上这个木板。 代码: #include #include #include using namespace std; #define ma...
分类:其他好文   时间:2014-05-03 21:44:03    阅读次数:247
让你提前认识软件开发---学长的软件开发经验总结(18)
第1部分 重新认识C语言C语言中常用的文件操作函数总结及使用方法演示代码 1. C语言中常用的文件操作函数总结(1) fopen作用:打开文件。表头文件:#include 定义函数:FILE *fopen(const char *path, const char *mode);函数说明:参数path字符串包含欲打开的文件路径及文件名,参数mode字符串则代表着流形态。mode有下列几种形态字符串:...
分类:其他好文   时间:2014-05-03 21:38:17    阅读次数:279
经典白话算法之快速排序
【分析】 【伪代码】 【运行过程】 【代码】 /********************************* * 日期:2014-04-01 * 作者:SJF0115 * 题目:快速排序 **********************************/ #include #include using namespace...
分类:其他好文   时间:2014-05-03 21:17:50    阅读次数:476
非递归的方法遍历二叉树
//非递归遍历一棵树 需要借助栈 #include #include struct Tree { int nValue; Tree *pLeft; Tree *pRight; }; struct Stack { Tree *root; Stack *pNext; }; Stack *pStack = NULL; void push(Tree *root) { St...
分类:其他好文   时间:2014-05-03 20:55:41    阅读次数:325
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!