# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
944192 | 2024-03-12T09:51:24 Z | beepbeepsheep | 모임들 (IOI18_meetings) | C++17 | 5500 ms | 4272 KB |
#include "meetings.h" #include <bits/stdc++.h> using namespace std; #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #define ll long long const ll inf=1e18; std::vector<long long> __attribute__((optimize("O3","unroll-loops"), target("arch=sandybridge"), target("avx,avx2,fma"))) 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++){ int tot=0,cnt=0; for (int j=L[i];j<=R[i];j++){ cnt+=2-H[j]; if (tot<cnt) tot=cnt; if (H[j]==2) cnt=0; } if (tot<cnt) tot=cnt; ans.emplace_back((R[i]-L[i]+1)*2-tot); } return ans; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 329 ms | 1744 KB | Output is correct |
3 | Execution timed out | 5561 ms | 4272 KB | Time limit exceeded |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 329 ms | 1744 KB | Output is correct |
3 | Execution timed out | 5561 ms | 4272 KB | Time limit exceeded |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |