Submission #780258

# Submission time Handle Problem Language Result Execution time Memory
780258 2023-07-12T07:43:57 Z boris_mihov Maze (JOI23_ho_t3) C++17
8 / 100
580 ms 1138028 KB
#include <algorithm>
#include <iostream>
#include <numeric>
#include <cassert>
#include <vector>
#include <queue>

typedef long long llong;
const int MAXLOG = 23;
const int MAXN = 6000000 + 10;
const int INF  = 1e9;

struct BIT
{
    std::vector <int> tree;
    void build(int sz)
    {
        tree.resize(sz + 1, 0);
    }

    void update(int pos, int value)
    {
        for (int idx = pos ; idx < tree.size() ; idx += idx & (-idx))
        {
            tree[idx] += value;
        }
    }

    int query(int pos)
    {
        int res = 0;
        for (int idx = pos ; idx > 0 ; idx -= idx & (-idx))
        {
            res += tree[idx];
        }

        return pos - res;
    }

    int findKth(int k)
    {
        int idx = 0;
        for (int log = MAXLOG - 1 ; log >= 0 ; --log)
        {
            if (idx + (1 << log) < tree.size() && (1 << log) - tree[idx + (1 << log)] < k)
            {
                idx += (1 << log);
                k -= (1 << log) - tree[idx];
            }
        }

        return idx + 1;
    }
};

int r, c, n;
int sRow, sCol;
int eRow, eCol;
BIT byROW[MAXN];
BIT byCOL[MAXN];
std::pair <int,int> delta[] = {{-1, 0}, {0, -1}, {1, 0}, {0, 1}};
std::deque <std::pair <int,int>> dq;
std::vector <int> dist[MAXN];
std::string t[MAXN];

bool isOutside(int row, int col)
{
    return row == 0 || row == r + 1 || col == 0 || col == c + 1;
}

void setCELL(int row, int col)
{
    byROW[row].update(col, 1); 
    byCOL[col].update(row, 1); 
}

void addROW(int row, int colL, int colR, int currDist)
{
    int curr = byROW[row].query(colL - 1);
    // while (true)
    // {
    //     int search = byROW[row].findKth(curr + 1);
    //     if (search > colR)
    //     {
    //         break;
    //     }

    //     if (dist[row][search] > currDist + 1) dist[row][search] = currDist + 1;
    //     dq.push_back({row, search});
    //     setCELL(row, search);
    // }

    for (int i = colL ; i <= colR ; ++i)
    {
        if (dist[row][i] == INF)
        {
            if (byROW[row].findKth(curr + 1) != i)
            {
                int res = byROW[row].findKth(curr + 1); assert(res != i);
                // assert(byROW[row].query(res) - byROW[row].query(res - 1) == 1);
                while (res < i){assert(res < i);}
                while (res > i){assert(res > i);}
            }

            setCELL(row, i);
            dist[row][i] = currDist + 1;
            dq.push_back({row, i});
        }
    }
}

void addCOL(int col, int rowL, int rowR, int currDist)
{
    int curr = byCOL[col].query(rowL - 1);
    // while (true)
    // {
    //     int search = byCOL[col].findKth(curr + 1);
    //     if (search > rowR)
    //     {
    //         break;
    //     }

    //     if (dist[search][col] > currDist + 1) dist[search][col] = currDist + 1;
    //     dq.push_back({search, col});
    //     setCELL(search, col);
    // }

    for (int i = rowL ; i <= rowR ; ++i)
    {
        if (dist[i][col] == INF)
        {
            if (byCOL[col].findKth(curr + 1) != i)
            {
                int res = byCOL[col].findKth(curr + 1); assert(res != i);
                // assert(byCOL[col].query(res) - byCOL[col].query(res - 1) == 1);
                while (res < i){assert(false);}
                while (res > i){assert(false);}
            }

            setCELL(i, col);
            dist[i][col] = currDist + 1;
            dq.push_back({i, col});
        }
    }
}

void solve()
{
    for (int i = 1 ; i <= r ; ++i)
    {
        std::fill(dist[i].begin(), dist[i].end(), INF);
    }

    for (int i = 1 ; i <= r ; ++i)
    {
        byROW[i].build(c);
    }
    
    for (int i = 1 ; i <= c ; ++i)
    {
        byCOL[i].build(r);
    }
    
    dq.push_back({sRow, sCol});
    dist[sRow][sCol] = 0;
    setCELL(sRow, sCol);

    while (!dq.empty())
    {
        auto [row, col] = dq.front();
        dq.pop_front();    

        if (row == eRow && col == eCol)
        {
            std::cout << dist[row][col] << '\n';
            break;
        }

        for (const auto &[dx, dy] : delta)
        {
            if (isOutside(row + dx, col + dy) || dist[row + dx][col + dy] <= dist[row][col])
            {
                continue;
            }

            if (t[row + dx][col + dy] == '.')
            {
                setCELL(row + dx, col + dy);
                dist[row + dx][col + dy] = dist[row][col]; 
                dq.push_front({row + dx, col + dy});
            }
        }

        if (abs(row - eRow) <= n && abs(col - eCol) <= n && dist[eRow][eCol] > dist[row][col])
        {
            setCELL(eRow, eCol);
            dist[eRow][eCol] = dist[row][col] + 1;
            dq.push_back({eRow, eCol});
        }

        addROW(std::max(1, row - n), std::max(1, col - n + 1), std::min(c, col + n - 1), dist[row][col]);
        addROW(std::min(r, row + n), std::max(1, col - n + 1), std::min(c, col + n - 1), dist[row][col]);
        addCOL(std::max(1, col - n), std::max(1, row - n + 1), std::min(r, row + n - 1), dist[row][col]);
        addCOL(std::min(c, col + n), std::max(1, row - n + 1), std::min(r, row + n - 1), dist[row][col]);
    }
}

void input()
{
    std::cin >> r >> c >> n;
    std::cin >> sRow >> sCol;
    std::cin >> eRow >> eCol;
    for (int i = 1 ; i <= r ; ++i)
    {
        std::cin >> t[i];
        t[i] = ' ' + t[i];
        dist[i].resize(c + 1, INF);
    }
}

void fastIOI()
{
    std::ios_base :: sync_with_stdio(0);
    std::cout.tie(nullptr);
    std::cin.tie(nullptr);
}

int main()
{
    fastIOI();
    input();
    solve();

    return 0;
}

Compilation message

Main.cpp: In member function 'void BIT::update(int, int)':
Main.cpp:23:34: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   23 |         for (int idx = pos ; idx < tree.size() ; idx += idx & (-idx))
      |                              ~~~~^~~~~~~~~~~~~
Main.cpp: In member function 'int BIT::findKth(int)':
Main.cpp:45:34: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   45 |             if (idx + (1 << log) < tree.size() && (1 << log) - tree[idx + (1 << log)] < k)
      |                 ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 248 ms 610836 KB Output is correct
2 Correct 241 ms 610836 KB Output is correct
3 Correct 248 ms 610876 KB Output is correct
4 Correct 249 ms 610888 KB Output is correct
5 Correct 248 ms 610764 KB Output is correct
6 Correct 249 ms 610964 KB Output is correct
7 Correct 242 ms 611020 KB Output is correct
8 Correct 243 ms 610860 KB Output is correct
9 Correct 246 ms 611020 KB Output is correct
10 Correct 242 ms 610848 KB Output is correct
11 Correct 242 ms 610764 KB Output is correct
12 Correct 246 ms 610836 KB Output is correct
13 Correct 244 ms 610784 KB Output is correct
14 Correct 249 ms 610868 KB Output is correct
15 Correct 246 ms 610868 KB Output is correct
16 Correct 246 ms 610880 KB Output is correct
17 Correct 246 ms 610764 KB Output is correct
18 Correct 278 ms 610856 KB Output is correct
19 Correct 256 ms 611596 KB Output is correct
20 Correct 253 ms 612776 KB Output is correct
21 Correct 303 ms 611788 KB Output is correct
22 Correct 260 ms 611652 KB Output is correct
23 Correct 274 ms 611632 KB Output is correct
24 Correct 269 ms 613292 KB Output is correct
25 Correct 254 ms 613216 KB Output is correct
26 Correct 251 ms 611664 KB Output is correct
27 Correct 287 ms 611532 KB Output is correct
28 Correct 285 ms 611652 KB Output is correct
29 Correct 272 ms 612764 KB Output is correct
30 Correct 259 ms 612364 KB Output is correct
31 Correct 254 ms 613008 KB Output is correct
32 Correct 266 ms 612820 KB Output is correct
33 Correct 268 ms 612812 KB Output is correct
34 Correct 268 ms 616904 KB Output is correct
35 Correct 261 ms 616876 KB Output is correct
36 Correct 260 ms 612868 KB Output is correct
37 Correct 265 ms 612840 KB Output is correct
38 Correct 250 ms 612740 KB Output is correct
39 Correct 486 ms 630068 KB Output is correct
40 Correct 255 ms 613208 KB Output is correct
41 Correct 263 ms 618280 KB Output is correct
42 Correct 271 ms 613600 KB Output is correct
43 Correct 277 ms 616704 KB Output is correct
44 Correct 275 ms 623212 KB Output is correct
45 Correct 290 ms 622984 KB Output is correct
46 Correct 357 ms 636256 KB Output is correct
47 Correct 435 ms 630084 KB Output is correct
48 Correct 452 ms 630112 KB Output is correct
49 Correct 348 ms 671060 KB Output is correct
50 Correct 430 ms 671064 KB Output is correct
51 Correct 399 ms 630308 KB Output is correct
52 Correct 441 ms 630096 KB Output is correct
53 Correct 466 ms 630096 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 272 ms 610868 KB Output is correct
2 Correct 265 ms 610812 KB Output is correct
3 Correct 268 ms 610772 KB Output is correct
4 Correct 277 ms 610756 KB Output is correct
5 Correct 275 ms 610852 KB Output is correct
6 Correct 258 ms 610748 KB Output is correct
7 Correct 255 ms 610832 KB Output is correct
8 Correct 264 ms 610768 KB Output is correct
9 Correct 253 ms 610792 KB Output is correct
10 Correct 247 ms 610764 KB Output is correct
11 Correct 264 ms 610884 KB Output is correct
12 Correct 247 ms 611000 KB Output is correct
13 Correct 250 ms 610792 KB Output is correct
14 Correct 251 ms 610880 KB Output is correct
15 Correct 258 ms 610836 KB Output is correct
16 Correct 246 ms 610792 KB Output is correct
17 Correct 245 ms 610896 KB Output is correct
18 Correct 268 ms 610860 KB Output is correct
19 Runtime error 560 ms 1138028 KB Execution killed with signal 6
20 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 249 ms 610952 KB Output is correct
2 Correct 255 ms 610892 KB Output is correct
3 Correct 247 ms 610984 KB Output is correct
4 Correct 253 ms 610824 KB Output is correct
5 Correct 244 ms 610856 KB Output is correct
6 Correct 250 ms 610764 KB Output is correct
7 Correct 248 ms 610860 KB Output is correct
8 Correct 254 ms 610968 KB Output is correct
9 Correct 252 ms 610900 KB Output is correct
10 Correct 247 ms 610792 KB Output is correct
11 Correct 247 ms 610884 KB Output is correct
12 Correct 246 ms 610828 KB Output is correct
13 Correct 247 ms 610748 KB Output is correct
14 Runtime error 580 ms 1137908 KB Execution killed with signal 6
15 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 272 ms 610868 KB Output is correct
2 Correct 265 ms 610812 KB Output is correct
3 Correct 268 ms 610772 KB Output is correct
4 Correct 277 ms 610756 KB Output is correct
5 Correct 275 ms 610852 KB Output is correct
6 Correct 258 ms 610748 KB Output is correct
7 Correct 255 ms 610832 KB Output is correct
8 Correct 264 ms 610768 KB Output is correct
9 Correct 253 ms 610792 KB Output is correct
10 Correct 247 ms 610764 KB Output is correct
11 Correct 264 ms 610884 KB Output is correct
12 Correct 247 ms 611000 KB Output is correct
13 Correct 250 ms 610792 KB Output is correct
14 Correct 251 ms 610880 KB Output is correct
15 Correct 258 ms 610836 KB Output is correct
16 Correct 246 ms 610792 KB Output is correct
17 Correct 245 ms 610896 KB Output is correct
18 Correct 268 ms 610860 KB Output is correct
19 Runtime error 560 ms 1138028 KB Execution killed with signal 6
20 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 272 ms 610868 KB Output is correct
2 Correct 265 ms 610812 KB Output is correct
3 Correct 268 ms 610772 KB Output is correct
4 Correct 277 ms 610756 KB Output is correct
5 Correct 275 ms 610852 KB Output is correct
6 Correct 258 ms 610748 KB Output is correct
7 Correct 255 ms 610832 KB Output is correct
8 Correct 264 ms 610768 KB Output is correct
9 Correct 253 ms 610792 KB Output is correct
10 Correct 247 ms 610764 KB Output is correct
11 Correct 264 ms 610884 KB Output is correct
12 Correct 247 ms 611000 KB Output is correct
13 Correct 250 ms 610792 KB Output is correct
14 Correct 251 ms 610880 KB Output is correct
15 Correct 258 ms 610836 KB Output is correct
16 Correct 246 ms 610792 KB Output is correct
17 Correct 245 ms 610896 KB Output is correct
18 Correct 268 ms 610860 KB Output is correct
19 Runtime error 560 ms 1138028 KB Execution killed with signal 6
20 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 248 ms 610836 KB Output is correct
2 Correct 241 ms 610836 KB Output is correct
3 Correct 248 ms 610876 KB Output is correct
4 Correct 249 ms 610888 KB Output is correct
5 Correct 248 ms 610764 KB Output is correct
6 Correct 249 ms 610964 KB Output is correct
7 Correct 242 ms 611020 KB Output is correct
8 Correct 243 ms 610860 KB Output is correct
9 Correct 246 ms 611020 KB Output is correct
10 Correct 242 ms 610848 KB Output is correct
11 Correct 242 ms 610764 KB Output is correct
12 Correct 246 ms 610836 KB Output is correct
13 Correct 244 ms 610784 KB Output is correct
14 Correct 249 ms 610868 KB Output is correct
15 Correct 246 ms 610868 KB Output is correct
16 Correct 246 ms 610880 KB Output is correct
17 Correct 246 ms 610764 KB Output is correct
18 Correct 278 ms 610856 KB Output is correct
19 Correct 256 ms 611596 KB Output is correct
20 Correct 253 ms 612776 KB Output is correct
21 Correct 303 ms 611788 KB Output is correct
22 Correct 260 ms 611652 KB Output is correct
23 Correct 274 ms 611632 KB Output is correct
24 Correct 269 ms 613292 KB Output is correct
25 Correct 254 ms 613216 KB Output is correct
26 Correct 251 ms 611664 KB Output is correct
27 Correct 287 ms 611532 KB Output is correct
28 Correct 285 ms 611652 KB Output is correct
29 Correct 272 ms 612764 KB Output is correct
30 Correct 259 ms 612364 KB Output is correct
31 Correct 254 ms 613008 KB Output is correct
32 Correct 266 ms 612820 KB Output is correct
33 Correct 268 ms 612812 KB Output is correct
34 Correct 268 ms 616904 KB Output is correct
35 Correct 261 ms 616876 KB Output is correct
36 Correct 260 ms 612868 KB Output is correct
37 Correct 265 ms 612840 KB Output is correct
38 Correct 250 ms 612740 KB Output is correct
39 Correct 486 ms 630068 KB Output is correct
40 Correct 255 ms 613208 KB Output is correct
41 Correct 263 ms 618280 KB Output is correct
42 Correct 271 ms 613600 KB Output is correct
43 Correct 277 ms 616704 KB Output is correct
44 Correct 275 ms 623212 KB Output is correct
45 Correct 290 ms 622984 KB Output is correct
46 Correct 357 ms 636256 KB Output is correct
47 Correct 435 ms 630084 KB Output is correct
48 Correct 452 ms 630112 KB Output is correct
49 Correct 348 ms 671060 KB Output is correct
50 Correct 430 ms 671064 KB Output is correct
51 Correct 399 ms 630308 KB Output is correct
52 Correct 441 ms 630096 KB Output is correct
53 Correct 466 ms 630096 KB Output is correct
54 Correct 272 ms 610868 KB Output is correct
55 Correct 265 ms 610812 KB Output is correct
56 Correct 268 ms 610772 KB Output is correct
57 Correct 277 ms 610756 KB Output is correct
58 Correct 275 ms 610852 KB Output is correct
59 Correct 258 ms 610748 KB Output is correct
60 Correct 255 ms 610832 KB Output is correct
61 Correct 264 ms 610768 KB Output is correct
62 Correct 253 ms 610792 KB Output is correct
63 Correct 247 ms 610764 KB Output is correct
64 Correct 264 ms 610884 KB Output is correct
65 Correct 247 ms 611000 KB Output is correct
66 Correct 250 ms 610792 KB Output is correct
67 Correct 251 ms 610880 KB Output is correct
68 Correct 258 ms 610836 KB Output is correct
69 Correct 246 ms 610792 KB Output is correct
70 Correct 245 ms 610896 KB Output is correct
71 Correct 268 ms 610860 KB Output is correct
72 Runtime error 560 ms 1138028 KB Execution killed with signal 6
73 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 248 ms 610836 KB Output is correct
2 Correct 241 ms 610836 KB Output is correct
3 Correct 248 ms 610876 KB Output is correct
4 Correct 249 ms 610888 KB Output is correct
5 Correct 248 ms 610764 KB Output is correct
6 Correct 249 ms 610964 KB Output is correct
7 Correct 242 ms 611020 KB Output is correct
8 Correct 243 ms 610860 KB Output is correct
9 Correct 246 ms 611020 KB Output is correct
10 Correct 242 ms 610848 KB Output is correct
11 Correct 242 ms 610764 KB Output is correct
12 Correct 246 ms 610836 KB Output is correct
13 Correct 244 ms 610784 KB Output is correct
14 Correct 249 ms 610868 KB Output is correct
15 Correct 246 ms 610868 KB Output is correct
16 Correct 246 ms 610880 KB Output is correct
17 Correct 246 ms 610764 KB Output is correct
18 Correct 278 ms 610856 KB Output is correct
19 Correct 256 ms 611596 KB Output is correct
20 Correct 253 ms 612776 KB Output is correct
21 Correct 303 ms 611788 KB Output is correct
22 Correct 260 ms 611652 KB Output is correct
23 Correct 274 ms 611632 KB Output is correct
24 Correct 269 ms 613292 KB Output is correct
25 Correct 254 ms 613216 KB Output is correct
26 Correct 251 ms 611664 KB Output is correct
27 Correct 287 ms 611532 KB Output is correct
28 Correct 285 ms 611652 KB Output is correct
29 Correct 272 ms 612764 KB Output is correct
30 Correct 259 ms 612364 KB Output is correct
31 Correct 254 ms 613008 KB Output is correct
32 Correct 266 ms 612820 KB Output is correct
33 Correct 268 ms 612812 KB Output is correct
34 Correct 268 ms 616904 KB Output is correct
35 Correct 261 ms 616876 KB Output is correct
36 Correct 260 ms 612868 KB Output is correct
37 Correct 265 ms 612840 KB Output is correct
38 Correct 250 ms 612740 KB Output is correct
39 Correct 486 ms 630068 KB Output is correct
40 Correct 255 ms 613208 KB Output is correct
41 Correct 263 ms 618280 KB Output is correct
42 Correct 271 ms 613600 KB Output is correct
43 Correct 277 ms 616704 KB Output is correct
44 Correct 275 ms 623212 KB Output is correct
45 Correct 290 ms 622984 KB Output is correct
46 Correct 357 ms 636256 KB Output is correct
47 Correct 435 ms 630084 KB Output is correct
48 Correct 452 ms 630112 KB Output is correct
49 Correct 348 ms 671060 KB Output is correct
50 Correct 430 ms 671064 KB Output is correct
51 Correct 399 ms 630308 KB Output is correct
52 Correct 441 ms 630096 KB Output is correct
53 Correct 466 ms 630096 KB Output is correct
54 Correct 272 ms 610868 KB Output is correct
55 Correct 265 ms 610812 KB Output is correct
56 Correct 268 ms 610772 KB Output is correct
57 Correct 277 ms 610756 KB Output is correct
58 Correct 275 ms 610852 KB Output is correct
59 Correct 258 ms 610748 KB Output is correct
60 Correct 255 ms 610832 KB Output is correct
61 Correct 264 ms 610768 KB Output is correct
62 Correct 253 ms 610792 KB Output is correct
63 Correct 247 ms 610764 KB Output is correct
64 Correct 264 ms 610884 KB Output is correct
65 Correct 247 ms 611000 KB Output is correct
66 Correct 250 ms 610792 KB Output is correct
67 Correct 251 ms 610880 KB Output is correct
68 Correct 258 ms 610836 KB Output is correct
69 Correct 246 ms 610792 KB Output is correct
70 Correct 245 ms 610896 KB Output is correct
71 Correct 268 ms 610860 KB Output is correct
72 Runtime error 560 ms 1138028 KB Execution killed with signal 6
73 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 248 ms 610836 KB Output is correct
2 Correct 241 ms 610836 KB Output is correct
3 Correct 248 ms 610876 KB Output is correct
4 Correct 249 ms 610888 KB Output is correct
5 Correct 248 ms 610764 KB Output is correct
6 Correct 249 ms 610964 KB Output is correct
7 Correct 242 ms 611020 KB Output is correct
8 Correct 243 ms 610860 KB Output is correct
9 Correct 246 ms 611020 KB Output is correct
10 Correct 242 ms 610848 KB Output is correct
11 Correct 242 ms 610764 KB Output is correct
12 Correct 246 ms 610836 KB Output is correct
13 Correct 244 ms 610784 KB Output is correct
14 Correct 249 ms 610868 KB Output is correct
15 Correct 246 ms 610868 KB Output is correct
16 Correct 246 ms 610880 KB Output is correct
17 Correct 246 ms 610764 KB Output is correct
18 Correct 278 ms 610856 KB Output is correct
19 Correct 256 ms 611596 KB Output is correct
20 Correct 253 ms 612776 KB Output is correct
21 Correct 303 ms 611788 KB Output is correct
22 Correct 260 ms 611652 KB Output is correct
23 Correct 274 ms 611632 KB Output is correct
24 Correct 269 ms 613292 KB Output is correct
25 Correct 254 ms 613216 KB Output is correct
26 Correct 251 ms 611664 KB Output is correct
27 Correct 287 ms 611532 KB Output is correct
28 Correct 285 ms 611652 KB Output is correct
29 Correct 272 ms 612764 KB Output is correct
30 Correct 259 ms 612364 KB Output is correct
31 Correct 254 ms 613008 KB Output is correct
32 Correct 266 ms 612820 KB Output is correct
33 Correct 268 ms 612812 KB Output is correct
34 Correct 268 ms 616904 KB Output is correct
35 Correct 261 ms 616876 KB Output is correct
36 Correct 260 ms 612868 KB Output is correct
37 Correct 265 ms 612840 KB Output is correct
38 Correct 250 ms 612740 KB Output is correct
39 Correct 486 ms 630068 KB Output is correct
40 Correct 255 ms 613208 KB Output is correct
41 Correct 263 ms 618280 KB Output is correct
42 Correct 271 ms 613600 KB Output is correct
43 Correct 277 ms 616704 KB Output is correct
44 Correct 275 ms 623212 KB Output is correct
45 Correct 290 ms 622984 KB Output is correct
46 Correct 357 ms 636256 KB Output is correct
47 Correct 435 ms 630084 KB Output is correct
48 Correct 452 ms 630112 KB Output is correct
49 Correct 348 ms 671060 KB Output is correct
50 Correct 430 ms 671064 KB Output is correct
51 Correct 399 ms 630308 KB Output is correct
52 Correct 441 ms 630096 KB Output is correct
53 Correct 466 ms 630096 KB Output is correct
54 Correct 272 ms 610868 KB Output is correct
55 Correct 265 ms 610812 KB Output is correct
56 Correct 268 ms 610772 KB Output is correct
57 Correct 277 ms 610756 KB Output is correct
58 Correct 275 ms 610852 KB Output is correct
59 Correct 258 ms 610748 KB Output is correct
60 Correct 255 ms 610832 KB Output is correct
61 Correct 264 ms 610768 KB Output is correct
62 Correct 253 ms 610792 KB Output is correct
63 Correct 247 ms 610764 KB Output is correct
64 Correct 264 ms 610884 KB Output is correct
65 Correct 247 ms 611000 KB Output is correct
66 Correct 250 ms 610792 KB Output is correct
67 Correct 251 ms 610880 KB Output is correct
68 Correct 258 ms 610836 KB Output is correct
69 Correct 246 ms 610792 KB Output is correct
70 Correct 245 ms 610896 KB Output is correct
71 Correct 268 ms 610860 KB Output is correct
72 Runtime error 560 ms 1138028 KB Execution killed with signal 6
73 Halted 0 ms 0 KB -