图示 A B C目的把A中的木板都放到C上(保证每次都是大下小上)思路——递归对于一共n个木板A上面n-1个通过C把木板放到B上A最下面一个木板放到C上此时A,B原来的关系调换,B上n-1块木板通过A放到C上参考代码#include using names...
分类:
其他好文 时间:
2014-06-28 19:20:10
阅读次数:
212
未完成,回家继续using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Algorithems{ class...
分类:
其他好文 时间:
2014-06-28 18:52:16
阅读次数:
267
应用层:using System;using System.Collections.Generic;using System.Text;using OperationLibrary;namespace 计算器控制台{ class Program { static void ...
分类:
其他好文 时间:
2014-06-28 18:09:24
阅读次数:
230
题目链接题意 : 用矩阵相乘求斐波那契数的后四位。思路 :基本上纯矩阵快速幂。 1 //3070 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 struct Matrix 9 {10 int v[2][2...
分类:
其他好文 时间:
2014-06-28 17:48:14
阅读次数:
214
1 # include 2 # include 3 # include 4 using namespace std; 5 void Sort(int a[],int b[],int c[],int n,int m) 6 { 7 int A=0, B=0, C=0; 8 while(...
分类:
其他好文 时间:
2014-06-20 16:13:08
阅读次数:
143
母函数简单题 1 #include 2 #include 3 using namespace std; 4 5 const int MAX=130000; 6 int c1[MAX],c2[MAX]; 7 8 struct { 9 int val,num;10 }thing[55];...
分类:
其他好文 时间:
2014-06-20 16:07:13
阅读次数:
164
文件IOusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.IO;using System.Linq...
分类:
其他好文 时间:
2014-06-20 15:58:13
阅读次数:
163
1 //1.C++很简单的一种办法: 2 #include 3 #include 4 using namespace std; 5 #define FILENAME "stat.dat" 6 int main() 7 { 8 fstream _file; 9 _file.o...
分类:
编程语言 时间:
2014-06-20 15:45:52
阅读次数:
327
链接操作不少,不过都是一些基本的操作,增删,旋转,逆转,询问最小。注意一点:T 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 using names...
分类:
其他好文 时间:
2014-06-20 15:25:14
阅读次数:
214
A(Phone Number)1.暴力 #include #include #include #include #include using namespace std;int cmp(const void *a,const void *b){ return strcmp((char *)a...
分类:
其他好文 时间:
2014-06-20 14:41:04
阅读次数:
139