poj 2785 4 Values…
来源:互联网 发布:大津算法 matlab 编辑:程序博客网 时间:2024/06/03 20:29
题意:
这个题目和之前发的1840基本是一个思路
如果裸枚举的话,是n^4。然后就考虑分成两边枚举,先枚举两个值的和,存在哈希表中,然后在枚举另外两个值的和,查哈希表中它的相反数。
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <math.h>
using namespace std;
const int maxn=10000000;
long long ans;
int hash[maxn],lon;
struct
{
}data[maxn*2];
int a[4444][5];
int insert(int a,int b)
{
}
int check(int a,int b)
{
}
int main()
{
}
- poj 2785 4 Values…
- poj 3368 Frequent values(非常变…
- poj 3368 Frequent values(线段树)
- hdu 1806 Frequent values 线段…
- How to Set the Ulimit Values for…
- ZZULI_SummerPractice(4) POJ 3302…
- ZZULI_SummerPractice(4) POJ 1572…
- ZZULI_SummerPractice(4) POJ 1102…
- ZZULI_SummerPractice(4) POJ 2312…
- ZZULI_SummerPractice(4) POJ 132…
- ZOJ 1060 (POJ 1094) Sorting It …
- POJ 1005 I Think I Need a Houseb…
- ZZULI_SummerPractice(3) POJ 12…
- POJ 2594 Treasure Exploration(…
- poj 2421 Constructing Roads mst(…
- poj 1135 Domino Effect 单源最短…
- poj 1980 Unit Fraction Partition…
- poj 3280 Cheapest Palindrome dp(…
- hdu 4081 最小生成树变形
- poj 3321 Apple Tree 线段树
- poj 1001 Exponentiation 高精度
- poj 2352 Stars 线段树
- 邮件群发验证码识别公司,快速稳定高质
- poj 2785 4 Values…
- poj1389 Area of S…
- oracle 时间函数
- 我的VIM配置(ubuntu)
- poj 2482 Stars in Your Window 线段树
- poj 2182 Lost Cows 线段树
- poj 3264 Balanced Lineup 基础线段树
- EBS R12中重新enable失效用户之后,丢失职责
- poj 1177 Picture 线段树加扫描线