Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- using namespace std;
- typedef vector<char> VE;
- VE v;
- int n;
- void f(int i) {
- if (i == n) {
- for (int j = 0; j < n; ++j) cout << v[j];
- cout << endl;
- return;
- }
- v[i] = 'A';
- f(i + 1);
- v[i] = 'C';
- f(i + 1);
- v[i] = 'G';
- f(i + 1);
- v[i] = 'T';
- f(i + 1);
- }
- int main() {
- cin >> n;
- v = VE(n);
- f(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement