Submission #648351

# Submission time Handle Problem Language Result Execution time Memory
648351 2022-10-06T08:31:05 Z berr The Collection Game (BOI21_swaps) C++17
12 / 100
136 ms 11588 KB
#include <bits/stdc++.h>
#include "swaps.h"
using namespace std;


void solve(int N, int V)
{
    vector<array<int, 2>> a[V];
    vector<vector<int>> vis(V, vector<int>(N+1));

    vector<int> ans(N+1), pos(N+1);

    for(int i=1; i<=N; i++) ans[i]=i, pos[i]=i;


    for(int i=1; i<=N; i++)
    {
        for(int l=i+1; l<=N; l++)
        {
            int flag=1;
            for(int j=0; j<V&&flag; j++)
            {
                if(vis[j][i]==0&&vis[j][l]==0)
                {
                    a[j].push_back({i, l});
                    vis[j][i]=1;
                    vis[j][l]=1;
                    flag=0;
                }
            }
        }
    }

    for(int i=0; i<V; i++)
    {
        for(auto l: a[i]) schedule(l[0], l[1]);
        auto b=visit();


    }

    vector<int> s;


    for(int i=1; i<=N; i++) s.push_back(i);

    answer(s);
}
# Verdict Execution time Memory Grader output
1 Incorrect 48 ms 720 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 44 ms 720 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 43 ms 720 KB Correct
2 Correct 52 ms 2512 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 43 ms 720 KB Correct
2 Correct 52 ms 2512 KB Correct
3 Incorrect 31 ms 720 KB Not correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 45 ms 848 KB Correct
2 Correct 49 ms 2640 KB Correct
3 Correct 51 ms 5820 KB Correct
4 Correct 121 ms 11472 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 45 ms 848 KB Correct
2 Correct 49 ms 2640 KB Correct
3 Correct 51 ms 5820 KB Correct
4 Correct 121 ms 11472 KB Correct
5 Incorrect 38 ms 720 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 35 ms 720 KB Correct
2 Correct 40 ms 2512 KB Correct
3 Correct 59 ms 5712 KB Correct
4 Correct 119 ms 11476 KB Correct
5 Incorrect 81 ms 2376 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 35 ms 720 KB Correct
2 Correct 40 ms 2512 KB Correct
3 Correct 59 ms 5712 KB Correct
4 Correct 119 ms 11476 KB Correct
5 Incorrect 81 ms 2376 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 46 ms 848 KB Correct
2 Correct 53 ms 2640 KB Correct
3 Correct 59 ms 5816 KB Correct
4 Correct 136 ms 11588 KB Correct
5 Incorrect 77 ms 2396 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 46 ms 848 KB Correct
2 Correct 53 ms 2640 KB Correct
3 Correct 59 ms 5816 KB Correct
4 Correct 136 ms 11588 KB Correct
5 Incorrect 77 ms 2396 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 21 ms 720 KB Correct
2 Correct 25 ms 2512 KB Correct
3 Correct 60 ms 5812 KB Correct
4 Correct 98 ms 11476 KB Correct
5 Incorrect 88 ms 2372 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 21 ms 720 KB Correct
2 Correct 25 ms 2512 KB Correct
3 Correct 60 ms 5812 KB Correct
4 Correct 98 ms 11476 KB Correct
5 Incorrect 88 ms 2372 KB Not correct
6 Halted 0 ms 0 KB -