码迷,mamicode.com
首页 >  
搜索关键字:max sum of max-k-sub    ( 43452个结果
calculate the sum of some integers
DescriptionYour task is to calculate the sum of some integers.InputInput contains an integer N in the first line, and then N lines follow. Each line s...
分类:其他好文   时间:2014-05-23 06:41:47    阅读次数:298
hdu 4825 Xor Sum (建树) 2014年百度之星程序设计大赛 - 资格赛 1003
题目题意:给n个数,m次询问,每次给一个数,求这n个数里与这个数 异或 最大的数。思路:建一个类似字典数的数,把每一个数用 32位的0或者1 表示,查找从高位向底位找,优先找不同的,如果没有不同的,就找相同的。 1 #include 2 #include 3 #include 4 #inclu...
分类:其他好文   时间:2014-05-23 05:22:58    阅读次数:196
”上三角“行列式源代码(改良版,添加了几种特殊情况的特殊处理)
#include#include#includevoid main(){//输入行列式开始int n,i,j,a[20][20],T[20],max[20],b[20],k,q,p,f=2,u=0;float t[20][20],c,sum=1,w[20];cout>n;ifstream infil...
分类:其他好文   时间:2014-05-23 04:28:20    阅读次数:283
【摄影测量学空间后方交会作业】求解程序
【摄影测量学空间后方交会作业】求解程序#include #include#include#includeint main(){ double NJZ(double sum[100][100],double l[10]);double x[10],y[10],X[10],Y[10],Z[10],d,D...
分类:其他好文   时间:2014-05-23 04:26:30    阅读次数:409
利用“三角化”计算行列式快速求解程序(验证过很多题目的,绝对准确)
#include#includeusing namespace std;void main(){//输入行列式开始int n,i,j,a[10][10],T[10],max[10],b[10],k,q,p;float t[10][10],c,sum=-1;cout>n;cout>a[i][j];}}...
分类:其他好文   时间:2014-05-23 04:21:52    阅读次数:251
打印总分与各科成绩单
#includeusing namespace std;zong(float sum[100],int i,int m,int j,float max[100],float x[100],float X[100],int g,int k);zong1(float score[100][100],in...
分类:其他好文   时间:2014-05-23 04:14:42    阅读次数:288
山西省高考成绩的排次系统【可查询成绩改正和将作弊成绩去除】
山西省高考成绩的排次系统【可查询成绩改正和将作弊成绩去除】#includeusing namespace std;int main(){int i,j,k,o,a[100][100][10],max[100],x[100],n,m,p,cen[100],hang[100],lie[100],g,y=...
分类:其他好文   时间:2014-05-23 04:13:30    阅读次数:189
POJ1182 食物链 【并查集变种】
挺简单的 N个元素扩展为 3*N个 i-A i-B i-C A吃B吃C吃A 挑战程序设计的89面 #include #include #include #include #include using namespace std; int N,K; const int MAX_N=333333; //并查集 int par[MAX_N]; int rank[MAX_N];//树的...
分类:其他好文   时间:2014-05-21 16:03:48    阅读次数:216
LeetCode: Combination Sum [038]
【题目】 Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen from C unlimited number of times. Note: All numbers (including target) w...
分类:其他好文   时间:2014-05-21 15:21:28    阅读次数:292
Java 数组工具类排序,最大值最小值等
public class ArrayUtils{ /** * 返回数组最大值 * * @param a * @return */ public static int max(int[] a){ // 返回数组最大值 int x; int aa[]=new int[a.leng...
分类:编程语言   时间:2014-05-21 13:31:26    阅读次数:373
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!