- 博客(5)
- 问答 (1)
- 收藏
- 关注
原创 数独小游戏
无聊之余,写了一些小游戏(当然,也有参考别人的代码),当作练手打发时间 (本数独可能并不平衡,可能存在多解,提示功能只提供最基本的提示,避免依赖提示) import random import math sudoku = [] # 生成一个随机的数组 def random_list(): num_list = [1, 2, 3, 4, 5, 6, 7, 8, 9] random.shuffle(num_list) return num_list def print_g
2020-07-17 16:36:21
251
原创 ZOJ1004 python AC
周末就松懈了,周一继续码题练手 ZOJ1004:https://zoj.pintia.cn/problem-sets/91827364500/problems/91827364503 以后就不放原题了,链接直接看 大致题意: 每次输入两行字符串,第一行字符串通过栈操作变形成第二串字符串,输出所有操作方案,以及每种方案的步骤 规定的栈操作有两种: 1) i: 入栈操作,将第一行字符串中首字母压入栈 2) o: 出栈操作,将栈首字母出栈 例子: madam adamm...
2020-05-25 18:23:48
372
原创 ZOJ1003 python AC
又一题愉快的暴搜(深搜),不过对python使用递推还是有点不习惯,python的参数传递方式和C++差的有点多 好了,上题目 ZOJ1003 Crashing Balloon Time Limit: 2000 msMemory Limit: 65536 KB On every June 1st, the Children's Day, there will be a game named "crashing balloon" on TV. The rule is very simple...
2020-05-22 15:25:03
345
原创 ZOJ1002 python AC
ZOJ1002:https://zoj.pintia.cn/problem-sets/91827364500/problems/91827364501 Fire Net Time Limit: 2000 msMemory Limit: 65536 KB Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each re
2020-05-21 15:13:01
492
原创 ZOJ1001 python AC
日常无聊打发时间,刷刷题,由于不记得以前的号了,正好重新码起,以前都是用C++做题的,现在使用python3.8,复习复习算法的过程中顺便熟悉熟悉python的使用,第一篇多说点,后面就不说明了。 好了,进入正题 ZOJ1001 A + B Problem Time Limit: 2000 msMemory Limit: 65536 KB Calculate a + b Input The input will consist of a series of pa...
2020-05-21 15:01:28
443
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人