Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define endl '\n'
- #define sz(x) int(x.size())
- #define all(x) x.begin(), x.end()
- int main() {
- ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
- int n;
- cin >> n;
- vector<string> names(n);
- for (int i = 0; i < n; i++) {
- cin >> names[i];
- }
- vector<string> song = {
- "Happy", "birthday", "to", "you",
- "Happy", "birthday", "to", "you",
- "Happy", "birthday", "to", "Rujia",
- "Happy", "birthday", "to", "you"
- };
- int m = sz(song);
- bool done = false;
- int i = 0;
- while (!done) {
- for (int j = 0; j < m; j++) {
- cout << names[i++] << ": " << song[j] << endl;
- i %= n;
- done |= (i == 0);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement