码迷,mamicode.com
首页 >  
搜索关键字:15-puzzle problem    ( 37568个结果
FZU1683 纪念SlingShot
Problem Description 题目链接 已知 F(n)=3 * F(n-1)+2 * F(n-2)+7 * F(n-3),n>=3,其中F(0)=1,F(1)=3,F(2)=5,对于给定的每个n,输出F(0)+ F(1)+ …… + F(n) mod 2009。 Input 第一行是一整数 ...
分类:其他好文   时间:2020-04-20 01:04:32    阅读次数:38
UVa 10534 Wavio Sequence
UVa 10534 Wavio Sequence 链接:https://vjudge.net/problem/UVA-10534 思路: 分别列出每个数列的最长上升子序列(LIS)和最长下降子序列(LDS) 注:LIS(i):以a[i]结尾的最长上升子序列长度 LDS:以a[i]为开头的最长下降子序 ...
分类:其他好文   时间:2020-04-19 19:46:47    阅读次数:64
Codeforces Round #635 (Div. 2) E. Kaavi and Magic Spell 区间dp
https://codeforces.ml/contest/1337/problem/E 给出两个字符串 s和t ,字符串s的长度大于等于t的长度,和一个空字符串A; 可以执行两种操作: 1.将s的第一个字符删除并加到A字符串的前面; 2.将s的第一个字符删除并加到A字符串的后面; 求此过程中A的前 ...
分类:其他好文   时间:2020-04-19 18:01:51    阅读次数:82
A - Jungle Roads POJ - 1251
The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ag ...
分类:其他好文   时间:2020-04-19 10:48:26    阅读次数:73
728. Self Dividing Numbers
Problem : A self dividing number is a number that is divisible by every digit it contains. For example, 128 is a self dividing number because 128 % 1 ...
分类:其他好文   时间:2020-04-19 09:12:52    阅读次数:59
658. Find K Closest Elements
Problem : Given a sorted array, two integers k and x, find the k closest elements to x in the array. The result should also be sorted in ascending ord ...
分类:其他好文   时间:2020-04-19 00:38:45    阅读次数:62
693. Binary Number with Alternating Bits
Problem : Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values. Example 1: ...
分类:其他好文   时间:2020-04-18 22:43:40    阅读次数:74
「JSOI2016」灯塔(数论分块+ST做RMQ或单调栈)
https://loj.ac/problem/2074 我看到这个题的第一反应是做单调栈: $p[i] =h[j]+\sqrt{|i j|} h[i]$ 就$sqrt$这函数吧,也是单调的,性质应该和直线差不多,所以单调队列维护交点单调的若干条曲线。 求交点可以用二分求,时间复杂度是$O(n~log ...
分类:Web程序   时间:2020-04-18 22:33:57    阅读次数:80
697. Degree of an Array
Problem : Given a non empty array of non negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elemen ...
分类:其他好文   时间:2020-04-18 18:27:07    阅读次数:49
Codeforces Global Round 7 D2. Prefix-Suffix Palindrome (Hard version)(Manacher算法+输出回文字符串)
This is the hard version of the problem. The difference is the constraint on the sum of lengths of strings and the number of test cases. You can make ...
分类:编程语言   时间:2020-04-18 14:10:40    阅读次数:87
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!