码迷,mamicode.com
首页 >  
搜索关键字:stdin    ( 2699个结果
HDOJ 1248 寒冰王座(找规律)
【思路】:找规律,参考的别人的,自己写的挂了。http://blog.csdn.net/appte/article/details/8227632 【AC代码】: #include #include #include #include using namespace std; int main() { //freopen("in.txt", "r", stdin); ...
分类:其他好文   时间:2015-02-25 09:08:52    阅读次数:180
文件I/O
文件描述符对于内核而言,所有打开的文件都通过文件描述符引用。文件描述符是一个非负整数,每一个进程默认有三个已经打开的文件描述符与之关联,分别是标准输入0,标准输出1和标准错误2。POSIX规范在头文件unistd.h中对此定义了三个符号常量STDIN_FILENO,STDOUT_FILENO和STD...
分类:其他好文   时间:2015-02-24 22:10:56    阅读次数:189
HDOJ 1234 统计同成绩学生人数(水)(浙大2006研究生复试)
【思路】:纯水。 【AC代码】: #include #include #include #include using namespace std; #define MAX 1000+10 int main() { //freopen("in.txt", "r", stdin); int n = 0; int num[MAX]; while (cin ...
分类:其他好文   时间:2015-02-24 18:43:54    阅读次数:134
【POJ】【1067】取石子游戏
博弈论 这个是博弈游戏中的Wythoff博弈:以下为我的代码: 1 //POJ 1067 2 #include 3 #include 4 #include 5 int main(){ 6 freopen("1067.in","r",stdin); 7 int a,b; 8 ...
分类:其他好文   时间:2015-02-23 11:59:53    阅读次数:149
Python调用shell的几种方式
1.cmd="someunixcommand" retcode=subprocess.call(cmd,shell=True)2.ssh=paramiko.SSHClient() ssh.connect(server,username=username,password=password) ssh_stdin,ssh_stdout,ssh_stderr=ssh.exec_command(cmd_to_execute)3.importspur shell=spur.SshShell(hostname="loc..
分类:编程语言   时间:2015-02-15 23:16:20    阅读次数:470
HDU 4803 贪心
尽可能的让当前的平均值接近最后的平均值才能最快达到终点的情况 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int main() 7 { 8 // freopen("a.in" , "r" , stdin); 9...
分类:其他好文   时间:2015-02-15 13:31:00    阅读次数:148
POJ 2190
直接枚举0~X就可以了。。。我开始竟然往扩展欧几里德定理想了,呃呃---#include #include #include #include using namespace std;char st[20];int main(){ //freopen("t.txt", "r", stdin);...
分类:其他好文   时间:2015-02-14 23:49:03    阅读次数:296
alibench交互 获取测试链接全国打开情况
#!/usr/bin/perl #usestrict; #usewarnings; useLWP::UserAgent; useHTTP::Cookies; useEncode; useJSON; useutf8; binmode(STDIN,‘:encoding(utf8)‘); binmode(STDOUT,‘:encoding(utf8)‘); binmode(STDERR,‘:encoding(utf8)‘); my$new_task_url=‘http://www.alibench.com/ne..
分类:其他好文   时间:2015-02-12 14:11:24    阅读次数:196
[Lua]Lua IO库整理
I/O库为文件操作提供了两种不同的模型,简单模型和完整模型。简单模型假设有一个当前输入文件和一个当前输出文件,它的I/O操作均作用于这些文件。完整模型则使用显式地文件句柄。它采用了面向对象的风格,并将所有的操作定义为文件句柄上的方法。  简单IO模式 简单模型的所有操作都作用于两个当前文件。I/O库将当前输入文件初始化为进程标准输入(stdin),将当前输出文件初始化为进程标准输出。在执行io...
分类:其他好文   时间:2015-02-10 13:28:35    阅读次数:183
shell脚本知识(二)命令字符操作
1、cat 不仅可以读取文件并拼接数据,他还能够从标准输入中进行读取。 用cat将输入文件的内容与标准输入拼接在一起:$ echo 'Text through stdin' | cat - file.txt 压缩空白行: 将文本中多个空白行压缩成单个: cat -s file。 移除空白行:cat  file  | tr  -s '\n' 。 将连续多个'\n' 字符压缩成单个...
分类:系统相关   时间:2015-02-10 11:19:01    阅读次数:224
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!