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
,v
2
,...,v
n
(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); -- ...
随机推荐
- 21.Android之SQLite数据库学习
Google为Andriod的较大的数据处理提供了SQLite,他在数据存储.管理.维护等各方面都相当出色,功能也非常的强大.SQLite具备下列特点: 1.轻量级 使用 SQLite 只需要带一个动 ...
- java反射学习
通过一个对象获得完整的包名和类名 package reflect; public class GetClass { public static void main(String[] args) { G ...
- Android 使用Parcelable序列化对象
转:http://ipjmc.iteye.com/blog/1314145 Android序列化对象主要有两种方法,实现Serializable接口.或者实现Parcelable接口.实现 ...
- 一个cheat命令 == Linux命令小抄大全
本文介绍一个Linux超级命令,有了这个命令,你就可以开开心心的使用linux上的各种命令了.当你要执行一个linux命令,在这个命令参数选项众多时,你一般怎么做?对,我们大多数人都会去求助man命令 ...
- POJ2299Ultra-QuickSort(归并排序 + 树状数组求逆序对)
树状数组求逆序对 转载http://www.cnblogs.com/shenshuyang/archive/2012/07/14/2591859.html 转载: 树状数组,具体的说是 离散化+树 ...
- Jquery+Ajax+Json的使用(微信答题实例)
—————————————————————TP框架下的方法————————————————————————
- Conjugate prior relationships
Conjugate prior relationships The following diagram summarizes conjugate prior relationships for a n ...
- 刨根问底拦不住——I/O模型
前言 看过很多资料,很多对I/O模型概念模糊甚至错误,希望这篇文章有助理解I/O,欢迎讨论和纠正 参考资料:<UNIX网络编程卷1> P122 I/O中涉及概念 介绍阻塞非阻塞,同步异步 ...
- Linux中iptables设置详细(转)
无论如何,iptables是一个需要特别谨慎设置的东西,万一服务器不在你身边,而你贸然设置导致无法SSH,那就等着被老板骂吧,呵呵... 以下内容是为了防止这种情况发生而写的,当然很初级,不过一般服务 ...
- 整理时下流行的浏览器User-Agent大全
总结整理时下流行的浏览器User-Agent大全 此文章转至:http://www.360doc.com/content/12/1012/21/7662927_241124973.shtml 用于学习 ...