#!/bin/bashecho "1.剪刀 2.石头 3.布"game=(剪刀 石头 布)num=$[RANDOM%3]sui=${game[$num]}echo $suiecho $numwhile truedo read -ep "是否开始游戏,请输入yes或no" aa if [ aa ==  ...
                            
                            
                                分类:
其他好文   时间:
2020-05-06 21:57:00   
                                阅读次数:
56
                             
                    
                        
                            
                            
                                (点击图片进入关卡) 最有价值的物品最先消失。 简介 要做这个简单的收集游戏,我们需要掌握时间管理。 使用时间戳追踪何时刷新新的宝藏: if game.time > game.spawnTime: spawnSomething() game.spawnTime += spawnInterval 此外 ...
                            
                            
                                分类:
其他好文   时间:
2020-05-06 19:50:59   
                                阅读次数:
109
                             
                    
                        
                            
                            
                                    "Atcoder ABC166 F" Three Variables Game 题意 有一个游戏包含三个变量,分别表示为$A$,$B$和$C$。随着游戏的进行,将会有$N$个事件要求您做出选择。这些选项中的每一个都由一个字符串S~i~?表示。如果S~i~是$A$ || $B$,你必须在$A$或$B$ ...
                            
                            
                                分类:
其他好文   时间:
2020-05-05 21:59:15   
                                阅读次数:
141
                             
                    
                        
                            
                            
                                    Just a Hook HDU - 1698 In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of sever ...
                            
                            
                                分类:
其他好文   时间:
2020-05-05 00:29:03   
                                阅读次数:
57
                             
                    
                        
                            
                            
                                    被这个题目卡了好久,思路大致是对的,但是一直wa,好像是当a+b+c<=2的时候需要特判,然后其他情况就贪心就好了。另外一个思路和这个差不多,也是贪心,比如说遇到了AB,如果次数的a>b,那就选择B,如果a<b那就选择A,如果A=B,这就要考虑一个概率问题了,如果s[i+1]中存在A我们就选择A,否 ...
                            
                            
                                分类:
其他好文   时间:
2020-05-04 21:33:13   
                                阅读次数:
117
                             
                    
                        
                            
                            
                                45. 跳跃游戏 II 题目来源: "https://leetcode cn.com/problems/jump game ii" 题目 给定一个非负整数数组,你最初位于数组的第一个位置。 数组中的每个元素代表你在该位置可以跳跃的最大长度。 你的目标是使用最少的跳跃次数到达数组的最后一个位置。 示例 ...
                            
                            
                                分类:
编程语言   时间:
2020-05-04 17:19:00   
                                阅读次数:
66
                             
                    
                        
                            
                            
                                地址 https://leetcode-cn.com/problems/jump-game/ 给定一个非负整数数组,你最初位于数组的第一个位置。 数组中的每个元素代表你在该位置可以跳跃的最大长度。 判断你是否能够到达最后一个位置。 示例 1: 输入: [2,3,1,1,4] 输出: true 解释: ...
                            
                            
                                分类:
其他好文   时间:
2020-05-04 13:36:25   
                                阅读次数:
53
                             
                    
                        
                            
                            
                                    linux中grep的用法详解 grep (global search regular expression(RE) and print out the line,全面搜索正则表达式并把行打印出来)是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹配的行打印出来。 Unix的grep家族包 ...
                            
                            
                                分类:
系统相关   时间:
2020-05-03 12:15:07   
                                阅读次数:
94
                             
                    
                        
                            
                            
                                    "http://test.ctf8.com/" level1 借助window.alert()函数完成任务 level2 输入框输入test后 Ctrl+g搜索源码中的test,发现有两处 分别构造以下两个payload 第二个奏效 level3 同样的方式 构造payload为 发现 源代码用 处 ...
                            
                            
                                分类:
其他好文   时间:
2020-05-02 20:47:57   
                                阅读次数:
155
                             
                    
                        
                            
                            
                                    Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game, player #1  ...
                            
                            
                                分类:
其他好文   时间:
2020-05-02 14:51:55   
                                阅读次数:
49