|
0
For problem D --> why can't I use this method for taking input ? int n; cin >> n; vector a(n); for(int i=0;i<n;i++){ cin >> a[i]; } for this method it doesn't satisfy the sample i/o. exactly why I have to use this one ????--> int n; cin >> n; vector a; for(int i = 0; i < n; i++) { int x; cin >> x; if(i == 0 || x != a.back()) { a.push_back(x); } } |