上一页 1 ··· 71 72 73 74 75 76 77 78 79 ··· 182 下一页
摘要: priority_queue如果想同时建立小根堆和大根堆需要这样写priority_queue<Elem, vector<Elem> , greater<Elem> > pq3; //小根priority_queue<Elem, vector<Elem> , less<Elem> > pq2;//大根并重载大于和小于号View Code #include <iostream>#include <cstdlib>#include <cstring>#include <cstdio&g 阅读全文
posted @ 2011-09-19 09:10 undefined2024 阅读(777) 评论(0) 推荐(0)
摘要: 高精度java做View Code import java.io.*;import java.util.*;import java.math.*;public class Main { static public void main(String[] args) { Scanner cin = new Scanner(new BufferedInputStream(System.in)); int t = cin.nextInt(); while (t-- != 0) { int a = cin.next... 阅读全文
posted @ 2011-09-18 21:02 undefined2024 阅读(132) 评论(0) 推荐(0)
摘要: 最大流View Code #include <iostream>#include <cstdlib>#include <cstring>#include <cstdio>using namespace std;#define maxn 105#define N maxn * 4#define E N * N * 2#define inf 0x3f3f3f3fstruct edge{ int x, y, nxt; int c;} bf[E];int ne, head[N], cur[N], ps[N], dep[N];int n, f, d;voi 阅读全文
posted @ 2011-09-17 20:55 undefined2024 阅读(475) 评论(0) 推荐(0)
摘要: 高精度java做View Code import java.io.*;import java.util.*;import java.math.*;public class Main { static public void main(String[] args) { Scanner cin = new Scanner(new BufferedInputStream(System.in)); while (true) { BigInteger a = cin.nextBigInteger(); int b = cin.... 阅读全文
posted @ 2011-09-16 17:15 undefined2024 阅读(133) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>#include <cstdlib>#include <cstring>#include <cstdio>#include <algorithm>using namespace std;#define maxn 15int n, f[maxn], g[maxn], sum;int cal(){ int ret = 0; for (int i = 0; i < n; i++) ret += f[i] * g[i]; return ret;}int main(){ // 阅读全文
posted @ 2011-09-16 17:03 undefined2024 阅读(270) 评论(0) 推荐(0)
上一页 1 ··· 71 72 73 74 75 76 77 78 79 ··· 182 下一页