码迷,mamicode.com
首页 >  
搜索关键字:stdin    ( 2699个结果
poj3253(优先队列)
#include #include #include #include #include using namespace std; int N,R; int x[50100]; int main() { #ifdef xxz freopen("in.txt","r",stdin); #endif // xxz ios::sync_with_stdio(false); ...
分类:其他好文   时间:2015-02-09 18:23:16    阅读次数:182
poj3617(字典序最小问题)
#include #include #include using namespace std; int n,m; char S[2100],P[2100]; int main() { #ifdef xxz freopen("in.txt","r",stdin); #endif // xxz ios::sync_with_stdio(false); cin.tie(0...
分类:其他好文   时间:2015-02-09 18:20:33    阅读次数:138
Python的异常处理
比如如下列子:>>>s=raw_input(‘Entersomething-->‘)Entersomething-->Traceback(mostrecentcalllast):File"<stdin>",line1,in?EOFError按Ctrl-d,Python引发了一个称为EOFError的错误,这个错误基本上意味着它发现一个不期望的文件尾(由Ctrl-d表示)1、..
分类:编程语言   时间:2015-02-06 15:07:19    阅读次数:200
sed -i命令详解
[root@www ~]# sed [-nefr] [动作]选项与参数:-n :使用安静(silent)模式。在一般 sed 的用法中,所有来自 STDIN 的数据一般都会被列出到终端上。但如果加上 -n 参数后,则只有经过sed 特殊处理的那一行(或者动作)才会被列出来。-e :直接在命令列模式上...
分类:其他好文   时间:2015-02-06 14:46:58    阅读次数:137
Linux第六节随笔
三期第五讲 -高级文件管理1.输入输出重定向 ls -l /dev/stdin -> /proc/self/fd/0 标准输入 设备:键盘 标记:0 ls -l /dev/stdout -> /proc/self/fd/1 标准输出 设备:屏幕 标记:1 ls...
分类:系统相关   时间:2015-02-05 20:05:44    阅读次数:245
UVa 10054 项链
题意: 思路: Code: #include #include bool solve(); void dfs(int n); int graph[51][51]; int du[51]; int path[1010*2]; int len; int main() { //freopen("10054.in","r",stdin); //freopen("10054.out","...
分类:其他好文   时间:2015-02-03 19:29:27    阅读次数:160
CodeForces Round #290 Div.2
A. Fox And Snake代码可能有点挫,但能够快速A掉就够了。 1 #include 2 3 int main() 4 { 5 //freopen("in.txt", "r", stdin); 6 7 int n, m; 8 scanf("%d%d", &n, ...
分类:其他好文   时间:2015-02-03 06:57:59    阅读次数:124
bug of vetor
#include int main(){ // freopen("in","r",stdin); vector a; a.clear(); a.push_back(1); for(vector::iterator it = a.begin();it!=a.end();++it){ if(*it<100) a.push_back(*it*2)...
分类:其他好文   时间:2015-02-01 17:52:58    阅读次数:161
免费焰饼
#include#includeint max(int a,int b){ return a>b?a:b;}int bei[12][100003];int main(){ int m,i,j; //freopen("in.txt","r",stdin); while( sca...
分类:其他好文   时间:2015-02-01 14:45:27    阅读次数:154
【转】用python写MapReduce函数——以WordCount为例
本例中直接用python写一个MapReduce实例:统计输入文件的单词的词频使用python写MapReduce的“诀窍”是利用Hadoop流的API,通过STDIN(标准输入)、STDOUT(标准输出)在Map函数和Reduce函数之间传递数据。我们唯一需要做的是利用Python的sys.std...
分类:编程语言   时间:2015-01-29 20:57:30    阅读次数:267
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!