poj 4044 Score Sequence(暴力)】的更多相关文章

http://poj.org/problem?id=4044 大致题意:给出两个班级的成绩,先按降序排序,而且没有成绩同样的.然后求连续的最长公共子序列.输出时,先输出最长公共子序列,然后按个位数字递增的顺序输出,若各位数字一样就按成绩递增. 人数小于30,注意去重,直接暴力就可以. #include <stdio.h> #include <iostream> #include <map> #include <stack> #include <vect…
题目链接 题意 :给你两个序列,进行降序排序,找出连续的公共子序列,将这个子序列输出,然后对个位数升序排序,如果个位数相同就按数的大小排,再输出这个新排好的. 思路 :先排序,再找公共子序列,最后个位排序输出. #include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> using namespace std; ],a2[] ; ],b2[] ; bool c…
id=1699" target="_blank" style="">题目链接:poj 1699 Best Sequence 题目大意:给定N个DNA序列,问说最少多长的字符串包括全部序列. 解题思路:AC自己主动机+状压DP,先对字符串构造AC自己主动机.然后在dp[s][i]表示匹配了s.移动到节点i时候的最短步数. #include <cstdio> #include <cstring> #include <queu…
[poj P1141] Brackets Sequence Time Limit: 1000MS   Memory Limit: 65536K   Special Judge Description Let us define a regular brackets sequence in the following way: 1. Empty sequence is a regular sequence. 2. If S is a regular sequence, then (S) and […
一.题目大意 有这样一个序列包含S1,S2,S3...SK,每一个Si包括整数1到 i.求在这个序列中给定的整数n为下标的数. 例如,前80位为11212312341234512345612345671234567812345678912345678910123456789101112345678910,第8位为2. 二.题解 动手做这道题之前要了解所求的是第n位而不是某一个Si中的第几个数,一位数占一位,两位数占两位,三位占三位...由于每一组都比前一组多一个数,如果这个数是一位数,则该组数的…
 名字是法雷数列其实是欧拉phi函数              Farey Sequence Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11246   Accepted: 4363 Description The Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 <…
A - Farey Sequence Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submit Status Practice POJ 2478 Description The Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 &l…
DNA Sequence Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 9899   Accepted: 3717 Description It's well known that DNA Sequence is a sequence only contains A, C, T and G, and it's very useful to analyze a segment of DNA Sequence,For exa…
题目链接:http://poj.org/problem?id=2021 思路分析:由于数据较小,采用O(N^2)的暴力算法,算出所有后代的年龄,再排序输出. 代码分析: #include <iostream> #include <string.h> #include <algorithm> using namespace std; #define MAX_N ( 100 + 10 ) typedef struct Descendant { ]; int Age; }De…
Max Sequence Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 17678   Accepted: 7401 Description Give you N integers a1, a2 ... aN (|ai| <=1000, 1 <= i <= N).  You should output S.  Input The input will consist of several test cases.…