自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Francis' Code World!

做个安静的码农!

  • 博客(16)
  • 资源 (1)
  • 收藏
  • 关注

原创 转换金额为大写人民币-Java

public String convertRMB(long money) { String[] digits = new String[]{"零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"}; String[] units = new String[]{"元","拾", "佰", "仟", "万", "拾", "佰",

2016-08-08 14:06:02 680

原创 风口的猪-中国牛市

题目描述 风口之下,猪都能飞。当今中国股市牛市,真可谓“错过等七年”。给你一个回顾历史的机会,已知一支股票连续n天的价格走势,以长度为n的整数数组表示,数组中第i个元素(prices[i])代表该股票第i天的股价。假设你一开始没有股票,但有至多两次买入1股而后卖出1股的机会,并且买入前一定要先保证手上没有股票。若两次交易机会都放弃,收益为0。设计算法,计算你能获得的最大收益。 输入数值范围:2

2016-03-09 17:12:57 368

原创 找出所有和为S的连续正数序列

小明很喜欢数学,有一天他在做数学作业时,要求计算出9~16的和,他马上就写出了正确答案是100。但是他并不满足于此,他在想究竟有多少种连续的正数序列的和为100(至少包括两个数)。没多久,他就得到另一组连续正数和为100的序列:18,19,20,21,22。现在把问题交给你,你能不能也很快的找出所有和为S的连续正数序列? import java.util.ArrayList; publi

2016-03-09 16:26:23 486

原创 POJ 1017-Packets

Packets Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 46785   Accepted: 15821 Description A factory produces products packed in square packets of the same he

2015-06-01 23:20:12 353

原创 POJ Function Run Fun

#include using namespace std; int w[21][21][21] = {0}; int fun(int a,int b,int c) { if(a<=0||b<=0||c<=0) return 1; else if(a<b&&b<c) return w[a][b][c-1]+w[a][b-1][c-1]-w[a][b-1][c]; else ret

2015-05-18 20:48:34 380

原创 POJ Common Subsequence

#include "stdafx.h" #include using namespace std; int main() { char str_1[1024]; char str_2[1024]; int **length; while(cin>>str_1>>str_2) { int len_1 = strlen(str_1); int len_2 = strlen(str_

2015-05-18 19:03:18 367

原创 POJ 1400 Complicated Expressions

Complicated Expressions Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 1543   Accepted: 498 Description The most important activity of ACM is the GSM networ

2015-05-05 00:16:32 609

原创 中缀表达式转后缀表达式

template class stack { public:     stack(int len = 50)     {         elem = new T[len];         m_top = -1;     }     void Push(const T &val)     {         elem[++m_top] = val;     }   

2015-05-04 22:03:39 349

原创 POJ 1007 DNA Sorting

DNA Sorting Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 87954   Accepted: 35353 Description One measure of ``unsortedness'' in a sequence is the number

2015-05-04 00:21:31 365

原创 POJ 1664 放苹果

放苹果 Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 27475   Accepted: 17427 Description 把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。

2015-05-03 23:13:17 316

原创 POJ 487-3279

#include using namespace std; #include int map(char ch) {     int num = 0;     switch(ch)     {     case 'A':case'B':case'C':         num = 2; break;     case 'D':case'E':case'F':

2015-05-03 22:02:48 519

原创 POJ Speed Limit

#include using namespace std; int main() {     int num = 0;     while(cin>>num && num != -1)     {         int Time = 0;         int distance = 0;         for(int i = 0 ;i         {     

2015-05-03 20:30:55 359

原创 POJ Financial Management

#include using namespace std; int main() {     double sum = 0.00;     double temp = 0.00;     for (int i = 0;i     {         cin>>temp;         sum+=temp;     }     cout     return 0; }

2015-05-03 20:26:09 440

原创 POJ Symmetric Order

#include using namespace std; #include #include int main() {     int num = 0;     int setCount = 0;     string temp;     vector data1;     vector data2;     while (cin>>num && num != 0)

2015-05-03 20:26:04 396

原创 Poj 1003hangover

#include using namespace std; #define MAX_LENGTH  10 int main() {     int count = 0;     double data[MAX_LENGTH];     double temp = 0.00;     while(cin>>temp)     {         if(temp == 0.0

2015-05-03 20:24:29 365

原创 PoJ 1000

#include using namespace std; int main() {     int a,b;     cin>>a>>b;     if(a>=0&&b         cout     return 0; }

2015-05-03 19:54:38 392

空空如也

空空如也

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

TA关注的人

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