2204 Problem A(水)
问题 A: 【高精度】被限制的加法
时间限制: 1 Sec 内存限制: 16 MB 提交: 54 解决: 29 [提交][状态][讨论版]
题目描述
输入
输出
样例输入
4
1 1
2 3
0 5
3 7
样例输出
2560
#include <iostream> using namespace std; int main()
{
int n;
int a[][];
int tag;
while(cin>>n){
for(int i=;i<n;i++){
cin>>a[i][]>>a[i][];
}
tag=;
for(int i=n-;i>=;i--){
a[i][]=a[i][]+a[i][]+tag;
if(a[i][]>=&&i!=){
tag=;
a[i][]=a[i][]-;
}
else
tag=;
}
for(int i=;i<n;i++){
cout<<a[i][];
}
cout<<endl;
}
return ;
}
2204 Problem A(水)的更多相关文章
- fzuoj Problem 2182 水题
http://acm.fzu.edu.cn/problem.php?pid=2182 Problem 2182 水题 Accept: 188 Submit: 277Time Limit: 100 ...
- 烟大 Contest1024 - 《挑战编程》第一章:入门 Problem A: The 3n + 1 problem(水题)
Problem A: The 3n + 1 problem Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 14 Solved: 6[Submit][St ...
- Poj1298_The Hardest Problem Ever(水题)
一.Description Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar eve ...
- [POJ 1000] A+B Problem 经典水题 C++解题报告 JAVA解题报告
A+B Problem Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 311263 Accepted: 1713 ...
- HDOJ(HDU) 1898 Sempr == The Best Problem Solver?(水题、、、)
Problem Description As is known to all, Sempr(Liangjing Wang) had solved more than 1400 problems on ...
- Prime Ring Problem(dfs水)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=1016 Prime Ring Problem Time Limit: 4000/2000 MS (Jav ...
- HDU 4716 A Computer Graphics Problem (水题)
A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (J ...
- SGU - 403 - Scientific Problem (水)
403. Scientific Problem Time limit per test: 0.25 second(s) Memory limit: 65536 kilobytes input: sta ...
- zzulioj--1634--Happy Thanksgiving Day - A + B Problem(模拟水题)
1634: Happy Thanksgiving Day - A + B Problem Time Limit: 1 Sec Memory Limit: 128 MB Submit: 136 ...
随机推荐
- Solr-5.3.1 dataimport 导入mysql数据
最近需要计算制造业领域大词表每个词的idf,词表里一共九十多万个词,语料一共三百七十多万篇分词后文献.最开始尝试用程序词表循环套语料循环得到每个词的idf,后来又尝试把语料存入mysql然后建立全文索 ...
- Windows如何自定义U盘盘符、文件夹图标、文件夹背景
自定义U盘盘符.文件夹图标.文件夹背景 注意对于Vista和Win7的用户不支持文件夹图标和文件夹背景的更换 1.自定义盘符:在U盘根目录下新建文件 autorun.inf(可先建.txt文本文档,再 ...
- <十>读<<大话设计模式>>之观察者模式
观察者模式也是比較简单的一种模式,可能从名字上理解无法明确,但真正理解其含义之后就非常easy了,说实话在自己来发的项目中自己也用到过.仅仅只是不知道它叫观察者罢了,仅仅要懂面向对象的对继承多态理解非 ...
- taro + iview 实现跨平台开发(App,Wap,微信小程序)
1.安装 (1)安装脚手架 npm install -g @tarojs/cli taro init myApp (2)H5端运行 npm run dev:h5 taro build --type h ...
- 【Python3 爬虫】03_urllib.error异常处理
urllib.error可以接受来自urllib.request产生的异常.urllib.error有两个方法:①URLError ②HTTPError URLError URLError产生的原因 ...
- 【Java】Java_12 Eclipse
1.eclipse简介 Eclipse 是一个开放源代码的.基于Java的可扩展开发平台.就其本身而言,它只是一个框架和一组服务,用于通过插件组件构建开发环境. 尽管 Eclipse 是使用Java语 ...
- 窥探try ... catch与__try ... __except的区别
VC中的这两个东西肯定谁都用过, 不过它们之间有什么区别, 正好有时间研究了一下, 如果有错误欢迎拍砖.基于VC2005, 32位XP 平台测试通过. 估计对于其他版本的VC和操作系统是不通用的. 1 ...
- useradd命令
◆useradd 1.作用 useradd命令用来建立用户帐号和创建用户的起始目录,使用权限是超级用户. 2.格式 useradd [-d home] [-s shell] [-c comment] ...
- 红茶一杯话Binder (传输机制篇_中)
红茶一杯话Binder (传输机制篇_中) 侯 亮 1 谈谈底层IPC机制吧 在上一篇文章的最后,我们说到BpBinder将数据发到了Binder驱动.然而在驱动层,这部分数据又是如何传递到BBind ...
- C++语言基础(11)-多态
一.产生背景 先看下面的例子: #include <iostream> using namespace std; //基类People class People{ public: Peop ...