码迷,mamicode.com
首页 >  
搜索关键字:print    ( 43532个结果
PAT005 Path in a Heap
题目:Insert a sequence of given numbers into an initially empty min-heap H. Then for any given index i, you are supposed to print the path from H[i] to ...
分类:其他好文   时间:2015-04-06 14:10:20    阅读次数:148
Matlab之print,fprint,fscanf,disp函数(转)
print:print函数可以把函数图形保存成图片:minbnd = -4*pi;maxbnd = 4*pi;t = minbnd:0.1*pi:maxbnd;plot(t, sin(t), 'g', 'Linewidth', 2);line([minbnd, maxbnd], [0, 0]); %...
分类:其他好文   时间:2015-04-06 11:21:23    阅读次数:186
Java学习(十三):Java二叉树递归遍历
1 public class BinaryTree 2 { 3 public void printNode(TreeNode node) 4 { 5 System.out.print(node.getData()); 6 } 7 8...
分类:编程语言   时间:2015-04-05 23:14:13    阅读次数:238
python再学习笔记
python各种半桶水QAQ,一些特性经常跟其他语言搞混,官方入门文档重读温习......最好用4个空格的缩进空值是Python里一个特殊的值,用None表示变量就是在程序中用来指向这些数据对象的,对变量赋值就是把数据和变量给关联起来编码问题:print u'中'.encode('utf-8')另一...
分类:编程语言   时间:2015-04-05 18:51:03    阅读次数:171
暴力搜索专题小结:全排列及可重集排列生成算法
1~n的全排列 (1)思路:按照递归的思想,初始化集合S中含有1~n所有元素。如果1~n的集合S为空,那么输出全排列;否则从小到大依次考虑每个元素i,在A的末尾添加i后,集合S变为S-{i}。这里我们不需要集合S,只需要利用一个变量cur表示当前位要填的数即可。那么A中没有出现过的元素均可以选择。 #define N 100 int A[N]; void print_permutation(i...
分类:编程语言   时间:2015-04-05 17:31:16    阅读次数:146
sctf pwn300
拿到程序后,拉入IDA,大概看了一番后,尝试运行,进一步了解程序的功能。 发现NX enabled,No PIE。 一号是一个猜数字的游戏,二号是一个留言本,三号是打印出留言的内容,四号是退出。 观察IDA中逻辑后,发现一个格式化字符串漏洞。 在三号功能(Print your messa...
分类:其他好文   时间:2015-04-05 17:16:20    阅读次数:162
Python遍历目录的多种方式
1.os.popen运行shell列表命令def traverseDirByShell(path): for f in os.popen('ls ' + path): print f.strip()2.利用glob模块glob.glob(path)返回带目录的文件名.通配符和shell相似.path不能包含shell变量.def traverseDirByGlob(path)...
分类:编程语言   时间:2015-04-05 12:00:28    阅读次数:192
递归 八皇后复习
#include using namespace std; #define maxn 20 int map[maxn][maxn]; bool vis[3][2*maxn]; int ans, C[maxn]; int N; int tot; void print() { printf("第%d种摆放方法: ", ++tot); for(int i=0; i<N; i++)...
分类:其他好文   时间:2015-04-04 21:17:16    阅读次数:147
PHP封装一个上传类
<?php//print_r($_FILES[‘pic‘]);//print_r($_SERVER);header("Content-type:text/html;charset=utf-8");date_default_timezone_set("PRC");define("ROOT",$_SERVER[‘DOCUMENT_ROOT‘]);classUpload{protected$allowExt=array(‘jpg‘,‘png‘,‘gif‘,‘bmp‘);//设置上传类型protec..
分类:Web程序   时间:2015-04-04 16:54:28    阅读次数:137
杨辉三角
你还在申请一个大的数组来存放杨辉三角吗,你out啦;知道队列么,杨辉三角其实是可以用队列来实现的,一个也好,两个也罢,当然你也可以用N个,那就得看你是怎么想的了。一、使用一个队列打印杨辉三角#include#includeusing namespace std;void print(int n).....
分类:其他好文   时间:2015-04-04 13:40:24    阅读次数:144
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!