# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
197686 | dennisstar | Long Mansion (JOI17_long_mansion) | C++17 | 557 ms | 56440 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define eb emplace_back
#define all(V) (V).begin(), (V).end()
using namespace std;
typedef vector<int> vim;
int N, Q;
vim C, B, A[500010], pos[500010];
vim l, r;
int Xk, Yk, lb;
inline bool Find(int L, int R, int X) {
lb=lower_bound(all(pos[X]), L)-pos[X].begin();
return (lb<pos[X].size()&&pos[X][lb]<=R);
}
int main() {
scanf("%d", &N);
C.resize(N); B.resize(N+1); l.resize(N+1); r.resize(N+1);
for (int i=1; i<N; i++) scanf("%d", &C[i]);
for (int i=1; i<=N; i++) {
scanf("%d", &B[i]);
A[i].resize(B[i]);
for (auto &j:A[i]) scanf("%d", &j);
for (auto &j:A[i]) pos[j].eb(i);
}
for (int i=1; i<=N; i++) {
l[i]=r[i]=i;
for (int fl; ; ) {
fl=0;
컴파일 시 표준 에러 (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... |