码迷,mamicode.com
首页 >  
搜索关键字:eof    ( 7139个结果
shell脚本中执行mysql命令
1.mysql -hhostname -uuser -ppsword -e "mysql_cmd"2.mysql -hhostname -uuser -ppsword << EOF mysql_cmdEOF如下简单例子:#!/bin/bashmysql -hservicedb-online -ur....
分类:数据库   时间:2015-03-31 20:01:52    阅读次数:157
12230 - Crossing Rivers
最好将变量定义为double型。 #include using namespace std; double n,D,p,L,v; int main() { int maxn = 0; while(scanf("%lf%lf",&n,&D)!=EOF) { if(n==0&&D==0) return 0; double sum_L = 0,sum =...
分类:其他好文   时间:2015-03-31 18:15:17    阅读次数:92
LeetCode #Single Number#
解法一: 人类需要O(n)去解决问题,于是普罗米修斯不管三七二十一就偷来了Hash... Python里面内置的dic好用到不行.这里可以利用Hash把时间复杂度降到O(n),但是这种解法不满足对内存的要求... """ Programmer : EOF Code date : 2015.03.02 file : sn.py e-mail :...
分类:其他好文   时间:2015-03-31 06:50:01    阅读次数:155
〖Linux〗svn log 每个日志记录只显示一行的方法
vi ~/.bashrc,增加一个function 1 svnlog(){ 2 svn log "$@" | awk -f <(cat <<EOF 3 #!/usr/bin/awk -f 4 5 # Convert the "svn log" output into a one liner...
分类:系统相关   时间:2015-03-31 06:19:44    阅读次数:175
杭电oj1005 wrong answer(待改正)
#includeint main(){ int c[51]={1,1}; int time; int a,b,n; int i; while(scanf("%d %d %d",&a,&b,&n)!=EOF){ if(a==0&&b==0&&n==0) break; a%=7; b%=7; ...
分类:其他好文   时间:2015-03-30 20:23:44    阅读次数:165
A+B集合
1 #include 2 3 //int main() 4 //{//1.A+B 5 // int a, b; 6 // while ((scanf("%d%d", &a, &b) != EOF)) 7 // printf("%d\n",a + b); ...
分类:其他好文   时间:2015-03-30 12:45:30    阅读次数:166
hrb——开锁魔法I
解题思路:从1到n的倒数之和。#include#include#includeusing namespace std;int main(){ int n; while(scanf("%d",&n)!=EOF){ double ans=0; for(int i=...
分类:其他好文   时间:2015-03-30 09:10:55    阅读次数:142
杭电ACM 1013 Digital Root
#include#include#includeint main(){char s[100000];int i,sum,num;while(scanf("%s",s)!=EOF&&s[0]!='0'){ sum=0;getchar();for(i=0;i<strlen(s);i++){sum+=(....
分类:其他好文   时间:2015-03-29 12:13:01    阅读次数:114
杭电ACM 1196
#includeint main(){ int num,j,k,s,f; int a[7]={0,0,0,0,0,0,0}; while(scanf("%d",&num)!=EOF){ if(num==0) break; if(num==1) print...
分类:其他好文   时间:2015-03-29 10:44:06    阅读次数:117
偶数求和
开始答案#include int main(){ int i,n,m,t,sum,p; while(scanf("%d",&n)!=EOF) {sum=0; t=0; scanf("%d",&m); for(i=2;iint main(){ int i,n,m,t,sum,p; while(sca....
分类:其他好文   时间:2015-03-28 17:01:45    阅读次数:80
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!