随笔 - 1659  文章 - 0  评论 - 100  阅读 - 188万

随笔分类 -  未解决

PAT 甲级 1010 Radix (25)(25 分)进制匹配(听说要用二分,历经坎坷,终于AC)
摘要:Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal number and 110 is 阅读全文
posted @ 2018-08-13 19:39 蔡军帅 阅读(1782) 评论(0) 推荐(0) 编辑
PTA 1004 Counting Leaves (30)(30 分)(dfs或者bfs)
摘要:A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Each input file contain 阅读全文
posted @ 2018-08-08 16:23 蔡军帅 阅读(1370) 评论(0) 推荐(0) 编辑
2017中国大学生程序设计竞赛 - 女生专场 Happy Necklace(递推+矩阵快速幂)
摘要:Happy Necklace Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1146 Accepted Submission(s): 491 阅读全文
posted @ 2018-05-23 15:37 蔡军帅 阅读(205) 评论(0) 推荐(0) 编辑
第15届浙江省赛 E LIS
摘要:DreamGrid is learning the LIS (Longest Increasing Subsequence) problem and he needs to find the longest increasing subsequence of a given sequence of 阅读全文
posted @ 2018-05-08 13:22 蔡军帅 阅读(425) 评论(0) 推荐(0) 编辑
第十五届浙江省赛 F Now Loading!!!
摘要:DreamGrid has integers . DreamGrid also has queries, and each time he would like to know the value of for a given number , where , . Input There are m 阅读全文
posted @ 2018-05-08 13:20 蔡军帅 阅读(171) 评论(0) 推荐(0) 编辑
Codeforce 101B. Buses(线段树or树状数组+离散化)
摘要:Buses time limit per test 2 seconds memory limit per test 265 megabytes input standard input output standard output Little boy Gerald studies at schoo 阅读全文
posted @ 2018-04-15 13:29 蔡军帅 阅读(538) 评论(0) 推荐(0) 编辑
codeforce -39E-What Has Dirichlet Got to Do with That?(博弈+dfs)
摘要:You all know the Dirichlet principle, the point of which is that if n boxes have no less than n + 1 items, that leads to the existence of a box in whi 阅读全文
posted @ 2018-04-15 13:26 蔡军帅 阅读(172) 评论(0) 推荐(0) 编辑
Codeforces Problem - 38E - Let's Go Rolling!(DP)
摘要:E. Let's Go Rolling! time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output E. Let's Go Rolling 阅读全文
posted @ 2018-04-15 13:19 蔡军帅 阅读(323) 评论(0) 推荐(0) 编辑
ZOJ 4016 Mergeable Stack(栈的数组实现)
摘要:Given initially empty stacks, there are three types of operations: 1 s v: Push the value onto the top of the -th stack. 2 s: Pop the topmost value out 阅读全文
posted @ 2018-04-15 13:10 蔡军帅 阅读(205) 评论(0) 推荐(0) 编辑
2018年长沙理工大学第十三届程序设计竞赛 J杯子
摘要:链接:https://www.nowcoder.com/acm/contest/96/J来源:牛客网 杯子 杯子 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 一天durong同学买了一个无限 阅读全文
posted @ 2018-04-15 12:59 蔡军帅 阅读(623) 评论(0) 推荐(0) 编辑
二叉搜索树的结构(30 分) PTA 模拟+字符串处理 二叉搜索树的节点插入和非递归遍历
摘要:二叉搜索树的结构(30 分) PTA 模拟+字符串处理 二叉搜索树的节点插入和非递归遍历 二叉搜索树的结构(30 分) 二叉搜索树或者是一棵空树,或者是具有下列性质的二叉树: 若它的左子树不空,则左子树上所有结点的值均小于它的根结点的值;若它的右子树不空,则右子树上所有结点的值均大于它的根结点的值; 阅读全文
posted @ 2018-03-29 20:35 蔡军帅 阅读(1478) 评论(0) 推荐(0) 编辑
L3-001. 凑零钱(dfs或者01背包)
摘要:L3-001. 凑零钱 时间限制 200 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 时间限制 200 ms 时间限制 200 ms 内存限制 65536 kB 内存限制 65536 kB 代码长度限制 8000 B 代码长度限制 8000 阅读全文
posted @ 2018-03-29 15:19 蔡军帅 阅读(449) 评论(0) 推荐(0) 编辑
循环赛日程表(分治)
摘要:循环赛日程表 时限:1000ms 内存限制:10000K 总时限:3000ms 描述 用分治算法生成循环赛日程表(1到2的n次方个人) 输入 一个整数n 输出 循环赛日程表(1到2的n次方个人) 输入样例 3 输出样例 1 2 3 4 5 6 7 82 1 4 3 6 5 8 73 4 1 2 7 阅读全文
posted @ 2018-03-28 17:49 蔡军帅 阅读(574) 评论(0) 推荐(0) 编辑
关于堆的判断(25 分)
摘要:关于堆的判断(25 分) 将一系列给定数字顺序插入一个初始为空的小顶堆H[]。随后判断一系列相关命题是否为真。命题分下列几种: x is the root:x是根结点; x and y are siblings:x和y是兄弟结点; x is the parent of y:x是y的父结点; x is 阅读全文
posted @ 2018-03-19 23:46 蔡军帅 阅读(343) 评论(0) 推荐(0) 编辑
PAT L3-008. 喊山(BFS)C4 初赛30分
摘要:喊山(30 分) 喊山,是人双手围在嘴边成喇叭状,对着远方高山发出“喂—喂喂—喂喂喂……”的呼唤。呼唤声通过空气的传递,回荡于深谷之间,传送到人们耳中,发出约定俗成的“讯号”,达到声讯传递交流的目的。原来它是彝族先民用来求援呼救的“讯号”,慢慢地人们在生活实践中发现了它的实用价值,便把它作为一种交流 阅读全文
posted @ 2018-03-19 23:43 蔡军帅 阅读(276) 评论(0) 推荐(0) 编辑
位数问题(dp 递推)
摘要:位数问题 题目描述 在所有的N位数中,有多少个数中有偶数个数字3?由于结果可能很大,你只需要输出这个答案对12345取余的值。 输入 读入一个数N。 输出 输出有多少个数中有偶数个数字3。 样例输入 样例输出 提示 阅读全文
posted @ 2018-03-17 23:35 蔡军帅 阅读(233) 评论(0) 推荐(0) 编辑
NOIP2005普及组第4题 循环
摘要:NOIP2005普及组第4题 循环 题目描述 乐乐是一个聪明而又勤奋好学的孩子。他总喜欢探求事物的规律。一天,他突然对数的正整数次幂产生了兴趣。 众所周知,2的正整数次幂最后一位数总是不断的在重复2,4,8,6,2,4,8,6……我们说2的正整数次幂最后一位的循环长度是4(实际上4的倍数都可以说是循 阅读全文
posted @ 2018-03-16 22:02 蔡军帅 阅读(1318) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示