Wrong Answer
Code
#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
int t;
cin >> t;
while (t--){
int n, c = 0;
cin >> n;
vector<int> a(n), b(n);
for (int i = 0; i < n; i++){
cin >> a[i];
}
for (int i = 0; i < n; i++){
cin >> b[i];
}
for (int i = 0; i + 1 < n; i++){
if (a[i] == a[i + 1] && b[i] < b[i + 1]) c++;
else break;
}
cout << n - c << endl;
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1224 Maximize the max
- Contest
- Testing - Intra LU Programming contest 25
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-08-29 21:55:57
- Judged At
- 2025-08-29 21:55:57
- Judged By
- Score
- 0
- Total Time
- 1ms
- Peak Memory
- 532.0 KiB