cpp-ru/ideas

why one of my inputs is empty?

Huseyn201 opened this issue · 0 comments

my input:
3
gr
sud
abc

#include <bits/stdc++.h>
using namespace std;

int main() {
    ios_base::sync_with_stdio(0);
    int n;
    cin>>n;
    string a[1000];
    string s,b;
    for(int i=0;i<n;i++)
    {
        getline(cin,b);
        a[i]=b;
    }
}