# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1166679 | xnqs | Werewolf (IOI18_werewolf) | C++20 | 474 ms | 130088 KiB |
#include <iostream>
#include <fstream>
#include <vector>
#include <queue>
#include <utility>
#include <algorithm>
#include <numeric>
#include "werewolf.h"
#include <cassert>
#include <functional>
template<typename Type>
class FenwickTree {
private:
std::vector<Type> bit;
public:
FenwickTree(int size = 0, Type val = 0) {
Assign(size, val);
}
void Assign(int size = 0, Type val = 0) {
bit.assign(size+1, 0);
if (size&&val) {
for (int i = 1; i < bit.size(); i++) {
bit[i] += val;
if (i+(i&-i)<bit.size()) {
bit[i+(i&-i)] += bit[i];
}
}
}
# | 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... |