B. Sereja and Suffixes】的更多相关文章

B. Sereja and Suffixes Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/problemset/problem/368/B Description Sereja has an array a, consisting of n integers a1, a2, ..., an. The boy cannot sit and do nothing, he decided to study an…
Sereja and Suffixes Time Limit:1000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Description Sereja has an array a, consisting of n integers a1, a2, ..., an. The boy cannot sit and do nothing, he decided to study an arr…
B. Sereja and Suffixes time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Sereja has an array a, consisting of n integers a1, a2, ..., an. The boy cannot sit and do nothing, he decided to stud…
http://codeforces.com/problemset/problem/368/B B. Sereja and Suffixes time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Sereja has an array a, consisting of n integers a1, a2, ..., an. The bo…
#include <iostream> #include <vector> #include <algorithm> #include <set> using namespace std; int main(){ int n,m; cin >> n >>m; vector<int> a(n),l(m); ; i < n ; ++ i) cin >>a[i]; ; i < m; ++ i) cin &…
题意:给你一个序列,问你从l位置到结尾有多少个不同的数字. 水题,设dp[i]表示从i位置到结尾不同数字的个数,那么dp[i] = dp[i+1] + (vis[a[i]] == 0),在O(n)时间内得出答案. #include<cstdio> #include<string> #include<cstring> #include<iostream> #include<algorithm> using namespace std; const…
Codeforces Round #215 (Div. 2) B:http://codeforces.com/problemset/problem/368/B 题意:给你一个序列,然后查询i--n中没有重复元素的个数. 题解:从右到左递推一遍可以了,很简单的递推. #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; ; i…
http://codeforces.com/contest/368/problem/B 从后往前找一遍就可以. #include <cstdio> #include <cstring> #include <algorithm> #define maxn 200000 using namespace std; int dp[maxn]; int n,m; int a[maxn]; bool vis[maxn]; int main() { while(scanf("…
C. Sereja and Brackets time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Sereja has a bracket sequence s1, s2, ..., sn, or, in other words, a string s of length n, consisting of characters "(…
当前makefile或shell内支持文件后缀的类型列表,意思是文件支持.cpp结尾的类型,并且将他,输出到OUTPUT_FILE函数. 见网上有人说: “makefile中 .SUFFIXES: .o .cpp .c .cpp.o        ------------: 什么意思 有人说就是连接后缀,把.o .cpp .c .cpp.o 这些文件连接起来编译” .SUFFIXES 预定义隐含规则,makefile  的规则, 下一篇将转载MAKEFILE 的介绍.…