码迷,mamicode.com
首页 >  
搜索关键字:eof    ( 7139个结果
简单实现ssh无密码登录
一:先来看一下效果:二:实现的步骤(在机器172.16.0.1(centos系统)执行下列命令,就可以远程无密码登录172.16.0.2):1:ssh-keygen-trsa(回车回车)2:ssh-copy-id-i/root/.ssh/id_rsa.pubroot@172.16.0.2(172.16.0.2换成ssh-server的ip即可)三:通过expect或者<<EOF直接输入给..
分类:其他好文   时间:2015-04-18 14:40:39    阅读次数:115
nyoj 1057寻找最大数(三) 贪心
#include #include int main(){ char temp,str[20]; int k,len,mark,flag,j; while(scanf("%s %d",str,&k)!=EOF){ len=strlen(str); if(k==0) { puts(str); continue; } for(int i=0;i<len;i++...
分类:其他好文   时间:2015-04-15 21:34:42    阅读次数:139
LeetCode # Longest Common Prefix #
我的Python 解答: """ Programmer : EOF Date : 2015.04.15 File : lcp.py E-mail : jasonleaster@gmail.com """ """ Varible Description: @ret_string : We store the string...
分类:其他好文   时间:2015-04-15 17:13:05    阅读次数:152
C Statements
1,while((ch = getchar()) != EOF){ putchar(ch);}2,while((ch=getchar()) != EOF){ if(ch '9'){ continue;}} //process only the digits3,while(scanf("%f",&v....
分类:其他好文   时间:2015-04-15 13:20:46    阅读次数:127
LeetCode # Add Two Numbers #
Python(我一直不能忍受我的解答不够简短QAQ): """ Programmer : EOF Date : 2015.04.14 File : atn.py E-mail : jasonleaster@gmail.com """ # Definition for singly-linked list. class ListN...
分类:其他好文   时间:2015-04-15 01:02:39    阅读次数:240
nyoj 114某种排序(水 大数+优化大数)
某种序列 时间限制:3000 ms  |  内存限制:65535 KB 难度:4 描述 数列A满足An = An-1 + An-2 + An-3, n >= 3  编写程序,给定A0, A1 和 A2, 计算A99 输入输入包含多行数据 每行数据包含3个整数A0, A1, A2 (0 数据以EOF结束输出对于输入的每一行输出A99的值样例输入 1 1 1 样例输出 69...
分类:编程语言   时间:2015-04-14 21:43:49    阅读次数:218
求平均成绩
#includeint main (){ int m,n,i,d,j,p,sign; double x,y,t,l,c[6],a[51][6]; 数组长度应大一位 while(scanf("%d %d",&n,&m)!=EOF) {x=0;y=0;d=0;sign=0;p=0; ...
分类:其他好文   时间:2015-04-14 19:19:20    阅读次数:118
LeetCode # ZigZag Conversion #
我的Python解答: """ Programmer : EOF Date : 2015.04.14 File : zigzag.py E-mail : jasonleaster@gmail.com """ class Solution: def convert(self, s, nRows): leng...
分类:其他好文   时间:2015-04-14 18:02:44    阅读次数:160
nyoj814 又见拦截导弹 贪心
感觉是贪心。。。就用了贪心  结果ac了。。 和nyoj236完全一个类型的嘛。。。 #include #include int main() { int a[3005],visit[3005],n; while(scanf("%d",&n)!=EOF) { if(n==-1) break; for(int i=0;i<n;i++) scanf("%d",&a[i])...
分类:其他好文   时间:2015-04-14 16:45:21    阅读次数:153
LeetCode # 3Sum #
Python解答一 O(n^3) 时间复杂度不符合要求, 暴力美还是很直观: """ Programmer : EOF Date : 2015.04.11 File : 3sum.py E-mail : jasonleaster@gmail.com Description : This is the first versi...
分类:其他好文   时间:2015-04-13 09:47:31    阅读次数:169
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!