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); -- ...
随机推荐
- NS图绘制工具推荐
世界上要画NS图的人肯定很少,这种无聊的东西= = 我根据个人经验和直觉,推荐三个套工具. 一.签字笔(铅笔+橡皮)+作业纸+拍照的手机 鉴于我以前手绘版ns图已经找不到了,就用室友之前画的做个例子. ...
- Oracle创建DBLink的方法
文章从http://blog.csdn.net/davidhsing/article/details/6408770拷贝过来的 1.如果需要创建全局 DBLink,则需要先确定用户有创建 dblink ...
- 17.(转) Android之四大基本组件介绍与生命周期
Android四大基本组件分别是Activity,Service服务,Content Provider内容提供者,BroadcastReceiver广播接收器. 一:了解四大基本组件 Activity ...
- golang thrift 源码分析,服务器和客户端究竟是如何工作的
首先编写thrift文件(rpcserver.thrift),运行thrift --gen go rpcserver.thrift,生成代码 namespace go rpc service RpcS ...
- SpringMVC数据库链接池,以及其他相关配置
1.applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans ...
- POJ2299 Ultra-QuickSort
Description In this problem, you have to analyze a particular sorting algorithm. The algorithm proce ...
- rwsr-sr-x类似权限设置
如何设置suid/guid? 如果希望设置suid,那么就将相应的权限位之前的那一位设置为4:如果希望设置guid,那么就将相应的权限位之前的那一位设置为2:如果希望两者都置位,那么将相应的权限位之前 ...
- Android Studio-导入External Libraries
1.导入本地Libraries 1 拷贝 gson-2.3.1.jar(gson-2.3.1.jar为例)到 app/libs 目录下 2 在app/build.gradle的 dependencie ...
- C++ 四种强制类型转换
来自csdn:http://blog.csdn.net/hgl868/article/details/46619399 C风格的强制类转换(Type Cast)很简单,不管什么类型的转换统统是: TY ...
- yum使用本地源
cache: [k2e喜]: 注意它的发音: 不是: keik the attribute could not be removed from the cache. 不能从缓存删除属性. YUM对服务 ...