About the CCF CSP window
XSS cross-site scripting attack, bypassing the same origin policy through fake content and click bait. This is a big problem, and if an attacker successfully injects code, a considerable amount of user data can be leaked.
Problem Description
In a certain graphics operating system, there are N windows, each window is a rectangular area with both sides parallel to the coordinate axis. . Points on the boundary of the window also belong to the window. There are hierarchical differences between windows. In an area where more than one window overlaps, only the content in the top-level window will be displayed.
When you click a point on the screen, you select the top-level window at the clicked position, and this window will be moved to the top-level of all windows, while the hierarchical order of the remaining windows remains unchanged. If the location you click does not belong to any window, the system will ignore your click.
Now we want you to write a program to simulate the process of clicking on a window.Input format
The first line of input contains two positive integers, namely N and M. (1 ≤ N ≤ 10,1 ≤ M ≤ 10)
The next N lines give the positions of N windows in order from the bottom to the top. Each line contains four non-negative integers x1, y1, x2, y2, indicating a pair of vertex coordinates of the window (x1, y1) and (x2, y2). It is guaranteed that x1 < x2,y1 2.
Each of the next M lines contains two non-negative integers x and y, representing the coordinates of a mouse click.
The x and y coordinates of all points and the vertices of the rectangle involved in the question do not exceed 2559 and 1439 respectively.Output format
The output includes M lines, each line represents the result of a mouse click. If a window is selected by this mouse click, the number of this window is output (windows are numbered from 1 to N in the order in the input); if not, "IGNORED" (without double quotes) is output.
Sample input
3 4
0 0 4 4
1 1 5 5
2 2 6 6
1 1
0 0
4 4
0 5Sample output
2
1
1
IGNOREDSample description
The position clicked for the first time belongs to both the 1st and 2nd windows, but since the 2nd window is on top, it is selected and brought to the top.
The position clicked for the second time only belongs to the first window, so this click selects this window and brings it to the top. The hierarchical relationship between the three windows now is exactly the opposite of the initial state.
The position clicked for the third time belongs to the range of three windows at the same time, but since the first window is now at the top level, it is selected.
The last clicked (0, 5) does not belong to any window.
Analysis: It is a very simple question, there is no difficulty, as long as the order is sorted out.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
Related recommendations:
HTML5 Security Introduction Introduction to Content Security Policy (CSP)_html5 Tutorial Skills
html5 Basic tags (html5 video tag html5 new tag usage)_html5 tutorial skills
The above is the detailed content of About the CCF CSP window. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Running the H5 project requires the following steps: installing necessary tools such as web server, Node.js, development tools, etc. Build a development environment, create project folders, initialize projects, and write code. Start the development server and run the command using the command line. Preview the project in your browser and enter the development server URL. Publish projects, optimize code, deploy projects, and set up web server configuration.

H5 page production refers to the creation of cross-platform compatible web pages using technologies such as HTML5, CSS3 and JavaScript. Its core lies in the browser's parsing code, rendering structure, style and interactive functions. Common technologies include animation effects, responsive design, and data interaction. To avoid errors, developers should be debugged; performance optimization and best practices include image format optimization, request reduction and code specifications, etc. to improve loading speed and code quality.

The steps to create an H5 click icon include: preparing a square source image in the image editing software. Add interactivity in the H5 editor and set the click event. Create a hotspot that covers the entire icon. Set the action of click events, such as jumping to the page or triggering animation. Export H5 documents as HTML, CSS, and JavaScript files. Deploy the exported files to a website or other platform.

H5 (HTML5) is suitable for lightweight applications, such as marketing campaign pages, product display pages and corporate promotion micro-websites. Its advantages lie in cross-platformity and rich interactivity, but its limitations lie in complex interactions and animations, local resource access and offline capabilities.

H5referstoHTML5,apivotaltechnologyinwebdevelopment.1)HTML5introducesnewelementsandAPIsforrich,dynamicwebapplications.2)Itsupportsmultimediawithoutplugins,enhancinguserexperienceacrossdevices.3)SemanticelementsimprovecontentstructureandSEO.4)H5'srespo

Yes, H5 page production is an important implementation method for front-end development, involving core technologies such as HTML, CSS and JavaScript. Developers build dynamic and powerful H5 pages by cleverly combining these technologies, such as using the <canvas> tag to draw graphics or using JavaScript to control interaction behavior.

H5 is not a standalone programming language, but a collection of HTML5, CSS3 and JavaScript for building modern web applications. 1. HTML5 defines the web page structure and content, and provides new tags and APIs. 2. CSS3 controls style and layout, and introduces new features such as animation. 3. JavaScript implements dynamic interaction and enhances functions through DOM operations and asynchronous requests.

H5 pop-up window creation steps: 1. Determine the triggering method (click, time, exit, scroll); 2. Design content (title, text, action button); 3. Set style (size, color, font, background); 4. Implement code (HTML, CSS, JavaScript); 5. Test and deployment.
