1108: [POI2007]天然气管道Gaz 思路题
来源:互联网 发布:北京银行网银mac版 编辑:程序博客网 时间:2024/04/20 06:35
曼哈顿距离啊……只要有解一定是唯一的啊QAQ(画画图看就知道。。)
直接算就行了。。
#include<iostream>#include<cstdio>#define ll long long using namespace std;int n;ll ans;inline ll read(){ ll a=0,f=1; char c=getchar(); while (c<'0'||c>'9') {if (c=='-') f=-1; c=getchar();} while (c>='0'&&c<='9') {a=a*10+c-'0'; c=getchar();} return a*f;}int main(){ n=read(); for (int i=1;i<=n;i++) ans-=read(),ans+=read(); for (int i=1;i<=n;i++) ans+=read(),ans-=read(); cout << ans; return 0;}
0 0
- 1108: [POI2007]天然气管道Gaz 思路题
- 1108: [POI2007]天然气管道Gaz
- BZOJ 1108 POI2007 天然气管道Gaz
- BZOJ 1108: [POI2007]天然气管道Gaz
- BZOJ1108 [POI2007]天然气管道Gaz
- [BZOJ1108] [POI2007]天然气管道Gaz
- BZOJ1108 [POI2007]天然气管道Gaz
- bzoj1108[POI2007]天然气管道Gaz
- 【BZOJ】【P1108】【POI2007】【天然气管道Gaz】【题解】【数学】
- 1106: [POI2007]立方体大作战tet 思路题 贪心
- 普京:天然气危机将推动波罗的海管道计划
- poi2007
- poi2007
- 中亚天然气管道项目锡尔河第一条主管线穿越成功
- 查询优化管道分析思路
- 字符串切割思路--shell重定向 管道
- 占豪收评--天然气荒
- 【4】天然气泄漏
- View工作原理(一)事件传递原理详解
- 有序表中找对应值算法
- 关于SVN常用命令之import
- 给定两点坐标,添加轨迹
- Intent.ACTION_VIEW无法调用短信页面
- 1108: [POI2007]天然气管道Gaz 思路题
- eclipse中启动Tomcat发布工程,工程的发布目录
- LightOJ 1214 - Large Division (大数求余)
- codeblocks快捷键
- cc.formatStr
- Git 版本控制命令符
- html页面 拨打电话
- linux 安装python2.7.11
- 使用fastq-dump下载SRA数据