文章分类 - Hash
HDU 1496 Equations
摘要:题意:给你四个数a,b,c,d,让你求满足等式a*x1^2+b*x2^2+c*x3^2+d*x4^2=0;的x的个数。思路:经典Hash,开两个数组分别保存正数和负数,时间复杂度降到n^2。题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1496View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <cmath> 4 #include <algorithm> 5 #include <string> 6 #include
阅读全文
浙公网安备 33010602011771号