ZOJ Problem Set - 2480 Simplest Task in Windows
2021-06-10 08:03
标签:namespace 顺序 tle enter been rom 方法 str corners A typical windows platform may have several windows on the desktop. A user‘s operation may be as simple as a single click of the mouse. In the implementation of such a windows platform, one of the simplest tasks would be deciding which window had been clicked. Given a serial of windows, for each mouse click, decide which window had been clicked. Please notice that windows may overlap, and the window on top would receive the click rather than others. And, we consider a window to be clicked even if the mouse is just on its edge/corner. For the sake of simplicity, we assume that a window will not be activated to the top by any click. The first part of input is a serial of windows. First an integer N (1
The second part of input is a serial of mouse clicks. First an integer M (1
For each mouse click in the input, output a single line containing the index (starting from 0) of the window which receives the click. If there is no such window, output "-1" in a line instead. 1 0 根据别人的思路打的,这个思路也不错,用二维数组模拟一块屏幕,但是因为题目没有提及coordinate的xy取值范围,所以win的大小其实不好拿捏,但是这个107能AC ZOJ Problem Set - 2480 Simplest Task in Windows 标签:namespace 顺序 tle enter been rom 方法 str corners 原文地址:https://www.cnblogs.com/dudulukeyxian/p/10609852.html
Input
Output
Sample Input
0 0 5 5
3
4 1
5 1
6 1
0
Sample Output
0
-1 1 #include
1 #include
下一篇:C#同步调用异步方法
文章标题:ZOJ Problem Set - 2480 Simplest Task in Windows
文章链接:http://soscw.com/essay/93055.html