让我们用字母B来表示“百”、字母S表示“十”,用“12...n”来表示个位数字n(using namespace std;int main(){ int n; int digitHundred, digitTen, digitOne; while(scanf("%d", &n) !...
分类:
其他好文 时间:
2015-06-27 22:37:57
阅读次数:
192
母函数问题,今天闲来无事学习了下。
在这里多项式的写法和砝码例子的写法不一样
如果有2个a,则要写成1+x^1+x^2;
如果有2个c,则要写成1+x^3+x^6+x^9;
理解了母函数,那么就没有什么困难了
#include
#include
using namespace std;
int z[30],a[55],b[55];
int main()
{
int t;
cin>>t...
分类:
其他好文 时间:
2015-06-27 21:29:23
阅读次数:
132
多的不说,我这个学渣,我写的代码比较搓!忍耐下吧!
CursorTextField.h
#ifndef _CursorTextField_H_
#define _CursorTextField_H_
#include "cocos2d.h"
USING_NS_CC;
class CursorTextField : public TextFieldTTF, public TextField...
分类:
其他好文 时间:
2015-06-27 21:28:22
阅读次数:
123
封装字段,定义成员变量using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace data{ public class cangkudata { priva...
分类:
数据库 时间:
2015-06-27 21:21:10
阅读次数:
179
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u...
分类:
数据库 时间:
2015-06-27 21:13:34
阅读次数:
173
1 using System.Collections.Generic; 2 using Microsoft.Build.AppxPackage; 3 using Microsoft.Build.Framework; 4 5 namespace DevExpress.Build 6 { 7 ...
分类:
其他好文 时间:
2015-06-27 19:53:17
阅读次数:
94
题目链接 题目要求: Sort a linked list inO(nlogn) time using constant space complexity. 满足O(nlogn)时间复杂度的有快排、归并排序、堆排序。在这里采用的是归并排序(空间复杂度O(logn)),具体程序如下: 1 /...
分类:
其他好文 时间:
2015-06-27 19:53:14
阅读次数:
102
题意:给一个数n,返回该数的阶乘结果是一个多少位(十进制位)的整数。思路:用log来实现。 举个例子 一个三位数n 满足102 2 #define LL long long 3 using namespace std; 4 const int N=1e-7; 5 int a; 6 7 int ...
分类:
其他好文 时间:
2015-06-27 19:45:09
阅读次数:
111
问题:假设银行存款分五种
利率:0.63% 一年 月
利率:0.66% 二年 月
利率:0.69% 三年 月
利率:0.75% 五年 月
利率:0.84% 八年 月
现在存入900000,存期为20年,问应该怎样选择,才能是本息和最大,最大为多少?
解决方案:
using System;
namespace Intresting
{...
分析下面程序出现的编译错误,给出解决的方案。
#include
using namespace std;
//定义函数模板
template
T max(T a, T b)
{
return (a>b)?a:b;
}
int main()
{
int x=2,y=6;
double x1=9.123,y1=12.6543;
cout<<"把T实例化为int:"<...
分类:
其他好文 时间:
2015-06-27 18:31:55
阅读次数:
287