- 博客(22)
- 资源 (2)
- 收藏
- 关注
原创 HDU1018 Big Number(求阶乘位数)
#include#include#includeusing namespace std;int main(){ int kase,n; scanf("%d",&kase); while(kase--) { scanf("%d",&n); double sum=0; if(n==0) {printf("1\n"
2014-08-31 23:44:58 469
原创 HDU1003 Max Sum(最大连续子段和)
#include#include#include#includeusing namespace std;int main(){ int T,n; int t=1; //freopen("d:\\test.txt","r",stdin); scanf("%d",&T); for(int k=1;k<=T;k++) { sc
2014-08-31 13:30:03 555
原创 POJ3083 Children of the Candy Corn(BFS+DFS水题)
#include#include#include#include#includeusing namespace std;char map[50][50];bool vis[50][50];int ldir[4][2]={{0,1},{1,0},{0,-1},{-1,0}};int rdir[4][2]={{0,-1},{1,0},{0,1},{-1,0}};int n,m,a
2014-08-29 18:39:40 447
原创 POJ2488 A Knight's Journey(DFS)
#include#include#include#includeusing namespace std;int p,q;bool chess['Z'+1][27];int dis[8][2]= {{-1,-2},{1,-2},{-2,-1},{2,-1},{-2,1},{2,1},{-1,2},{1,2}};struct Node{ int x; char y;
2014-08-28 21:59:11 450
原创 POJ 1904 Brainman(归并求逆序数)
#include#include#include#includeusing namespace std;int a[1005];int c[1005];int n,cnt;void MergeSort(int l, int r){ int mid, i, j, tmp; if( r > l+1 ) { mid = (l+r)/2;
2014-08-28 14:14:30 829
原创 POJ 2388 Who's in the Middle(排序)
#include#include#include#include#define N 10005using namespace std;int a[N];int n;int main(){ //freopen("d:\\test.txt","r",stdin); scanf("%d",&n); for(int i=0;i<n;i++) {
2014-08-28 12:45:25 463
原创 POJ1007 DNA Sorting(求逆序数)
#include#include#include#includeusing namespace std;int n,m;struct DNA{ int num; char sq[55];}dna[110];int cmp(DNA a,DNA b){ if(a.num==b.num) return 0; return a.num<b.num;
2014-08-28 12:31:48 671
原创 poj1002 487-3279(哈希)
hash+sort#include#include#include#include#define N 100005using namespace std;int num[N];int exc(char a){ if(a=='A'||a=='B'||a=='C') return 2; if(a=='D'||a=='E'||a=='F') return 3;
2014-08-27 13:58:05 703
原创 adb 的原理以及它总重启等问题详解
1、adb(Android Debug Bridge) 意为android调试桥。 是android系统中的一种命令行工具,通过它可以和android设备或模拟器通信。 ADB是一个C/S架构的应用程序,由三部分组成: 1)adb client, 运行在PC上(为DDMS,即IDE工作) 2)adb daemon(守护进程), 运行于Emulator(为与E
2014-08-23 14:34:20 1167
原创 poj3982 序列(java大数)
import java.math.*;import java.util.*;public class Main{ public static void main(String[] args){ Scanner cin=new Scanner(System.in); while(cin.hasNext()){ BigInteger[] n
2014-08-22 17:24:51 520
原创 poj2602 Superlong sums(高精度)
#include#include#includeusing namespace std;const int M=1000005;char a[M],b[M],ans[M];int main(){ int n,i,t,w; while(scanf("%d",&n)!=EOF) { getchar(); for(i=n-1;i>=
2014-08-22 17:07:42 660
原创 poj2389 Bull Math(大数java)
import java.math.*;import java.util.*;public class Main{ public static void main(String[] args){ Scanner cin=new Scanner(System.in); BigDecimal ans=BigDecimal.ONE; while(
2014-08-22 16:40:05 689
原创 poj2240 Arbitrage(floyd)
#include#include#include#include#include#includeusing namespace std;double G[35][35];int n,M;void floyd(){ for(int k=1;k<=n;k++) { for(int i=1;i<=n;i++) {
2014-08-22 12:44:26 523
原创 MVC设计模式
1.如何设计一个程序的结构,这是一门专门的学问,叫做"架构模式"(architectural pattern),属于编程的方法论。MVC模式就是架构模式的一种,它对我的启发特别大。我觉得它不仅适用于开发软件,也适用于其他广泛的设计和组织工作。下面是我对MVC模式的一些个人理解,不一定正确,主要用来整理思路。2.MVC是三个单词的首字母缩写,它们是Model(
2014-08-21 23:23:57 796
原创 Android开发入门教程--Android应用程序结构分析
一、新建HelloWorld项目:1、打开Eclipse,点击“File”->"New"->"Project"-Android Application Project"": 在弹出的“New Android Application”窗体中输入相应的应用名称、项目名称、包名称,并选择相应的SDK版本和应用主题:选择项目保存位置,一路“next”完成项目
2014-08-21 22:33:50 677
原创 poj1062昂贵的聘礼(dijkstra)
#include#include#include#include#includeusing namespace std;const int INF=0x3f3f3f3f;int n,m;struct Node{ int p,l,x; int num[110]; int val[110];} goods[110];int map[110][110];
2014-08-20 22:00:40 438
原创 poj2253Frogger(弗洛伊德)
#include#include#include#include#includeusing namespace std;double map[210][210];double x[210],y[210];int n;int main(){ //freopen("d:\\test.txt","r",stdin); int t=1; int i,j,k
2014-08-20 21:58:17 598
原创 poj1860 Currency Exchange(bellman+spfa解法)
bellman加spfa两种解法,均采用vecotr建邻接表,spfa用queue实现
2014-08-16 19:59:34 788
原创 eclipse恢复初始设置的方法(专治各种不服=w=)
下面是我总结的一些方法1.Window -> Reset Perspective(有时候不一定行)2.File -> Switch workspace ->Other(然后删除原来的工作空间目录,再重启eclipse)3.删除eclipse工作空间下的.metadata目录,重启eclipse(这个文件记录着你所有关于eclipse的配置)(推荐★★★)4.Window->Clos
2014-08-15 20:18:32 87803 12
计算机及网络知识精华
2014-05-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人