求大佬指导,不知错在哪里
#include <iostream> using namespace std; int main() { int n, m; int arr[21]; int temp; bool flag = false; cin >> n; for(int i = 0; i < n; i++) { cin >> arr[i]; } cin >> m; for(int i = 0; i < n; i++) { if(arr[i] == m && flag == false) { flag = true; continue; } else { cout << arr[i] << " "; } } cout << endl; return 0; }感觉对啊,为啥一组都过不了,求大佬指导