# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
833538 | 2023-08-22T06:43:27 Z | vjudge1 | Exam (eJOI20_exam) | C++17 | 12 ms | 468 KB |
#include <bits/stdc++.h> using namespace std; const int MAXN = 1e5 + 10; const int INF = INT_MAX; const long long LINF = LLONG_MAX; const int MOD = 1e9 + 7; const int MOD2 = 998244353; void solv(){ int n; cin >> n; int h[n], t[n]; for(int i = 0; i < n; i++)cin >> h[i]; for(int i = 0; i < n; i++)cin >> t[i]; int temp = t[0]; int ans = 0; int nyala[n] = {}; int now = 0; bool cashin = false; for(int i = 0; i < n; i++){ if(h[i] < temp){ now++; } if(h[i] == temp){ now++; cashin = true; } if(h[i] > temp){ if(cashin){ ans += now; cashin = false; } now = 0; } } cout << ans << endl; } int main(){ int tc = 1; // cin >> tc; while(tc--)solv(); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Incorrect | 12 ms | 468 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 340 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |