Submission #1014743

# Submission time Handle Problem Language Result Execution time Memory
1014743 2024-07-05T12:28:43 Z saayan007 Watering can (POI13_kon) C++17
0 / 100
4000 ms 12624 KB
using namespace std;
const int mxn = 3e5 + 10;
int diff[mxn];
int n, k;
int d[mxn];
int ans[mxn] = {};
bool comp = 0;

void inicjuj(int N, int K, int *D)
{
    n = N, k = K;
    for(int i = 0; i < N; ++i) {
        d[i + 1] = D[i];
    }
}

void podlej(int a, int b)
{
    ++b, ++a;
    ++diff[a], --diff[b + 1];
}

int dojrzale(int a, int b)
{
    ++b, ++a;
    if(!comp) {
        for(int i = 1; i <= n; ++i) {
            diff[i] += diff[i - 1];
            d[i] += diff[i];
            ans[i] = ans[i - 1] + (d[i] >= k ? 1 : 0);
        }
    }
    return ans[b] - ans[a - 1];
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 1368 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 1628 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1594 ms 3672 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2676 ms 4320 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4006 ms 4912 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4033 ms 7248 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4045 ms 5192 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4043 ms 9960 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4019 ms 8272 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4030 ms 12624 KB Time limit exceeded
2 Halted 0 ms 0 KB -