第三题的测试数据到底都有啥呀,老是过不了全部= = 有无什么
第三题的测试数据到底都有啥呀,老是过不了全部= = 有无什么问题
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n, H, A; cin >> n >> H >> A; vector<int> h(n); vector<int> a(n); for (int i = 0; i < n; i++) { cin >> h[i]; } for (int i = 0; i < n; i++) { cin >> a[i]; } int max = 0; for (int i = 0; i < n; i++) { if (A <=a[i] || H <=h[i]) { continue; } H = h[i]; A = a[i]; max++; } cout << max << endl; return 0; }
}