# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
396806 | rainboy | 말 (IOI15_horses) | C11 | 152 ms | 30916 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "horses.h"
#include <string.h>
#define N 500000
#define N_ (1 << 19) /* N_ = pow2(ceil(log2(N))) */
#define MD 1000000007
#define INF 0x3f3f3f3f
long long min(long long a, long long b) { return a < b ? a : b; }
int xx[N], yy[N], pp[N_ * 2], qq[N_ * 2], suf_[N_ * 2], prod[N_ * 2], prod_[N_ * 2], n_;
void pul(int i) {
int l = i << 1, r = l | 1;
prod[i] = min((long long) prod[l] * prod[r], INF);
prod_[i] = (long long) prod_[l] * prod_[r] % MD;
if (pp[r] == 0 || ((long long) pp[l] * qq[r]) / ((long long) qq[l] * pp[r]) >= prod[r])
pp[i] = pp[l], qq[i] = qq[l] * prod[r], suf_[i] = suf_[l];
else
pp[i] = pp[r], qq[i] = qq[r], suf_[i] = (long long) prod_[l] * suf_[r] % MD;
}
int init(int n, int *xx_, int *yy_) {
int i;
memcpy(xx, xx_, n * sizeof *xx_), memcpy(yy, yy_, n * sizeof *yy_);
n_ = 1;
while (n_ < n)
n_ <<= 1;
컴파일 시 표준 에러 (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |