摘要:
最短路变形View Code #include <iostream>#include <cstdlib>#include <cstdio>#include <cstring>using namespace std;#define maxn 505#define maxm maxn * maxn#define inf 0x3f3f3f3fstruct Edge{ int v, w, next;}edge[maxm];int n, m;int head[maxn];int edge_num;int q[maxn];int dist[maxn];boo 阅读全文
posted @ 2013-01-18 16:03
undefined2024
阅读(315)
评论(0)
推荐(0)
摘要:
高精度View Code import java.util.*;import java.math.*;public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); BigInteger a = cin.nextBigInteger(); BigInteger sum = BigInteger.ZERO; while (!a.equals(BigInteger.ZERO)) { ... 阅读全文
posted @ 2013-01-18 14:22
undefined2024
阅读(268)
评论(0)
推荐(0)
摘要:
简单题View Code #include<iostream>#include<iomanip>#include<cmath>#include<string>using namespace std;char level[3][20]={"DEFICIENT","PERFECT","ABUNDANT"};char a[1000];void output(int n){ int i; int mid=n/2; int sum=1; for(i=2;i<=mid;i++) { if(n% 阅读全文
posted @ 2013-01-18 14:13
undefined2024
阅读(201)
评论(0)
推荐(0)
摘要:
基础计算几何View Code //zju1280#include <iostream>#include <cstdio>using namespace std;struct Point{ double x,y;};class Line{public: Point pointa,pointb,pointk; void makeline(Point pointa,Point pointb);};void Line::makeline(Point a,Point b){ pointa=a; pointb=b; pointk.x=pointa.x... 阅读全文
posted @ 2013-01-18 14:08
undefined2024
阅读(452)
评论(0)
推荐(0)
摘要:
java中StringBuffer类似于C++中的String,append函数可以在其后面添加字符,reverse可以反转。java中BigInteger的intValue方法可以将其转为int。View Code import java.io.*;import java.util.*;import java.math.*;public class Main { final static int maxl = 50; static String translate(String temp) { StringBuffer ret = new StringBuff... 阅读全文
posted @ 2013-01-18 13:49
undefined2024
阅读(202)
评论(0)
推荐(0)

浙公网安备 33010602011771号