感觉很多题和leetcode相似1.火车 #include <bits/stdc++.h> //int t; using namespace std; int t; int a[50001]; int b[50001]; int n; stack<int>st; int main() { scanf("%d",&t); while(t --){ while(!st.empty())st.pop(); scanf("%d",&n); for(int i = 0; i < n; i++){ scanf("%d",&a[i]); } f...