条件语句if....else... 1 temp=input("please input one number:") 2 guest=int(temp) 3 if guest==8: 4 print("You are lucky!") 5 print("But no prize!") 6 else: ...
分类:
编程语言 时间:
2020-01-26 14:38:58
阅读次数:
99
环境说明: 引擎版本:5.2.4 Egret Wing 4.1.6 1.下载依赖,下载地址https://github.com/egret-labs/egret-game-library/tree/master/tiled 2.新建一个游戏项目Tank 3.将上面包含tiled库的libsrc文件夹 ...
分类:
其他好文 时间:
2020-01-26 11:43:44
阅读次数:
345
https://www.luogu.org/problem/P2886 题目描述: 给出一张无向连通图,求$S$到$E$经过$k$条边的最短路。 对于一类$S$到$E$走指定数量的边数,求它的最短路或条数,都可以采用矩阵快速幂的方式解决.我们回忆一下那一个慢得惊人的$floyd$算法,将它的$dp$ ...
分类:
其他好文 时间:
2020-01-25 15:26:27
阅读次数:
78
C# 控制台应用 实现 2048游戏 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Game ...
题目链接:http://codeforces.com/contest/1293/problem/C 题目:给定一个 2*n的地图,初始地图没有岩浆,都可以走, 给定q个询问,每个询问给定一个点(x,y),每个询问有以下作用: (1)如果该点可走,则变为不可走 (2)如果该点不可走,则变为可走 问,每 ...
分类:
其他好文 时间:
2020-01-24 09:12:45
阅读次数:
56
根据题意,需要交换的部分会形成若干个不相交的环,独立处理每个环。 每个环可以用环内的最小值去和其它元素交换,或者用全局最小值和环上最小值交换,做一遍再交换回去。 #include <cstdio> #include <cstring> const int MOD = 9973; int m, n, ...
分类:
其他好文 时间:
2020-01-23 19:49:04
阅读次数:
60
链接:http://poj.org/problem?id=3278 题目: Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at ...
分类:
其他好文 时间:
2020-01-23 12:37:55
阅读次数:
96
题目 :http://poj.org/problem?id=3617 给定一个字符序列S,按一定规则输出最小字典序的结果,规则是:如果S的头部字符小于尾部字符,那么将S的头部字符加到输出字符串,然后删除这个字符,得到新的头部字符,反之同样。 输入样例 : 6 A C D B C B 输出样例 : A ...
分类:
其他好文 时间:
2020-01-22 22:22:56
阅读次数:
85
# **Catch That Cow(抓住那只奶牛)**【题意】:农场主要去追一直逃跑的牛,每次移动有三种选择,位置加一,位置减一,位置乘二,要找到最快的方法让农夫追到牛(也就是移动的次数最少,这个过程是线性的)具体的题目请见:[原题链接:](http://poj.org/problem?id=32 ...
分类:
其他好文 时间:
2020-01-22 20:13:41
阅读次数:
110
Keeping track of all the cows can be a tricky task so Farmer John has installed a system to automate it. He has installed on each cow an electronic ID ...
分类:
其他好文 时间:
2020-01-22 20:05:48
阅读次数:
73