
SPOJ
文章平均质量分 86
WeYoungg
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
DRUIDEOI
题目链接:http://www.spoj.com/problems/DRUIDEOI/ 题意大概是给定n个数字,找到每一个数字左边第一个比他大的数字,再找到右边第一个比他大的数字。输出他们的位置,如果不存在就输出-1 而且构成一个环,也就是说比如1 3 3 3,那么第一个数字的答案则是,4,2。 n 这个n有点大,暴力显然是不太行的,肯定时间上是不接受的。之前学过单调栈这个原创 2017-02-01 23:58:58 · 397 阅读 · 0 评论 -
LEXSTR
题目链接:http://www.spoj.com/problems/LEXSTR/ 题意是给一个字符串str,然后给出m个数对 i , j; 代表str[i] 和 str[j] 可以互相之间交换任意次 ,然后问如何交换使得这个字符串的字典序最小,输出这个字典序最小的字符串。 字符串长度是1e5. 一开始我这样想:如给两个数对(i,j)、(i,k),那么j和k也是可以交换的,但是稍微看一下就知原创 2017-02-02 00:25:36 · 332 阅读 · 0 评论 -
SPOJ Ada and Field
题目链接:http://www.spoj.com/problems/ADAFIELD/en/ ADAFIELD - Ada and Field Ada the Ladybug owns a beautiful field where she grows vegetables. She often visits local Farmers Market, where原创 2017-04-04 22:55:43 · 564 阅读 · 0 评论 -
SPOJ FACVSPOW - Factorial vs Power
FACVSPOW - Factorial vs Power #math #binary-search Consider two integer sequences f(n) = n! and g(n) = an, where n is a positive integer. For any integer a > 1 the second sequence is gre原创 2017-02-23 17:15:17 · 633 阅读 · 0 评论