NOJ1322求子集重量之和(Calculate the sum of a subset's weight)
来源:互联网 发布:fm调频发射器软件 编辑:程序博客网 时间:2024/05/19 16:36
#include<stdio.h>int main()
{
int A[100][100];
int n,i,j;
int sum=0;
scanf("%d",&n);
for(i=0;i<2;i++)
{
for(j=0;j<n;j++)
{
scanf("%d",&A[i][j]);
}
}
for(i=0;i<n;i++)
{
if(A[1][i]==1)
{
sum+=A[0][i];
}
}
printf("%d\n",sum);
return 0;
}
阅读全文
1 0
- NOJ1322求子集重量之和(Calculate the sum of a subset's weight)
- 求子集重量之和(链表)
- C语言 求子集重量之和
- compute the max sum of a continuours subset
- compute the max sum of a continuours subset
- Calculate the biggest sum of subarray
- Calculate the biggest sum of submatrix
- Find the number of subsets such that the sum of numbers in the subset is a prime number
- leetcode 数组求子集(subset)
- calculate the square of a number
- find the largest subset of consecutive integers 找到最大的连续整数子集
- how to calculate the QR decomposition of a matrix
- The Weight of Tree
- Sicily 4423. Calculate the Sum
- Calculate the Sum
- Sicily 4423 Calculate the Sum
- Find the sum of S = a + aa + aaa + aaaa + aaaaa +......+ aaa...aaa +...
- DP25 子集和问题 Subset Sum Problem @geeksforgeeks
- 利用第三方做抽屉式图
- linux内核之中断和异常
- 分布式系统唯一ID生成方案
- php 单例模式
- 模块API之symbol_put_addr
- NOJ1322求子集重量之和(Calculate the sum of a subset's weight)
- Treap 学习笔记
- 61. Rotate List
- linux进程调度方法简述
- macaca之zfb
- Java程序员不可不知的几个网站,你去过几个?
- update通用生成SQL语句方法
- 初次尝试Maven+logj2.xml 配置
- 关于浏览器的请求数据到达后台乱码问题