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 ...
随机推荐
- Snapdragon profiler连android手机
oppo11 晓龙660 找一根好用的usb数据线 去设置->开发者选项->usb调试 打开(十分钟会自动关,注意再开开) 去windows cmd ===adb devices 会列出这 ...
- makefile opencv的案例
CXX = g++ LIBS +=`pkg-config --libs opencv` INC +=`pkg-config --cflags opencv` CPPFLAGS += -g -std=c ...
- 简单工厂模式 SimpleFactory
简单工厂模式 SimpleFactory 1.1什么是简单工厂设计模式 简单工厂模式是属于创建型模式,又叫做静态工厂方法(Static Factory Method)模式,但不属于23种GOF设计模 ...
- ListView加边框
在drawable加一个xml文件 内容如下:<?xml version="1.0" encoding="UTF-8"?><shape xml ...
- hibernate 继承映射关系( TABLE_PER_CLASS)
Person,Student,Teacher各创建一个表,主键用一个中间表生成. package com.bjsxt.hibernate; import javax.persistence.Ent ...
- Jmeter变量参数化及函数应用
分类: 测试工具 2006-12-14 10:54 12041人阅读 评论(5) 收藏 举报 javascriptloadrunnerrandom脚本测试多线程 我们在使用Jmeter录制脚本后,经常 ...
- SSH框架阶段 ——SSH的优缺点,使用场景?
Hibernate优点: (1) 对象/关系数据库映射(ORM)它使用时只需要操纵对象,使开发更对象化,抛弃了数据库中心的思想,完全的面向对象思想(2) 透明持久化(persistent)带有持久化状 ...
- 窥探try ... catch与__try ... __except的区别
VC中的这两个东西肯定谁都用过, 不过它们之间有什么区别, 正好有时间研究了一下, 如果有错误欢迎拍砖.基于VC2005, 32位XP 平台测试通过. 估计对于其他版本的VC和操作系统是不通用的. 1 ...
- windows lua 多线程 线程同步
今天在改一个程序,改成部分逻辑用lua写,这个程序是多线程的.将程序中部分逻辑改成lua之后,各种非法访问内存错误,各种奇奇怪怪的问题,不分时间,不分地点的出现崩溃.从调用堆栈来看,基本都是使用lua ...
- 图片扩展---基于opencv-python实现
目标: 将一张长方形图片扩展成一张正方形图片,例如: 200x300x3的一张图片扩展成一张300x300x3的图片,填充部分使用白色. 代码: import cv2 import os imglis ...