当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

BZOJ3490:Pa2011 Laser Pool

题目描述

一个直径为1/2的小球,在一个N×m的网格里面运动。
。小球运动的初始方向Xv,Yv∈{-1,0,1)。
在横向和纵向都有一些光线,问f时刻小球会碰到多少次光线。碰到两条光线的交点只计算一次。
询问次数<=10000.n,m<=100000

输入解释

The first line of the standard input contains two integers n and m (1<=N,M<=100000) that represent the dimensions of the table. The second line contains an  -character word composed of the digits 0 i 1. The  -th letter of the word describes the state of the  -th horizontal transmitter where 0 means that the transmitter is off and 1 means that it is on. The third line contains an M-character word that describes the state of the vertical transmitters.
The fourth line of the input contains an integer k(1<=K<=10000)): the number of queries. Each of the following K lines contains five integers x,y,Xv,Yv,t(1<x<M,1<y<N,Xv,Yv属于[-1,1],1<=T<=10^9) that describe the initial position, the velocity of the ball and the duration of its movement.

输出解释

Your program should output exactly k lines to the standard output: the answers to the respective queries. Each answer should have the form of a single integer: the number of times the hit signal was displayed.

输入样例
4 6
1010
010110
1
5 2 1 1 8
输出样例
6
提示

BZPRO Powered by Remmina.
Github Repository
来自acmore.cc的附加信息
bzoj_id 3490
import_source_sha256 6128131bd5101dea5da242e869ea02bde8c9d534f788968f42b708946c008fc7
bzoj_checker_pending False

该题目包含在题集 大视野(八中)OJ 中

题目来源 BZOJ 3490

源链接: LOCAL-BZOJ3490

共提交 0 次

通过率 --%
时间上限 内存上限
10000 MS 128 MB