# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
944184 | 2024-03-12T09:42:52 Z | beepbeepsheep | Meetings (IOI18_meetings) | C++17 | 5500 ms | 3616 KB |
#include "meetings.h" #include <bits/stdc++.h> using namespace std; #pragma GCC target ("avx2") #pragma GCC optimization ("O3") #pragma GCC optimization ("unroll-loops") #define ll long long const ll inf=1e18; std::vector<long long> minimum_costs(std::vector<int> H, std::vector<int> L, std::vector<int> R) { ll n=H.size(); ll q=L.size(); vector<ll> ans; for (int i=0;i<q;i++){ ll tot=0,curr=0; for (int j=L[i];j<=R[i];j++){ if (H[j]==1) curr++; else tot=max(tot,curr),curr=0; } tot=max(tot,curr); ans.emplace_back((R[i]-L[i]+1)*2-tot); } return ans; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 192 ms | 1756 KB | Output is correct |
3 | Execution timed out | 5531 ms | 3616 KB | Time limit exceeded |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 192 ms | 1756 KB | Output is correct |
3 | Execution timed out | 5531 ms | 3616 KB | Time limit exceeded |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |