Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- using namespace std;
- //слава иисусу христу
- int main()
- {
- int N, k = 0;
- cin >> N;
- string s[100];
- for (int i = 0; i < N; i++) {
- cin >> s[i];
- }
- int a=0,b=1;
- for (int i = 0; i < N; i++) {
- if(a!=b){
- if(i+1==N){
- cout << s[i];
- a++;
- }else{
- cout << s[i] << " ";
- a++;
- }
- }else {
- b++;
- a=0;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement