Price List
Price List
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others)
Total Submission(s): 296 Accepted Submission(s): 192
shops numbered with successive integers from 1
to n
in Byteland. Every shop sells only one kind of goods, and the price of the i
-th shop's goods is vi
.
Every day, Byteasar will purchase some goods. He will buy at most one piece of goods from each shop. Of course, he can also choose to buy nothing. Back home, Byteasar will calculate the total amount of money he has costed that day and write it down on his account book.
However, due to Byteasar's poor math, he may calculate a wrong number. Byteasar would not mind if he wrote down a smaller number, because it seems that he hadn't used too much money.
Please write a program to help Byteasar judge whether each number is sure to be strictly larger than the actual value.
(1≤T≤10)
, denoting the number of test cases.
In each test case, the first line of the input contains two integers n,m
(1≤n,m≤100000)
, denoting the number of shops and the number of records on Byteasar's account book.
The second line of the input contains n
integers v1,v2,...,vn
(1≤vi≤100000)
, denoting the price of the i
-th shop's goods.
Each of the next m
lines contains an integer q
(0≤q≤1018)
, denoting each number on Byteasar's account book.
characters. If the i
-th number is sure to be strictly larger than the actual value, then the i
-th character should be '1'. Otherwise, it should be '0'.
3 3
2 5 4
1
7
10000
#include <iostream>
#include <cstdio> using namespace std; int main()
{
int t;
int n,m;
int v=;;
int sum=;
int jilu[];
int jieguo[];
scanf("%d",&t);
while(t--){
sum=;
scanf("%d %d",&n,&m);
for(int i=;i<n;i++){
scanf("%d",&v);
sum+=v;
}
for(int j=;j<m;j++){
scanf("%d",&jilu[j]);
}
for(int j=;j<m;j++){
if(jilu[j]>sum){
printf("");
}else{
printf("");
}
}
printf("\n"); }
return ;
}
Price List的更多相关文章
- 简明外贸报价单(Price List)范本
简明外贸报价单(Price List)范本 简明外贸报价单(Price List)范本 报价单 Price List 报价日期:年 月 日 Supplier Address 供应商 公司地址 Co ...
- CodeForces 219B Special Offer! Super Price 999 Bourles!
Special Offer! Super Price 999 Bourles! Time Limit:1000MS Memory Limit:262144KB 64bit IO For ...
- graph-tool文档(一)- 快速开始使用Graph-tool - 2.属性映射、图的IO和Price网络
目录: 属性映射 -- 内部属性映射 图的I/O 构建一个 Price网络(例) 名词解释: Property maps:属性映射 PropertyMap:一个类 scalar value types ...
- 在magneto系统中输出tier price的最小值
2012年6月16日星期六 Asia/Shanghai上午11时39分22秒 有的时候,我们想输出产品的tier price 的最小值!如图: 下面是解决的办法: 1. 在catalog/produc ...
- Amazon教程:刚买就降价!避免损失,申请PRICE MATCH(价格保护)的方法
Amazon的商品价格波动频繁,虽然老白通常都在价格较低的时机向大家推荐,但是经常有降了又降的情况,刚下的单还没到手就又降价了,这种滋味肯定不好受.Amazon客服明确告诉老白一周内降价都可以申请PR ...
- VKP5 Price Calculation – List Variant & KZPBL (Delete site level)
List Variant: Configuration in Logistic General –> Retail Pricing –> Sales Price Calculation – ...
- 1106. Lowest Price in Supply Chain (25)
A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone invo ...
- 1090. Highest Price in Supply Chain (25)
时间限制 200 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue A supply chain is a network of r ...
- OM Price Lists
--select * --from org_organization_definitions; --execute fnd_client_info.set_org_context(111); -- ...
随机推荐
- 云,git,blog,感想
最近由于工作的原因,又看了一下git的资料,这次看收获不小,因为之前已经用了一段时间的git了.主要收获就是除了工作,自己平时在练习时使用git也会事半功倍,怎么说呢,没有git之前,相信很多自学的人 ...
- BZOJ3732 Network
Description 给你N个点的无向图 (1 <= N <= 15,000),记为:1…N. 图中有M条边 (1 <= M <= 30,000) ,第j条边的长度为: d_ ...
- 5个最好的Python Web开发框架
Python是最受欢迎的和最有效率的开发语言之一.Python能让你更快完成工作,并且更有效地集成系统.Python是动态的面向对象的语言.即便你刚刚开始学习Python,也立即就能获得生产力上的提升 ...
- MySQL学习笔记01-MYSQL安装
一 MySQL简介 MySQL是一个关系型数据库管理系统,由瑞典 MySQL AB 公司开发,目前属于 Oracle 公司. MySQL 最流行的关系型数据库管理系统. MySQL分为企业版和社区版. ...
- KindEditor上传本地图片在ASP.NET MVC的配置
http://www.cnblogs.com/upupto/archive/2010/08/24/1807202.html 本文解决KindEditor上传本地图片在ASP.NET MVC中的配置. ...
- WINDOWS渗透与提权总结(1)
旁站路径问题: 1.读网站配置. 2.用以下VBS: 01 On Error Resume Next 02 03 If (LCase(Right(WScript.Fullname, 11)) = ...
- LVS-DR工作原理
我们都知道LVS有LVS-DR,LVS-NAT,LVS-TUN三种模式,其中DR模式意为Direct Routing(直接路由).对于LVS-DR,你到底了解到什么程度?本文通过一个实例场景,详细介绍 ...
- 自动切换的JS菜单
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > <html xmlns=&quo ...
- C语言时间函数
#include "time.h" #include "stdio.h" #include "stdlib.h" int main() { ...
- intel 系列的PC机处理器是大端的还是小端的?
intel 系列的PC机处理器是大端的还是小端的?由于要安装oracle,需要知道是大端机器还是小端的,你好,现在流行的PC,是微型处理器,也就是所谓的小端处理器. 大端处理器是由若干个微型处理器有机 ...