#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的更多相关文章

  1. POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理

    Halloween treats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7644   Accepted: 2798 ...

  2. POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理

    Find a multiple Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7192   Accepted: 3138   ...

  3. POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治

    The Pilots Brothers' refrigerator Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 22286 ...

  4. POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法

    Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 37427   Accepted: 16288 Descr ...

  5. POJ 3254. Corn Fields 状态压缩DP (入门级)

    Corn Fields Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9806   Accepted: 5185 Descr ...

  6. POJ 2739. Sum of Consecutive Prime Numbers

    Sum of Consecutive Prime Numbers Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 20050 ...

  7. POJ 2255. Tree Recovery

    Tree Recovery Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11939   Accepted: 7493 De ...

  8. 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 ...

  9. poj 2352 Stars 数星星 详解

    题目: poj 2352 Stars 数星星 题意:已知n个星星的坐标.每个星星都有一个等级,数值等于坐标系内纵坐标和横坐标皆不大于它的星星的个数.星星的坐标按照纵坐标从小到大的顺序给出,纵坐标相同时 ...

随机推荐

  1. 2018.11.06 bzoj2287: 【POJ Challenge】消失之物(背包)

    传送门 先假设所有物品都能用,做01背包求出方案数. 然后枚举每个点,分类讨论扣掉它对答案的贡献. 代码: #include<bits/stdc++.h> using namespace ...

  2. Yii2 数据库查询汇总

    1.基础查询 User::find()->all(); 此方法返回所有数据: User::findOne($id); 此方法返回 主键 id=1 的一条数据(举个例子): User::find( ...

  3. Codeforces Round #538 (Div. 2) F 欧拉函数 + 区间修改线段树

    https://codeforces.com/contest/1114/problem/F 欧拉函数 + 区间更新线段树 题意 对一个序列(n<=4e5,a[i]<=300)两种操作: 1 ...

  4. Win7 VS2017简单编译FFMPEG播放器FFPlay

    Win平台简单编译FFPlay播放器,顺便纪念下雷霄骅,一年前刚学FFMPEG时还看过他的博客,昨晚再次搜FFMPEG文章时才知道人已经走了... 做成了视频放到B站 https://www.bili ...

  5. python3.4读取excel数据绘图

    #!/usr/bin/env python # -*- coding:utf-8 -*- # __author__ = "blzhu" """ pyt ...

  6. AngularJS实战之路由ui-view传参

    angular路由传参 首页 <!DOCTYPE html> <html ng-app="app"> <head> <title>路 ...

  7. Keil uVision4 for ARM 下增加支持C51,C5x

    原文链接:http://blog.csdn.net/skertone/article/details/7046447 第一步编辑 TOOLS.ini 找到Keil安装目录, 用记事本修改 TOOLS. ...

  8. ArcGIS 关于Web_Mercator

    #小知识#EPSG,即 European Petroleum Standards Group 欧洲石油标准组织 在ArcGIS 10中Web Mercator有三种EPSG编号.他们分别是EPSG38 ...

  9. silverlight 定时器 System.Windows.Threading.DispatcherTimer

    声明 System.Windows.Threading.DispatcherTimer _MessageControler; //刷新 _MessageControler = new System.W ...

  10. 2.2.1synchronized方法的弊端

    缺陷:用关键字synchronized声明方法是有弊端的,譬如A线程调用同步方法执行一个长时间的任务,那么B线程则必须等待较长的时间, 解决方法:使用synchronized同步语句块 package ...