# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
294029 | Saboon | 늑대인간 (IOI18_werewolf) | C++17 | 3119 ms | 148332 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "werewolf.h"
#include <bits/stdc++.h>
using namespace std;
const int maxn = 4e5 + 10;
const int N = 2e5 + 10;
vector<int> fex[N], fen[N];
void addinit(int x, int y){ // 0-index
x ++, y ++;
for (; x < N; x += x & -x)
fex[x].push_back(y);
}
void add(int x, int y){
x ++, y ++;
for (; x < N; x += x & -x){
int idy = lower_bound(fex[x].begin(),fex[x].end(),y)-fex[x].begin()+1;
for (; idy < fen[x].size(); idy += idy & -idy)
fen[x][idy] ++;
}
}
int get(int x, int y){
x ++, y ++;
int ret = 0;
for (; x; x -= x & -x){
int idy = upper_bound(fex[x].begin(),fex[x].end(),y)-fex[x].begin();
for (; idy; idy -= idy & -idy)
ret += fen[x][idy];
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |