# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
503511 | InternetPerson10 | Group Photo (JOI21_ho_t3) | C++17 | 768 ms | 313296 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll BIG = 1234567891234567890;
ll ans[5001];
ll dp[5001][5001];
ll permute_people[5001][5001]; // Permute people [i, j] once they are already on the left
ll push_people[5001][5001]; // Push people [i, j] to the left
struct FTree {
vector<int> nums;
int size = 1;
void init(int n) {
vector<int>().swap(nums);
size = 1;
while(size <= n) size *= 2;
nums.resize(size+1);
}
void add(int n, int k) {
while(n <= size) {
nums[n] += k;
n += (n & (-n));
}
}
int sum(int n) {
int ans = 0;
while(n) {
# | 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... |