#include#includeint main(){ int k,x=0,y=0,i; char s[100]; while(scanf("%s",s)!=EOF) { x=0; y=0; k=strlen(s); f...
分类:
其他好文 时间:
2014-12-17 10:37:18
阅读次数:
162
去掉文件中的某个字或符号#include "fstream"using namespace std ;int main(){ ifstream fin("a.txt") ; ofstream fout("b.txt") ; char a ; while (!fin.eof()...
分类:
其他好文 时间:
2014-12-17 00:02:12
阅读次数:
240
1.#!/bin/bashpassword="iiecas123"dest_dir="/vds/conf"for i in `cat $1`do /usr/bin/expect << EOF spawn scp ubase.dat $i:/vds/conf/ubase.dat set ...
分类:
其他好文 时间:
2014-12-14 23:54:45
阅读次数:
301
ssh root@192.168.0.2 “ls /home”默认是当前用户名连接 接目录批量更改密码EOF必须顶头写一个标准的远程ssh更改密码的脚本安装unixtodos 以及dostounix都可以连接服务器时提问是否信任公钥,第二次连接时已经保存在本地第一次回答后,服务器再发公钥一对比完全一...
分类:
其他好文 时间:
2014-12-14 17:06:59
阅读次数:
232
题目:有人认为大象的体重和智力有一定的正相关性,现在给你一些数据,找到一个最长的反例序列。
分析:dp,LIS,醉倒上升子序列。对W排序求出S的最大下降子序列即可,存储路径搜索输出。
说明:先读到EOF再处理。
#include
#include
#include
#include
#include
#include
using namespace std;
typedef...
分类:
其他好文 时间:
2014-12-13 08:31:02
阅读次数:
246
题目:一个绿色矩形上有个红色的圆,计算红色和绿色的面积比。
分析:计算几何,简单题。直接用公式即可。
说明:不要用EOF,会TLE。
#include
#include
#include
#include
#include
#include
using namespace std;
double pi = acos(-1.0);
int main()
{
int n;
...
分类:
其他好文 时间:
2014-12-12 22:14:49
阅读次数:
249
1、概论 -- 来自维基的解释/dev/null : 在类Unix系统中,/dev/null,或称空设备,是一个特殊的设备文件,它丢弃一切写入其中的数据(但报告写入操作成功),读取它则会立即得到一个EOF。在程序员行话,尤其是Unix行话中,/dev/null 被称为位桶(bit bucket)或者黑洞(black hole)。空设备通常被用于丢弃不需要的输出流,或作为用于输入流的空文件。这些操...
分类:
其他好文 时间:
2014-12-12 16:43:43
阅读次数:
273
Problem Description输入n个字符串(n 2 #include 3 int main() 4 { 5 int n,i; 6 char a[101],b[101],ch; 7 while(scanf("%d",&n)!=EOF) 8 { 9 ...
分类:
编程语言 时间:
2014-12-12 14:32:28
阅读次数:
266
1-6#include int main(void){ printf("getchar()!=EOF is:%d\n", getchar()!=EOF); return 0;}编译后当输入Ctrl+D的时候,输出:getchar()!=EOF is: 0输入其他值时,输出getchar()!=EOF...
分类:
编程语言 时间:
2014-12-12 11:30:42
阅读次数:
133
Problem Description 输入一个正整数n(nint main(){ long int s,a; int i,n; while(scanf("%d",&n)!=EOF) { s=0; ...
分类:
编程语言 时间:
2014-12-09 22:50:50
阅读次数:
544