# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
906576 | LucaIlie | Chorus (JOI23_chorus) | C++17 | 5789 ms | 137328 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define int long long
using namespace std;
struct DP {
long long minSwaps;
int minGroups, maxGroups;
DP operator + ( DP x ) {
return { minSwaps + x.minSwaps, minGroups + x.minGroups, maxGroups + x.maxGroups };
}
DP operator * ( DP x ) {
if ( minSwaps < x.minSwaps )
return *this;
if ( minSwaps > x.minSwaps )
return x;
return { minSwaps, min( minGroups, x.minGroups ), max( maxGroups, x.maxGroups ) };
}
};
const int MAX_N = 1e6;
const long long INF = 1e18;
int a[MAX_N + 1], countLowerA[MAX_N + 1];
long long sumA[MAX_N + 1], sumLowerA[MAX_N + 1];
DP dp[MAX_N + 1];
struct func {
long long a, b;
int valmin, valmax;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |