CodeForce 157AGame Outcome 数组加和
来源:互联网 发布:赤焰狂魔莫小贝 知乎 编辑:程序博客网 时间:2024/06/03 20:32
数组加和
#include <iostream>#include <cstdio>#include <string>#include <cstring>#include <algorithm>#include <cmath>#include <queue>#include <vector>#include <set>#include <stack>#include <map>#include <climits>using namespace std;typedef long long ll;const int maxn = 30 + 7, INF = 0x3f3f3f3f, mod = 1e9 + 7;int n;int rsum[maxn] = {0}, csum[maxn] = {0};int main() { scanf("%d", &n); for(int i = 1; i <= n; ++i) { for(int j = 1; j <= n; ++j) { int a; scanf("%d", &a); rsum[i] += a; csum[j] += a; } } int ans = 0; for(int i = 1; i <= n; ++i) { for(int j = 1; j <= n; ++j) { if(csum[j] > rsum[i]) ans++; } } cout << ans; return 0;}
阅读全文
1 0
- CodeForce 157AGame Outcome 数组加和
- CodeForces 157A Game Outcome
- Game Outcome
- codeforce 157 div 2
- codeforce
- codeforce
- Codeforce
- Codeforce
- Codeforce
- Codeforce
- Codeforce
- Codeforce
- Codeforce
- Codeforce
- Codeforce
- CodeForce
- CodeForce 652D Nested Segments 树状数组
- Codeforce 597C(dp+树状数组优化)
- Java
- 巩固C/C++
- Spring Boot教程(四)Spring Boot 连接MySql数据库
- 分析函数-STDDEV,STDDEV_SAMP ,STDDEV_POP,VAR_POP,VAR_SAMP,VARIANCE
- ionic3学习笔记3(native:本机插件)
- CodeForce 157AGame Outcome 数组加和
- SQL Server 连接error: 40
- ue4 3dui交互相关
- retrofit 如何post json给服务端
- 【工作笔记】微信公众号vm页面循环遍历
- Windows Server 2016远程桌面服务配置和授权激活
- java中for和foreach循环
- 多线程
- BZOJ 1419 DP 解题报告