随笔分类 -  基础算法——搜索

摘要:https://www.luogu.org/problem/show?pid=3395 题目背景 此题约为NOIP提高组Day1T1难度。 题目描述 B君站在一个n*n的棋盘上。最开始,B君站在(1,1)这个点,他要走到(n,n)这个点。 B君每秒可以向上下左右的某个方向移动一格,但是很不妙,C君打 阅读全文
posted @ 2017-10-25 15:08 Aptal丶 阅读(314) 评论(0) 推荐(0)
摘要:http://www.lydsy.com/JudgeOnline/problem.php?id=1611 Time Limit: 5 Sec Memory Limit: 64 MBSubmit: 1737 Solved: 739[Submit][Status][Discuss] Descriptio 阅读全文
posted @ 2017-10-23 17:59 Aptal丶 阅读(189) 评论(0) 推荐(0)
摘要:1 //电脑蓝屏,三个题60分暴力全部丢失。。 noip提高组模拟赛 1.计数 (count.cpp/c/pas) 时间限制:1s 内存限制:256MB 【问题描述】 给出m个数a[1],a[2],…,a[m] 求1~n中有多少数不是a[1],a[2],…,a[m]的倍数。 【输入】 输入文件名为c 阅读全文
posted @ 2017-10-12 09:18 Aptal丶 阅读(287) 评论(0) 推荐(0)
摘要:NOIP 模拟赛2017 年10 ⽉5 ⽇题⽬名称拼不出的数整除钻⽯可执⾏⽂件名lost div diamond输⼊⽂件名lost.in div.in diamond.in输出⽂件名lost.out div.out diamond.out每个测试点时限1 秒1 秒1 秒内存限制256MB 256MB 阅读全文
posted @ 2017-10-09 22:13 Aptal丶 阅读(357) 评论(0) 推荐(0)
摘要:P97zhx: 竞赛时间:???? 年?? 月?? 日??:??-??:??题目名称 a b c名称 a b c输入 a.in b.in c.in输出 a.out b.out c.out每个测试点时限 1s 1s 1s内存限制 256MB 256MB 256MB测试点数目 10 80 10每个测试点 阅读全文
posted @ 2017-10-09 20:33 Aptal丶 阅读(263) 评论(0) 推荐(0)
摘要:http://codevs.cn/problem/2956/ 时间限制: 1 s 空间限制: 32000 KB 题目等级 : 黄金 Gold 题解 查看运行结果 http://codevs.cn/problem/2956/ 时间限制: 1 s 空间限制: 32000 KB 题目等级 : 黄金 Gol 阅读全文
posted @ 2017-09-25 19:57 Aptal丶 阅读(256) 评论(2) 推荐(0)
摘要:https://www.luogu.org/problem/show?pid=1657 题目描述 学校放寒假时,信息学奥赛辅导老师有1,2,3……x本书,要分给参加培训的x个人,每人只能选一本书,但是每人有两本喜欢的书。老师事先让每个人将自己喜欢的书填写在一张表上。然后根据他们填写的表来分配书本,希 阅读全文
posted @ 2017-09-25 17:20 Aptal丶 阅读(395) 评论(0) 推荐(0)
摘要:https://www.luogu.org/problem/show?pid=1825 题目描述 This past fall, Farmer John took the cows to visit a corn maze. But this wasn't just any corn maze: i 阅读全文
posted @ 2017-09-25 17:04 Aptal丶 阅读(296) 评论(0) 推荐(0)
摘要:https://www.luogu.org/problem/show?pid=2919 题目描述 The farm has many hills upon which Farmer John would like to place guards to ensure the safety of his 阅读全文
posted @ 2017-09-25 14:27 Aptal丶 阅读(210) 评论(0) 推荐(0)
摘要:https://www.luogu.org/problem/show?pid=2658 题目描述 博艾市将要举行一场汽车拉力比赛。 赛场凹凸不平,所以被描述为M*N的网格来表示海拔高度(1≤ M,N ≤500),每个单元格的海拔范围在0到10^9之间。 其中一些单元格被定义为路标。组织者希望给整个路 阅读全文
posted @ 2017-09-24 21:18 Aptal丶 阅读(246) 评论(0) 推荐(0)
摘要:https://www.luogu.org/problem/show?pid=2049 题目描述 在一个M*N的魔术棋盘中,每个格子中均有一个整数,当棋子走进这个格子中,则此棋子上的数会被乘以此格子中的数。一个棋子从左上角走到右下角,只能向右或向下行动,请问此棋子走到右下角后,模(mod)K可以为几 阅读全文
posted @ 2017-09-22 17:40 Aptal丶 阅读(219) 评论(0) 推荐(0)
摘要:https://vjudge.net/problem/UVA-1575 枚举答案(k)、、对k质因数分解,质数的指数为cnt[i],若n==A(tot_cnt,tot_cnt) / A(cnt[i]>1),则该ans=k 1 #include <cstring> 2 #include <cstdio 阅读全文
posted @ 2017-09-22 17:06 Aptal丶 阅读(244) 评论(0) 推荐(0)
摘要:https://daniu.luogu.org/problem/show?pid=1379 题目描述 在3×3的棋盘上,摆有八个棋子,每个棋子上标有1至8的某一数字。棋盘中留有一个空格,空格用0来表示。空格周围的棋子可以移到空格中。要求解的问题是:给出一种初始布局(初始状态)和目标布局(为了使题目简 阅读全文
posted @ 2017-09-21 14:03 Aptal丶 阅读(279) 评论(0) 推荐(0)
摘要:https://www.luogu.org/problem/show?pid=1034 题目描述 在平面上有 n 个点(n <= 50),每个点用一对整数坐标表示。例如:当 n=4 时,4个点的坐标分另为:p1(1,1),p2(2,2),p3(3,6),P4(0,7),见图一。 这些点可以用 k 个 阅读全文
posted @ 2017-09-20 16:54 Aptal丶 阅读(263) 评论(0) 推荐(0)
摘要:http://codevs.cn/problem/1049/ 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题解 查看运行结果 http://codevs.cn/problem/1049/ 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 G 阅读全文
posted @ 2017-09-18 17:48 Aptal丶 阅读(180) 评论(0) 推荐(0)
摘要:http://codevs.cn/problem/2969/ 时间限制: 1 s 空间限制: 32000 KB 题目等级 : 黄金 Gold 题解 查看运行结果 http://codevs.cn/problem/2969/ 时间限制: 1 s 空间限制: 32000 KB 题目等级 : 黄金 Gol 阅读全文
posted @ 2017-09-18 17:19 Aptal丶 阅读(276) 评论(0) 推荐(0)
摘要:https://www.luogu.org/problem/show?pid=1092 题目描述 所谓虫食算,就是原先的算式中有一部分被虫子啃掉了,需要我们根据剩下的数字来判定被啃掉的字母。来看一个简单的例子: http://paste.ubuntu.com/25448822/ 其中#号代表被虫子啃 阅读全文
posted @ 2017-09-18 15:21 Aptal丶 阅读(231) 评论(0) 推荐(0)
摘要:https://www.luogu.org/problem/show?pid=3576 题目描述 The ants are scavenging an abandoned ant hill in search of food. The ant hill has nn chambers and n-1 阅读全文
posted @ 2017-09-14 22:20 Aptal丶 阅读(325) 评论(0) 推荐(0)
摘要:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1109 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注 https://www.51nod.com/onlineJudge/ 阅读全文
posted @ 2017-09-14 20:57 Aptal丶 阅读(236) 评论(0) 推荐(0)
摘要:https://www.luogu.org/problem/show?pid=2386 题目背景 (poj1664) 题目描述 把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分发(5,1,1和1,1,5是同一种方法) 输入输出格式 输入格式: 第一行是测试数据的数目t 阅读全文
posted @ 2017-09-13 20:24 Aptal丶 阅读(342) 评论(0) 推荐(0)