自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Angela_Aki

心随音动~~~

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

转载 Linux内核编码风格

一个良好风格的程序看起来直观、美观,便于阅读,还能有助于对程序的理解,特别在代码量比较大情况下更显现编码素质的重要性。相反没有良好的风格的代码读起来难看、晦涩,甚至有时候一个括号没对齐就能造成对程序的曲解或者不理解。我曾经就遇见过这样的情况,花费了很多不必要的时间在程序的上下文对照上,还debug了半天没理解的程序。后来直接用indent -kr -i8给他转换格式来看了。特此转过来一个关于代码风

2013-12-31 17:39:43 521

原创 4A.Watermelon

Watermelontime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputOne hot summer day Pete and his friend Billy decid

2013-12-31 09:56:48 1354

原创 1A. Theatre Square

A. Theatre Squaretime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputTheatre Square in the capital city of Berl

2013-12-31 09:24:43 415

转载 Linux学习路线

首先先学学编辑器,vim,emacs什么的都行。然后学makefile文件,只要知道一点就行,这样就可以准备编程序了。  然后看看《C程序设计语言》K&R,这样呢,基本上就可以进行一般的编程了,顺便找本数据结构的书来看。  如果想学习UNIX/LINUX的编程,《APUE》绝对经典的教材,加深一下功底,学习《UNP》的第二卷。这样基本上系统方面的就可

2013-12-26 23:47:08 380

转载 一位女程序员的奋斗路程

不懂虚函数有什么用,不知道除了构造函数,析构函数外还有拷贝函数,还有深浅拷贝之分。每天下班后我没有直接回家,而是留在了单位telnet到SUNOS上,开始了我学习unix的计划。我觉得是时候该离开这个安逸的国企了,说真的,真有些舍不得,我向PM提出辞职时,经理非常真诚的挽留我,说我工作做得不错,叫我考虑考虑再走。    一.并不成功的开始    我所读的学校是中国西部的一所普通高校

2013-12-26 23:46:30 740

原创 NWPU ACM 2013.12月赛

Description给你一个二进制数,将其翻转后与原二进制数相乘,并按下列所述格式将乘积也按二进制输出。Input输入有多组测试数据(不超过1000组),每组数据只有一个二进制数并且占一行,每个二进制数长度不超过30。Output每组数据按照样例格式输出一行。Sample Input1

2013-12-25 08:36:38 435

原创 9duoj1021

题目1021:统计字符时间限制:1 秒内存限制:32 兆特殊判题:否提交:3435解决:1996题目描述:    统计一个给定字符串中指定的字符出现的次数。输入:    测试输入包含若干测试用例,每个测试用例包含2行,第1行为一个长度不超过5的字符串,第2行为一个长度不超过80的字符串。注意这里的字符串包含空格,即

2013-12-02 23:27:11 585

原创 zoj2876

#include #include #include #include #include using namespace std;int main(){ ifstream cin("2876.txt"); int T, n; string str; vector v; cin >> T; while (T--) { v.clear(); bool flag =

2013-12-02 23:03:43 413

原创 zoj2835

#include #include using namespace std;bool IsHuanFang(int sum1, int sum2, int *Rsum, int *Csum, int n){ int sum = 0; if (sum1 != sum2) return false; for (int i = 0; i < n; ++i) { if (sum1

2013-12-02 23:03:08 432

原创 zoj2829

#include #include using namespace std;map m;int main(){ int flag = 0, i = 0; int n; while (1) { ++i; if (i % 3 == 0 || i % 5 == 0) m[++flag] = i; if (flag > 100000) break; } wh

2013-12-02 23:02:39 553

原创 zoj2772

#include using namespace std;int main(){ int N, money, temp, Case = 0; cin >> N; while (N--) { cin >> money; cout << ++Case << " "; temp = money / 25; cout << temp << " QUARTER(S), ";

2013-12-02 23:02:08 497 1

原创 zoj2723

#include #include #include #include using namespace std;vector v;set s;void Picture(int x, int y){ for (int i = x; i <= y; ++i) { if (i != 2 && i % 2 == 0) continue; for (int j = 3;

2013-12-02 23:01:30 458

原创 zoj2476

#include #include #include #include #include using namespace std;int main(){ ifstream cin("2467.txt"); string s1, s2, temp; int flag, a, b, sum; int n; map m1; m1['0'] = 0; m1['1'] = 1;

2013-12-02 23:00:51 449

原创 zoj2201

#include using namespace std;int main(){ int T, X, Y; cin >> T; while (T--) { cin >> X >> Y; if (X >= Y) cout << "NMM BRAIN" << endl; else cout << "NO BRAINS" << endl; } return 0

2013-12-02 23:00:15 394

原创 9duoj1014

题目1014:排名时间限制:1 秒内存限制:32 兆特殊判题:否提交:6035解决:1721题目描述:    今天的上机考试虽然有实时的Ranklist,但上面的排名只是根据完成的题数排序,没有考虑每题的分值,所以并不是最后的排名。给定录取分数线,请你写程序找出最后通过分数线的考生,并将他们的成绩按降序打印。输入:

2013-12-02 09:05:27 362

原创 zju2109

#include #include #include #include using namespace std;struct Mouse{ double J; double F; double a;};bool Comp(const Mouse &s1, const Mouse &s2){ if (s1.a != s2.a) return s1.a > s2.a; e

2013-12-01 01:03:10 518

原创 zju2722

#include #include using namespace std;int main(){ double n, count; while (cin >> n && n) { count = 0; for (double i = 0; i < 32; ++i) { if (pow(2.0, i) >= n) { count = i; b

2013-12-01 01:01:31 409

原创 zju2727

#include #include #include #include #include using namespace std;struct Book{ string book; int year; int price;};bool NameSort(const Book &s1, const Book &s2){ if (s1.book != s2.book) re

2013-12-01 01:00:55 445

原创 zju2818

#include #include #include using namespace std;int main(){ double B, N; double s1, s2, A, con; int pos; while (cin >> B >> N) { for (A = 0;; ++A) { if (pow(A, N) = B) { pos =

2013-12-01 00:59:56 360

原创 9duoj1048

题目1048:判断三角形类型时间限制:1 秒内存限制:32 兆特殊判题:否提交:4065解决:2000题目描述:给定三角形的三条边,a,b,c。判断该三角形类型。输入:测试数据有多组,每组输入三角形的三条边。输出:对于每组输入,输出直角三角形、锐角三角形、或是钝角三角形。样例

2013-12-01 00:53:17 405

原创 Aizu - 0015

DescriptionA country has a budget of more than 81 trillion yen. We want to process such data, but conventional integer type which uses signed 32 bit can represent up to 2,147,483,647.Your task i

2013-11-30 23:46:06 524

原创 2010年浙江大学计算机及软件工程研究生机试真题 A+B

#include #include #include using namespace std;void Deal(string &s1, string &s2);int main(){ string s1, s2, temp; vector v; int sum, a, b, flag; while (cin >> s1 >> s2) { int f1 = 0, f2

2013-11-30 01:32:52 964

原创 zju2001

#include #include using namespace std;int main(){ string s1, s2, s3; int T, sum1, sum2, sum; cin >> T; while (T--) { cin >> s1 >> s2; reverse(begin(s1), end(s1)); reverse(begin(s2), en

2013-11-29 21:06:03 453

原创 zju2478

#include #include using namespace std;int main(){ int T, j; string str; cin >> T; while (T--) { cin >> str; for (int i = 0; i < str.size(); ++i) { j = i; while (j < str.size() &&

2013-11-29 20:59:00 405

原创 zju2736

#include #include using namespace std;int main(){ string str; int n, a[3]; while (cin >> str) { if (str.size() != 3) break; for (int i = 0; i < str.size(); ++i) { a[i] = str[i] -

2013-11-29 20:55:55 336

原创 zju2812

#include #include using namespace std;void Str2int(const string str, int *a);int main(){ string str; int a[100], sum; while (getline(cin, str) && str[0] != '#') { sum = 0; Str2int(str, a

2013-11-29 20:54:27 534

原创 zju2850

#include using namespace std;int main(){ int p[10][10]; int n, m; int i, j, k; int flag = 1; while (cin >> n >> m &&(n || m)) { flag = 1; for (i = 0; i < n; ++i) { for (j = 0; j < m

2013-11-29 20:52:27 477

原创 zju2857

#include using namespace std;const int MAX = 110;int main(){ int R[MAX][MAX], G[MAX][MAX], B[MAX][MAX], aver[MAX][MAX]; int N, M, Case = 0; while (cin >> N >> M && (N || M)) { for (int i =

2013-11-29 20:50:47 454

原创 zju2886

#include #include using namespace std;int main(){ int T, j; cin >> T; string str; while (T--) { cin >> str; for (int i = 0; i < str.size() - 1; ++i) { j = i; while (j < str.size(

2013-11-29 20:49:30 589

原创 zju2932

#include #include using namespace std;int main(){ string str; while (getline(cin, str)) { if (str[0] == '#')break; for (string::size_type i = 0; i < str.size(); ++i) { if (str[i] == '

2013-11-29 20:47:35 392

原创 zju2947

#include #include using namespace std;int main(){ int T, n1, n2; string str, str1; cin >> T; while (T--) { string s = ""; string s1 = ""; cin >> n1; cin.get(); getline(cin, str);

2013-11-29 20:43:51 417

原创 zju1205

#include #include #include #include using namespace std;int main(){ string s1, s2, temp; vector v; int a, b, sum; int flag; while (cin >> s1 >> s2) { flag = 0; v.clear(); sum = 0;

2013-11-29 20:38:26 416

原创 zju1151

#include #include using namespace std;int main(){ int Case, n; string str; cin >> Case; while (Case--) { cin >> n; cin.get(); while (n--) { getline(cin, str); int j = 0, i;

2013-11-26 23:44:52 353

原创 zju1139

#include using namespace std;struct Coordinate{ int xmin, xmax, ymin, ymax;};Coordinate coordinate[1001];int main(){ int n, sum; while (cin >> n) { for (int i = 0; i < n; ++i) cin >>

2013-11-26 23:44:11 393

原创 zju1105

#include #include using namespace std;double CalDistance();void Init();struct Coordinate{ double startx, starty, endx, endy;};Coordinate coordinate[110];int x, y, len = 0;int main(){ doub

2013-11-26 23:43:09 386

原创 zju1095

#include using namespace std;int FindMin(int a, int b, int c, int d);bool isNum(int n);int main(){ int a[5850]; int n = 1; int p2 = 1, p3 = 1, p5 = 1, p7 = 1; a[1] = 1; while (a[n] < 200000

2013-11-26 23:42:12 388

原创 zju1090

#include #include #include using namespace std;bool isSucceed();void Cal_abc(double &a, double &b, double &c);const double PI = 3.141592653589793;struct Coordinate{ double x, y;};Coordinate

2013-11-26 23:41:27 428

原创 zju1089

#include #include #include using namespace std;int main(){ int k, num; vector v; while (cin >> k && k) { if (k < 6) break; v.clear(); for (int i = 0; i < k; ++i) //读入数据; { cin >>

2013-11-26 23:40:36 471

原创 ZJU1112

#include #include using namespace std;int main(){ int startHour, startMinute, finalHour, finalMinute; int sMinute, fMinute; int pass; while (cin >> startHour >> startMinute >> finalHour >> fi

2013-11-26 23:38:06 434

原创 POJ1067

#include #include using namespace std;int main(){ int x, y, temp; while (cin >> x >> y) { if (x > y) { temp = y; y = x; x = temp; } int k = y - x; int data = floor(k * (1.0

2013-11-22 21:26:25 567

空空如也

空空如也

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

TA关注的人

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