1219. Symbolic Sequence
Time limit: 1.0 second
Memory limit: 64 MB
Memory limit: 64 MB
Your program is to output a sequence of 1 000 000 lowercase Latin letters. This sequence should satisfy the following restrictions:
- Every letter occurs not more than 40 000 times in the sequence;
- Every possible subsequence with two letters length occurs not more than 2 000 times;
- Every possible subsequence with three letters length occurs not more than 100 times;
Input
For this problem no input is provided.
Output
In a single line of the output write some sequence, which satisfies the properties described above.
Problem Author: Pavel Atnashev, Leonid Volkov, text by Pavel Atnashev
Problem Source: The Seventh Ural State University collegiate programming contest
Problem Source: The Seventh Ural State University collegiate programming contest
Difficulty: 120
题意:不说
分析:1、随机生成,基本上有很大概率是对的
2、随便构造一个就好,我是三个三个枚举的、。。。
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <deque>
#include <vector>
#include <queue>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <ctime>
using namespace std;
typedef long long LL;
typedef double DB;
#define For(i, s, t) for(int i = (s); i <= (t); i++)
#define Ford(i, s, t) for(int i = (s); i >= (t); i--)
#define Rep(i, t) for(int i = (0); i < (t); i++)
#define Repn(i, t) for(int i = ((t)-1); i >= (0); i--)
#define rep(i, x, t) for(int i = (x); i < (t); i++)
#define MIT (2147483647)
#define INF (1000000001)
#define MLL (1000000000000000001LL)
#define sz(x) ((int) (x).size())
#define clr(x, y) memset(x, y, sizeof(x))
#define puf push_front
#define pub push_back
#define pof pop_front
#define pob pop_back
#define ft first
#define sd second
#define mk make_pair
inline void SetIO(string Name) {
string Input = Name+".in",
Output = Name+".out";
freopen(Input.c_str(), "r", stdin),
freopen(Output.c_str(), "w", stdout);
} inline int Getint() {
int Ret = ;
char Ch = ' ';
while(!(Ch >= '' && Ch <= '')) Ch = getchar();
while(Ch >= '' && Ch <= '') {
Ret = Ret*+Ch-'';
Ch = getchar();
}
return Ret;
} int Cnt = ; inline void Input() { } inline void Solve() {
For(i, , )
printf("%c%c%c", (i/)%+'a', (i/)%+'a', i%+'a');
puts("a");
} int main() {
#ifndef ONLINE_JUDGE
SetIO("D");
#endif
Input();
Solve();
return ;
}