1、地图、坦克、道具、墙壁
（1）地图

（2）坦克

（3）道具

（4）墙壁

2、游戏规则

1、坦克、道具的生成

2、坦克的前进

3、坦克、子弹的运动图像设置

4、碰撞 Problem Description In 12th Zhejiang College Students Games 2007, there was a new stadium built in Zhejiang Normal University. It was a modern stadium which could hold thousands of people. The audience Seats made a circle. The total number of columns were 300 numbered 1--300, counted clockwise, we assume the number of rows were infinite. These days, Busoniya want to hold a large-scale theatrical performance in this stadium. There will be N people go there numbered 1--N. Busoniya has Reserved several seats. To make it funny, he makes M requests for these seats: A B X, which means people numbered B must seat clockwise X distance from people numbered A. For example: A is in column 4th and X is 2, then B must in column 6th (6=4+2). Now your task is to judge weather the request is correct or not. The rule of your judgement is easy: when a new request has conflicts against the foregoing ones then we define it as incorrect, otherwise it is correct. Please find out all the incorrect requests and count them as R. Input There are many test cases: For every case: The first line has two integer N(1<=N<=50,000), M(0<=M<=100,000),separated by a space. Then M lines follow, each line has 3 integer A(1<=A<=N), B(1<=B<=N), X(0<=X<300) (A!=B), separated by a space. Output For every case: Output R, represents the number of incorrect request. Sample Input 10 10 1 2 150 3 4 200 1 5 270 2 6 200 6 5 80 4 7 150 8 9 100 4 8 50 1 7 100 9 2 100 Sample Output 2
Tiling_easy version 的计算
Problem Description 有一个大小是 2 x n 的网格，现在需要用2种规格的骨牌铺满，骨牌规格分别是 2 x 1 和 2 x 2，请计算一共有多少种铺设的方法。 Input 输入的第一行包含一个正整数T（T<=20），表示一共有 T组数据，接着是T行数据，每行包含一个正整数N（N<=30），表示网格的大小是2行N列。 Output 输出一共有多少种铺设的方法，每组数据的输出占一行。 Sample Input 3 2 8 12 Sample Output 3 171 2731
JS换行保存后，显示的却是字符<br>
![图片说明](https://img-ask.csdn.net/upload/202001/12/1578817782_338780.png) 缺陷内容保存后可以换行显示,处理结果就不可以,就显示<br> ``` function getAdd() { var w=\$(window).width(); var h=\$(window).height(); \$('#dd').dialog({ title: '添加缺陷记录', width: w * .6, height: h - 136, closed: false, cache: false, href: 'dia/log/defect-record/get-add.html?module_id=' + module_id + '&station_info=' + station_info, modal: true, buttons: [{ text: '保存', iconCls: "easy-icon-save", handler: function () { var shift = \$("#reportShift").combobox("getValue"); if(shift == -1 || shift == ""){ \$.messager.alert('操作', '请重新核对缺陷上报日期以及所选班次'); return false; } checkStation("station");//检测是否选择或输入 var defectLevel = \$('#defectLevel').combobox('getValue'); if (defectLevel == 0 || defectLevel == 1) { var planTime = \$('#planProTime').datebox('getValue'); if (planTime == null || planTime == '') { \$.messager.alert("修改", "计划处理时间不能为空!", "error"); return; } } var data = \$("#defect-add-form").serialize(); // var content = \$('#content').val().replace(/\n/g,"<br/>"); \$.ajax({ url: "dia/log/defect-record/insert.do?module_id=" + module_id + '&proResult=' + \$('#proResult').val().replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' '), type : "post", dataType : "json", data : data, success : function(request) { if(request.success){ query(); } \$.messager.show({ title: '操作提示', msg: request.msg, timeout: 2000, sshowType: 'slide' }); } }); \$("#dd").dialog({ closed: true }); } }, { text: '关闭', iconCls: "easy-icon-cancel", handler: function () { \$("#dd").dialog({ closed: true }); } }], //用于图形化，窗口打开完成后，给厂站赋值 onLoad: function () { var indexDevId = \$("#indexDevId").val(); \$('#station').combobox('setValue', indexDevId); } }); } ```

Problem Description 　　A sequence Sn is defined as: Where a, b, n, m are positive integers.┌x┐is the ceil of x. For example, ┌3.14┐=4. You are to calculate Sn. 　　You, a top coder, say: So easy! Input 　　There are several test cases, each test case in one line contains four positive integers: a, b, n, m. Where 0< a, m < 215, (a-1)2< b < a2, 0 < b, n < 231.The input will finish with the end of file. Output 　　For each the case, output an integer Sn. Sample Input 2 3 1 2013 2 3 2 2013 2 2 1 2013 Sample Output 4 14 4
Dog and dog 公式的问题
Problem Description Nowadays, Xiaoyang thinks of a simple problem. The problem is derive from primary school: Two men get close with the same speed v1, there is a dog run between them with speed v2. It is easy to answer the question that how long dog has run (D) before they meet. Since it is so easy, he want to change this problem. Two men can see each other within 10 meters, if their distance less than 10 meters, then they stop. The dog can run at most L2 meters. At first, two man's distance is L1 meters, their speeds are changed. The left man's speed becomes and the right man's speed becomes . The dog's speed also changed to Input the first line N, then N lines follows each line has 4 parameters L1, L2, V1, V2; 0<=L1,L2<=100,0<v1,v2<=100 Output D represent how long dog has run, round to integer. Sample Input 2 9 1 2 3 47 11 25 9 Sample Output 0 11
Happy Girls 时间的问题
Problem Description These days, Hunan TV host the big concert – Happy Girls. Long1 and xinxin like it very much, they even use their cellphones to suppose the girl who they like most. This way is easy if you have enough money then you can make a contribution toward your lover. But sometimes, it also causes the problem of injustice. Those who has a lot of money can support their lover in every second. So now, we make a rule to restrict them – every tel-number can just support once in one minute (i.e two messages should have difference bigger or equal 60s). As an exerllent programer, your mission is to count every Happy girl’s result. Input There are many cases. For every case: The first line gives N, represents there are N happy gilrs numbered form 1 to N（N<=10） Then many lines follows(no more than 50000), each line gives the time one sent his/her message, the cellphone number and the number he/she support. They are sepatated by space. The last line an message “#end”. Output In every case, you print “The result is : ”, then N line follows. Each line begin with the Happy girls’ number, then a colon, then a bunch of “*” follows, the number of the “*” are Happy girls’ votes. Sample Input 4 0:12:25 13854241556 1 0:15:52 15825422365 2 0:15:56 15825422365 3 0:18:55 13625415457 2 11:12:2 13954215455 4 5:41:55 13625415457 2 #end Sample Output The result is : 01 : * 02 : *** 03 : 04 : *
Cutting trees 程序怎么来做
Problem Description A rooted graph is an indirected graph with every edge attached by some path to a special vertex called the root or the ground. The ground is denoted in the below figures that follow by a dotted line. A bamboo stalk with n segments is a linear graph of n edges with the bottom of the n edges rooted to the ground. A move consists of hacking away one of the segments, and removing that segment and all segments above it no longer connectd to the ground. Two players alternate moves and the last player to move wins. A single bamboo stalk of n segments can be moved into a bamboo stalk of any smaller number of segments from n-1 to 0. So a single bamboo stalk of n segments is equivalent to a nim pile of n chips. As you known, the player who moves first can win the the game with only one bamboo stalk. So many people always play the game with several bamboo stalks. One example is as below: Playing a sum of games of bamboo stalks is thus equivalent to playing a nim game that with several piles. A move consisits of selecting a bamboo stalk containg n segments and hacking away one of the segments in the selected bamboo stalk. I think the nim game is easy for you, the smart ACMers. So, today, we play a game named "cutting trees". A "rooted tree" is a graph with a distinguished vertex called the root, with the property that from every vertex there is unique path(that doesn't repeat edges) to the root. Essentially this means there are no cycles. Of course, in the game "cutting trees", there are several trees.Again, a move consisits of selecting a tree and hacking away any segment and removing segment and anything not connected to the ground. The player who cuts the last segment wins the game. Input Standard input will contain multiple test cases. The first line of the input is a single integer T which is the number of test cases. T test cases follow. Each case begins with a N(1<=N<=1000), the number of trees in the game.A tree is decribed by a number m, the nodes of the tree and R(0<=R<=m-1), the root of the tree. Then m-1 lines follow, each line containg two positive integers A,B∈[0,m-1], means that there is a edge between A and B. In the game, the first player always moves first. Output Results should be directed to standard output. For each case, if the first player wins, ouput "The first player wins", or else, output "The second player wins",in a single line. Sample Input 1 1 4 0 0 1 1 2 1 3 Sample Output The first player wins
JS新增或编辑进行了回车换行，然后编辑打开就不显示换行，显示成一行了，各位大神要怎么解决？
Easy Climb
Problem Description Somewhere in the neighborhood we have a very nice mountain that gives a splendid view over the surrounding area. There is one problem though: climbing this mountain is very difficult, because of rather large height differences. To make more people able to climb the mountain and enjoy the view, we would like to make the climb easier. To do so, we will model the mountain as follows: the mountain consists of n adjacent stacks of stones, and each of the stacks is h(i) high. The successive height differences are therefore h(i+1)-h(i) (for 1 ≤ i ≤ n-1). We would like all absolute values of these height differences to be smaller than or equal to some number d. We can do this by increasing or decreasing the height of some of the stacks. The first stack (the starting point) and the last stack (the ending point) should remain at the same height as they are initially. Since adding and removing stones requires a lot of effort, we would like to minimize the total number of added stones plus the total number of removed stones. What is this minimum number? Input On the first line one positive number: the number of testcases, at most 100. After that per testcase: * One line with two integers n (2 ≤ n ≤ 100) and d (0 ≤ d ≤ 10^9): the number of stacks of stones and the maximum allowed height difference. * One line with n integers h(i) (0 ≤ h(i) ≤ 10^9): the heights of the stacks. Output Per testcase: * One line with the minimum number of stones that have to be added or removed or ``impossible'' if it is impossible to achieve the goal. Sample Input 3 10 2 4 5 10 6 6 9 4 7 9 8 3 1 6 4 0 4 2 3 0 6 3 Sample Output 6 impossible 4
Harmonious Set 代码怎么实现呢
Problem Description For a giving integer n ( n > 0 ) , the set Sn consists of the non negative integers less than n. For example:S5 = {0,1,2,3,4}. A subset of Sn is harmonious if and only if the sum of its elements is a multiply of n. Now your task is easy. For a given n , you should find the number of harmonious subset of Sn. Input There is a number C in the first line , meaning there are C cases . C is guaranteed no more than 300. Then C cases below. Each case is a positive integer n in a single line. n is not greater than 10^9. Output For each case , Output the answer mod 1000000007 in a single line . Sample Input 5 1 2 3 10 1000 Sample Output 2 2 4 104 618918635

Nothing to do HEAD is now at d635a49... Change several for ranges to const reference (#1296) Building Folly -- Boost version: 1.53.0 -- Found the following Boost libraries: -- context -- filesystem -- program_options -- regex -- system -- thread -- chrono -- date_time -- atomic -- Found double-conversion: /usr/lib64/libdouble-conversion.so -- Found gflags from package config /usr/local/lib/cmake/gflags/gflags-config.cmake -- Found libevent: /usr/lib64/libevent.so -- Could NOT find LibLZMA (missing: LIBLZMA_HAS_AUTO_DECODER LIBLZMA_HAS_EASY_ENCODER LIBLZMA_HAS_LZMA_PRESET) (found version "5.2.2") -- Found LZ4: /usr/lib64/liblz4.so -- Found Zstd: /usr/lib64/libzstd.so -- Found Libsodium: /usr/lib64/libsodium.so -- Setting FOLLY_USE_SYMBOLIZER: OFF CMake Error at CMake/folly-deps.cmake:168 (message): unable to link C++ std::atomic code: you may need to install GNU libatomic Call Stack (most recent call first): CMakeLists.txt:113 (include) -- Configuring incomplete, errors occurred! See also "/home/source/proxygen/proxygen/_build/deps/folly/build/CMakeFiles/CMakeOutput.log". See also "/home/source/proxygen/proxygen/_build/deps/folly/build/CMakeFiles/CMakeError.log". --liblzma是已经安装好了，看他后面也有find到verison
The Euler function 的代码编写
Problem Description The Euler function phi is an important kind of function in number theory, (n) represents the amount of the numbers which are smaller than n and coprime to n, and this function has a lot of beautiful characteristics. Here comes a very easy question: suppose you are given a, b, try to calculate (a)+ (a+1)+....+ (b) Input There are several test cases. Each line has two integers a, b (2<a<b<3000000). Output Output the result of (a)+ (a+1)+....+ (b) Sample Input 3 100 Sample Output 3042
Easy Derivative
Problem Description You must be very familiar with derivative in math,and I guarantee that you can work out the derivative easily. Generally speaking,the last problem is the most difficult problem only a few can work out. However,it is not the case in this contest designed by Samuel. Give you 1 number n,and 2 extra numbers a and b you can work this problem out. For example,f(x)=ax^b,the 2 class derivative is f''=a*b*(b-1)x^(b-2),here n means n class. Here all the numbers are integers. Input The input consists 2 parts: test case number t,each of the test case contains 3 number n(n>=0),a,b(a,b will not be very large),the original one is like the format of f(x)=ax^b. Output Output the a after n times' work. Sample Input 2 1 2 3 3 4 5 Sample Output 6 240
Easy Derivative 程序的设计
Problem Description You must be very familiar with derivative in math,and I guarantee that you can work out the derivative easily. Generally speaking,the last problem is the most difficult problem only a few can work out. However,it is not the case in this contest designed by Samuel. Give you 1 number n,and 2 extra numbers a and b you can work this problem out. For example,f(x)=ax^b,the 2 class derivative is f''=a*b*(b-1)x^(b-2),here n means n class. Here all the numbers are integers. Input The input consists 2 parts: test case number t,each of the test case contains 3 number n(n>=0),a,b(a,b will not be very large),the original one is like the format of f(x)=ax^b. Output Output the a after n times' work. Sample Input 2 1 2 3 3 4 5 Sample Output 6 240
Find the maximum 寻找最大数
Problem Description Euler's Totient function, φ (n) [sometimes called the phi function], is used to determine the number of numbers less than n which are relatively prime to n . For example, as 1, 2, 4, 5, 7, and 8, are all less than nine and relatively prime to nine, φ(9)=6. HG is the master of X Y. One day HG wants to teachers XY something about Euler's Totient function by a mathematic game. That is HG gives a positive integer N and XY tells his master the value of 2<=n<=N for which φ(n) is a maximum. Soon HG finds that this seems a little easy for XY who is a primer of Lupus, because XY gives the right answer very fast by a small program. So HG makes some changes. For this time XY will tells him the value of 2<=n<=N for which n/φ(n) is a maximum. This time XY meets some difficult because he has no enough knowledge to solve this problem. Now he needs your help. Input There are T test cases (1<=T<=50000). For each test case, standard input contains a line with 2 ≤ n ≤ 10^100. Output For each test case there should be single line of output answering the question posed above. Sample Input 2 10 100 Sample Output 6 30
Hiking Trip 怎么实现
Problem Description Hiking in the mountains is seldom an easy task for most people, as it is extremely easy to get lost during the trip. Recently Green has decided to go on a hiking trip. Unfortunately, half way through the trip, he gets extremely tired and so needs to find the path that will bring him to the destination with the least amount of time. Can you help him? You've obtained the area Green's in as an R * C map. Each grid in the map can be one of the four types: tree, sand, path, and stone. All grids not containing stone are passable, and each time, when Green enters a grid of type X (where X can be tree, sand or path), he will spend time T(X). Furthermore, each time Green can only move up, down, left, or right, provided that the adjacent grid in that direction exists. Given Green's current position and his destination, please determine the best path for him. Input There are multiple test cases in the input file. Each test case starts with two integers R, C (2 <= R <= 20, 2 <= C <= 20), the number of rows / columns describing the area. The next line contains three integers, VP, VS, VT (1 <= VP <= 100, 1 <= VS <= 100, 1 <= VT <= 100), denoting the amount of time it requires to walk through the three types of area (path, sand, or tree). The following R lines describe the area. Each of the R lines contains exactly C characters, each character being one of the following: ‘T’, ‘.’, ‘#’, ‘@’, corresponding to grids of type tree, sand, path and stone. The final line contains four integers, SR, SC, TR, TC, (0 <= SR < R, 0 <= SC < C, 0 <= TR < R, 0 <= TC < C), representing your current position and your destination. It is guaranteed that Green's current position is reachable – that is to say, it won't be a '@' square. There is a blank line after each test case. Input ends with End-of-File. Output For each test case, output one integer on one separate line, representing the minimum amount of time needed to complete the trip. If there is no way for Green to reach the destination, output -1 instead. Sample Input 4 6 1 2 10 T...TT TTT### TT.@#T ..###@ 0 1 3 0 4 6 1 2 2 T...TT TTT### TT.@#T ..###@ 0 1 3 0 2 2 5 1 3 T@ @. 0 0 1 1 Sample Output Case 1: 14 Case 2: 8 Case 3: -1
Easy Climb 编写技术
Problem Description Somewhere in the neighborhood we have a very nice mountain that gives a splendid view over the surrounding area. There is one problem though: climbing this mountain is very difficult, because of rather large height differences. To make more people able to climb the mountain and enjoy the view, we would like to make the climb easier. To do so, we will model the mountain as follows: the mountain consists of n adjacent stacks of stones, and each of the stacks is h(i) high. The successive height differences are therefore h(i+1)-h(i) (for 1 ≤ i ≤ n-1). We would like all absolute values of these height differences to be smaller than or equal to some number d. We can do this by increasing or decreasing the height of some of the stacks. The first stack (the starting point) and the last stack (the ending point) should remain at the same height as they are initially. Since adding and removing stones requires a lot of effort, we would like to minimize the total number of added stones plus the total number of removed stones. What is this minimum number? Input On the first line one positive number: the number of testcases, at most 100. After that per testcase: * One line with two integers n (2 ≤ n ≤ 100) and d (0 ≤ d ≤ 10^9): the number of stacks of stones and the maximum allowed height difference. * One line with n integers h(i) (0 ≤ h(i) ≤ 10^9): the heights of the stacks. Output Per testcase: * One line with the minimum number of stones that have to be added or removed or ``impossible'' if it is impossible to achieve the goal. Sample Input 3 10 2 4 5 10 6 6 9 4 7 9 8 3 1 6 4 0 4 2 3 0 6 3 Sample Output 6 impossible 4
Hyperspace 怎么实现
Problem Description Hyperspace ,A Euclidean space of dimension greater than three (the original meaning of the word hyperspace, common in late nineteenth century British books, sometimes used in paranormal context, but which has become rarer since then). Minkowski space, a concept, often referred to by science fiction writers as hyperspace that refers to the four-dimensional space-time of special relativity. Here we define a “Hyperspace” as a set of points in three-dimensional space. We define a function to describe its “Hyperspace Value” Every vi (0<=i<=k) could be describe in three-dimensional reference system, say v0 (1, 2, 3) For the following question, we will have to deal with the “Hyperspaces”, you may assume that the number of “Hyperspace” is always no larger than 100. As we say above, we give every “Hyperspace” an “ID” to identify it. If you want to connect two points in two different “Hyperspaces”, it will cost you F to build the connection. F can be defined as the following expression: In addition, you can only create at most one connection between any two “Hyperspaces”. If you want to connect two points in the same “Hyperspaces” whose “ID” is k, it will cost you G to build the connection. G can be defined as the following expression: Here Now your task is quite easy. AekdyCoin gives you n “Hyperspaces”. Then he gives you information about all the points in the “Hyperspaces” Now he wants to know the minimal cost to connect all the points in all “Hyperspaces” you have to ensure that any two different points in the same "Hyperspace" could be connected directly or indirectly by the connections you build in this "Hyperspace". Input The input consists of several test cases. In the first line there is an integer n (1<=n<=100), indicating the number of “Hyperspaces” Then follow an integer m (1<=m<=100000) You can assume that the number of different points in every “Hyperspace” is always no larger than 100. The next m lines contain the descriptions of all the points All the descriptions are given in the following format x,y,z,id Indicating the point (x,y,z) belongs to the id “Hyperspace” id is an integer. x,y,z are all real number with at most four fractional digits. -10000<=x,y,z<=10000,1<=id<=n Output For each test case, output the minimal cost on a single line. Please round it to four fractional digits. Sample Input 1 2 1 2 1 1 1 3 1 1 Sample Output 1.0000
Linux Kernel Version 用代码的做法

Java学习的正确打开方式

linux系列之常用运维命令整理笔录

Python 基础（一）：入门必备知识

Python十大装B语法
Python 是一种代表简单思想的语言，其语法相对简单，很容易上手。不过，如果就此小视 Python 语法的精妙和深邃，那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点，并附上详细的实例代码。如能在实战中融会贯通、灵活使用，必将使代码更为精炼、高效，同时也会极大提升代码B格，使之看上去更老练，读起来更优雅。 1. for - else 什么？不是 if 和 else 才

2019年11月中国大陆编程语言排行榜
2019年11月2日，我统计了某招聘网站，获得有效程序员招聘数据9万条。针对招聘信息，提取编程语言关键字，并统计如下： 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7

SQL-小白最佳入门sql查询一

“狗屁不通文章生成器”登顶GitHub热榜，分分钟写出万字形式主义大作

《程序人生》系列-这个程序员只用了20行代码就拿了冠军