自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

silverxinger的博客

一个技术爱好者

  • 博客(4)
  • 收藏
  • 关注

原创 文件输入输出(非重定向)

<br />#include "stdafx.h" #include<iostream> #include<math.h> #include<string> #include<time.h> using namespace std; #define INF 1000000000 int _tmain(int argc, _TCHAR* argv[]) { FILE *fin, *fout; fin = fopen("data.in", "rb"); fout = fopen

2010-11-12 22:25:00 259

原创 重定向文件

<br />#include "stdafx.h" #include<iostream> #include<math.h> #include<string> #include<time.h> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); /* 程序文件 */

2010-11-12 22:10:00 230

原创 例题2-4 输入未知有几个数据

关键是:问题问的是未知有多少数据,所以测试时不好进行显示,因为enter键并不表示所有数据输入结束!所以只能采用以下办法:按"enter"    +    "Ctr+z"   +  "enter"即可以前在做HDOJ等题时用while(cin>>)是因为其为多组数据才这样的,即不知道有几组数据,而不是不知道每组数据有几个值!!!当然,好像有道题是不知道每组数据有几个值的,但是一时找不到了。。。#include "stdafx.h" #include #include #include #includ

2010-11-12 21:45:00 404

原创 测试时间

<br />#include "stdafx.h" #include<iostream> #include<math.h> #include<string> #include<time.h> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { double t1=clock(); /* */ double t2=clock(); printf("Time Used = %.2lf/n",(t

2010-11-12 20:23:00 395

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除