C. Gargari and Bishops
time limit per test
3 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Gargari is jealous that his friend Caisa won the game from the previous problem. He wants to prove that he is a genius.
He has a n × n chessboard.
Each cell of the chessboard has a number written on it. Gargari wants to place two bishops on the chessboard in such a way that there is no cell that is attacked by both of them. Consider a cell wi......
阅读全文
opengl4.0 shading讲基础阴影贴图的部分有很多我不知道的细节,(基础阴影贴图算法当然所有书都有讲)所以干脆全部贴到下面把。P241
To create an OpenGL application that creates shadows using the shadow mapping technique,
use the following steps. We'll start by setting up a FBO to contain the shadow map texture,
and then move on to the required shader code:
1. In the main OpenGL program, set up a FBO with a depth buffer only. Declare a
GLuint variable named shadowFBO to store the handle to this f......
阅读全文