# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
65618 | 2018-08-08T09:20:58 Z | daniel_02 | 말 (IOI15_horses) | C++17 | 1500 ms | 8476 KB |
#include "horses.h" #include "bits/stdc++.h" #define ll long long using namespace std; const int MOD = 1e9 + 7; const int sz = 5e5 + 7; int n, x[sz], y[sz]; int init(int N, int X[], int Y[]) { long double h = 0; ll cur = 1; long double ans = 0; ll ans1; n = N; for (int i = 0; i < N; i++) { x[i] = X[i]; y[i] = Y[i]; h += log10(x[i]); cur = (cur * x[i]) % MOD; if (ans * 1.0 < h + log10(y[i])) { ans = log10(y[i]) + h; ans1 = (y[i] * 1LL * cur) % MOD; } } return (ans1 % MOD); } int updateX(int pos, int val) { x[pos] = val; return init(n, x, y); } int updateY(int pos, int val) { y[pos] = val; return init(n, x, y); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 248 KB | Output is correct |
2 | Correct | 5 ms | 356 KB | Output is correct |
3 | Correct | 3 ms | 356 KB | Output is correct |
4 | Correct | 3 ms | 432 KB | Output is correct |
5 | Correct | 3 ms | 432 KB | Output is correct |
6 | Correct | 4 ms | 508 KB | Output is correct |
7 | Correct | 3 ms | 508 KB | Output is correct |
8 | Correct | 2 ms | 516 KB | Output is correct |
9 | Correct | 3 ms | 516 KB | Output is correct |
10 | Correct | 4 ms | 588 KB | Output is correct |
11 | Correct | 3 ms | 620 KB | Output is correct |
12 | Correct | 3 ms | 620 KB | Output is correct |
13 | Correct | 3 ms | 620 KB | Output is correct |
14 | Correct | 2 ms | 620 KB | Output is correct |
15 | Correct | 2 ms | 620 KB | Output is correct |
16 | Correct | 2 ms | 620 KB | Output is correct |
17 | Correct | 3 ms | 620 KB | Output is correct |
18 | Correct | 3 ms | 620 KB | Output is correct |
19 | Correct | 5 ms | 620 KB | Output is correct |
20 | Correct | 3 ms | 620 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 620 KB | Output is correct |
2 | Correct | 3 ms | 620 KB | Output is correct |
3 | Correct | 3 ms | 620 KB | Output is correct |
4 | Correct | 3 ms | 620 KB | Output is correct |
5 | Correct | 3 ms | 620 KB | Output is correct |
6 | Correct | 2 ms | 620 KB | Output is correct |
7 | Correct | 3 ms | 620 KB | Output is correct |
8 | Correct | 3 ms | 620 KB | Output is correct |
9 | Correct | 3 ms | 620 KB | Output is correct |
10 | Correct | 3 ms | 620 KB | Output is correct |
11 | Correct | 3 ms | 620 KB | Output is correct |
12 | Correct | 3 ms | 620 KB | Output is correct |
13 | Correct | 3 ms | 620 KB | Output is correct |
14 | Correct | 3 ms | 620 KB | Output is correct |
15 | Correct | 4 ms | 620 KB | Output is correct |
16 | Correct | 3 ms | 620 KB | Output is correct |
17 | Correct | 3 ms | 620 KB | Output is correct |
18 | Correct | 3 ms | 620 KB | Output is correct |
19 | Correct | 2 ms | 620 KB | Output is correct |
20 | Correct | 3 ms | 620 KB | Output is correct |
21 | Correct | 4 ms | 620 KB | Output is correct |
22 | Correct | 3 ms | 620 KB | Output is correct |
23 | Correct | 112 ms | 644 KB | Output is correct |
24 | Correct | 103 ms | 644 KB | Output is correct |
25 | Correct | 168 ms | 844 KB | Output is correct |
26 | Correct | 147 ms | 844 KB | Output is correct |
27 | Correct | 59 ms | 844 KB | Output is correct |
28 | Correct | 123 ms | 844 KB | Output is correct |
29 | Incorrect | 46 ms | 844 KB | Output isn't correct |
30 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1563 ms | 8476 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 8476 KB | Output is correct |
2 | Correct | 3 ms | 8476 KB | Output is correct |
3 | Correct | 5 ms | 8476 KB | Output is correct |
4 | Correct | 4 ms | 8476 KB | Output is correct |
5 | Correct | 3 ms | 8476 KB | Output is correct |
6 | Correct | 3 ms | 8476 KB | Output is correct |
7 | Correct | 3 ms | 8476 KB | Output is correct |
8 | Correct | 3 ms | 8476 KB | Output is correct |
9 | Correct | 3 ms | 8476 KB | Output is correct |
10 | Correct | 3 ms | 8476 KB | Output is correct |
11 | Correct | 3 ms | 8476 KB | Output is correct |
12 | Correct | 2 ms | 8476 KB | Output is correct |
13 | Correct | 3 ms | 8476 KB | Output is correct |
14 | Correct | 3 ms | 8476 KB | Output is correct |
15 | Correct | 5 ms | 8476 KB | Output is correct |
16 | Correct | 3 ms | 8476 KB | Output is correct |
17 | Correct | 3 ms | 8476 KB | Output is correct |
18 | Correct | 4 ms | 8476 KB | Output is correct |
19 | Correct | 3 ms | 8476 KB | Output is correct |
20 | Correct | 3 ms | 8476 KB | Output is correct |
21 | Correct | 2 ms | 8476 KB | Output is correct |
22 | Correct | 3 ms | 8476 KB | Output is correct |
23 | Correct | 107 ms | 8476 KB | Output is correct |
24 | Correct | 97 ms | 8476 KB | Output is correct |
25 | Correct | 156 ms | 8476 KB | Output is correct |
26 | Correct | 141 ms | 8476 KB | Output is correct |
27 | Correct | 64 ms | 8476 KB | Output is correct |
28 | Correct | 120 ms | 8476 KB | Output is correct |
29 | Incorrect | 46 ms | 8476 KB | Output isn't correct |
30 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 8476 KB | Output is correct |
2 | Correct | 3 ms | 8476 KB | Output is correct |
3 | Correct | 2 ms | 8476 KB | Output is correct |
4 | Correct | 3 ms | 8476 KB | Output is correct |
5 | Correct | 2 ms | 8476 KB | Output is correct |
6 | Correct | 3 ms | 8476 KB | Output is correct |
7 | Correct | 2 ms | 8476 KB | Output is correct |
8 | Correct | 3 ms | 8476 KB | Output is correct |
9 | Correct | 3 ms | 8476 KB | Output is correct |
10 | Correct | 4 ms | 8476 KB | Output is correct |
11 | Correct | 3 ms | 8476 KB | Output is correct |
12 | Correct | 3 ms | 8476 KB | Output is correct |
13 | Correct | 4 ms | 8476 KB | Output is correct |
14 | Correct | 4 ms | 8476 KB | Output is correct |
15 | Correct | 3 ms | 8476 KB | Output is correct |
16 | Correct | 2 ms | 8476 KB | Output is correct |
17 | Correct | 2 ms | 8476 KB | Output is correct |
18 | Correct | 3 ms | 8476 KB | Output is correct |
19 | Correct | 3 ms | 8476 KB | Output is correct |
20 | Correct | 2 ms | 8476 KB | Output is correct |
21 | Correct | 3 ms | 8476 KB | Output is correct |
22 | Correct | 3 ms | 8476 KB | Output is correct |
23 | Correct | 98 ms | 8476 KB | Output is correct |
24 | Correct | 93 ms | 8476 KB | Output is correct |
25 | Correct | 140 ms | 8476 KB | Output is correct |
26 | Correct | 155 ms | 8476 KB | Output is correct |
27 | Correct | 63 ms | 8476 KB | Output is correct |
28 | Correct | 142 ms | 8476 KB | Output is correct |
29 | Incorrect | 47 ms | 8476 KB | Output isn't correct |
30 | Halted | 0 ms | 0 KB | - |