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个星星的坐标.每个星星都有一个等级,数值等于坐标系内纵坐标和横坐标皆不大于它的星星的个数.星星的坐标按照纵坐标从小到大的顺序给出,纵坐标相同时 ...
随机推荐
- 2018.12.30 bzoj3027: [Ceoi2004]Sweet(生成函数+搜索)
传送门 生成函数好题. 题意简述:给出n个盒子,第iii个盒子里有mim_imi颗相同的糖(但不同盒子中的糖不相同),问有多少种选法可以从各盒子中选出数量在[a,b][a,b][a,b]之间的糖果. ...
- Jquery中parentsUntil函数调用最容易犯的三个错误
来自 :http://jquery01.diandian.com/post/2012-01-16/14500044 Jquery中parentsUntil函数调用最容易犯的三个错误 Jquery的pa ...
- (20)The most mysterious star in the universe
https://www.ted.com/talks/tabetha_boyajian_the_most_mysterious_star_in_the_universe/transcript00:12E ...
- Ubuntu 16.04 安装 postgresql 9.3
1.Ctrl+Alt+t 打开终端 2.输入:wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo a ...
- 写了十年JS却不知道模块化为何物?
作者:肖光宇 野狗科技联合创始人,先后在猫扑.百度.搜狗任职,爱折腾的前端工程师. 野狗官博:https://blog.wilddog.com/ 野狗官网:https://www.wilddog.co ...
- ubuntu server sudo出现sudo:must be setuid root 完美解决办法
原文链接:http://blog.csdn.net/supercrsky/article/details/9788397 1.开机按shift或esc先进行recovery模式 2.选择root命令行 ...
- ON_UPDATE_COMMAND_UI和ON_COMMAND有什么区别?
区别如下: UPDATE_COMMAND_UI表示处理菜单对应的用户界面显示状态. COMMAND表示处理该菜单对应的功能. 传统SDK程序要改变选单命令项状态,可以呼叫EnableMenuItem或 ...
- 移动端 - APP测试要点
功能测试 1.运行 1)App安装完成后的试运行,可正常打开软件. 2)App打开测试,是否有加载状态进度提示. 3)App页面间的切换是否流畅,逻辑是否正确. 2.注册 1)同表单编辑页面 2)用户 ...
- Hdu2204 Eddy's爱好 2017-06-27 16:11 43人阅读 评论(0) 收藏
Eddy's爱好 Time Limit : 3000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other) Total Subm ...
- 7.Layout布局(tabs、accordion、layout)
一.tabs选项卡: 二.accordion手风琴: 三.经由div标记创建layout布局: 注意:center不是定位得到的,而是通过其他的几个位置计算得到的,如果不写center整个布局就无法初 ...