POJ 2860
#include<iostream>
#define MAXN 20
using namespace std; int a_1[MAXN];
int a_2[MAXN]; int main()
{
//freopen("acm.acm","r",stdin);
int n;
int m;
int k;
int i;
int sum;
cin>>n>>m>>k;
for(i = 0; i < k; ++ i)
{
cin>>a_1[i];
}
for(i = 0; i < k; ++ i)
{
cin>>a_2[i];
}
sum = 0;
for(i = 0; i < k; ++ i)
{
sum += abs(a_1[i] - a_2[i]);
}
cout<<sum/2<<endl;
}
POJ 2860的更多相关文章
- POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理
Halloween treats Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7644 Accepted: 2798 ...
- POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理
Find a multiple Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7192 Accepted: 3138 ...
- POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治
The Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22286 ...
- POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 37427 Accepted: 16288 Descr ...
- POJ 3254. Corn Fields 状态压缩DP (入门级)
Corn Fields Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 9806 Accepted: 5185 Descr ...
- POJ 2739. Sum of Consecutive Prime Numbers
Sum of Consecutive Prime Numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20050 ...
- POJ 2255. Tree Recovery
Tree Recovery Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11939 Accepted: 7493 De ...
- POJ 2752 Seek the Name, Seek the Fame [kmp]
Seek the Name, Seek the Fame Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 17898 Ac ...
- poj 2352 Stars 数星星 详解
题目: poj 2352 Stars 数星星 题意:已知n个星星的坐标.每个星星都有一个等级,数值等于坐标系内纵坐标和横坐标皆不大于它的星星的个数.星星的坐标按照纵坐标从小到大的顺序给出,纵坐标相同时 ...
随机推荐
- (19)3 moons and a planet that could have alien life
https://www.ted.com/talks/james_green_3_moons_and_a_planet_that_could_have_alien_life/transcript00:1 ...
- 02 Django配置信息
2-1 基本配置信息 import os # 项目路径 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # ...
- 微信小程序与Vue js数据渲染对比
//小程序 Page({ data: { items: [] }, onLoad: function(options) { this.setData({ items: [1,2,3] }) } }) ...
- keras model.compile(loss='目标函数 ', optimizer='adam', metrics=['accuracy'])
深度学习笔记 目标函数的总结与整理 目标函数,或称损失函数,是网络中的性能函数,也是编译一个模型必须的两个参数之一.由于损失函数种类众多,下面以keras官网手册的为例. 在官方keras.io里 ...
- tokudb_tmp_dir导致的tokudb加载失败
安装TOKUDB数据库,安装完成后为了使配置生效,重启完数据库后,发现: mysql> show engines; +--------------------+---------+ | Engi ...
- Linux(CentOS)下的apache服务器配置与管理
原文链接:http://blog.csdn.net/ylqmf/article/details/5291680 一.WEB服务器与Apache1.web服务器与网址 2.Apache的历史 3.补充h ...
- MIT Molecular Biology 笔记1 DNA的复制,染色体组装
视频 https://www.bilibili.com/video/av7973580?from=search&seid=16993146754254492690 教材 Molecular ...
- LoadRunner改脚本
加action,不支持嵌套大括号 Action(){int iCt = 0; iCt = lr_output_message("abcdefg"); iCt = funA(3,5) ...
- ASP.NET Web API + Elasticsearch 6.x 快速做个全文搜索
最近想做个全文搜索,设想用 ASP.NET Web API + Elasticsearch 6.x 来实现. 网上搜了下 Elasticsearch 的资料,大部分是讲 linux 平台下如何用 ja ...
- WPF MeasureOverride和 ArrangeOverride做个 页面导航
public class NavigationPanel:Panel { protected override Size MeasureOverride(Size availableSize) { S ...