Submission #1007281

# Submission time Handle Problem Language Result Execution time Memory
1007281 2024-06-24T14:34:34 Z kebine Art Collections (BOI22_art) C++17
5 / 100
40 ms 344 KB
#include <bits/stdc++.h>
#include "art.h"
using namespace std;
#define pb push_back
#define endl '\n'
#define all(v) v.begin(), v.end()
#define fr(m,n,k) for(int m=n;m<=k;m++)

int n;

void solve(int N) {
    n = N;
    vector<int> v; fr(i, 1, n) v.pb(i);
    int x = publish(v);
    if (x == 0) {
        answer(v); return;
    }
    while (next_permutation(all(v))) {
        x = publish(v);
        if (x == 0) {
            answer(v); return;
        }
    }
}

Compilation message

interface.cpp: In function 'int publish(std::vector<int>)':
interface.cpp:20:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   20 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~
interface.cpp: In function 'void answer(std::vector<int>)':
interface.cpp:36:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   36 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 5 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 2 ms 344 KB Output is correct
7 Correct 3 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 5 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 2 ms 344 KB Output is correct
7 Correct 3 ms 344 KB Output is correct
8 Correct 1 ms 344 KB Output is correct
9 Incorrect 40 ms 344 KB Not correct
10 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 5 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 2 ms 344 KB Output is correct
7 Correct 3 ms 344 KB Output is correct
8 Correct 1 ms 344 KB Output is correct
9 Incorrect 40 ms 344 KB Not correct
10 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 5 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 2 ms 344 KB Output is correct
7 Correct 3 ms 344 KB Output is correct
8 Correct 1 ms 344 KB Output is correct
9 Incorrect 40 ms 344 KB Not correct
10 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 5 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 2 ms 344 KB Output is correct
7 Correct 3 ms 344 KB Output is correct
8 Correct 1 ms 344 KB Output is correct
9 Incorrect 40 ms 344 KB Not correct
10 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 5 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 2 ms 344 KB Output is correct
7 Correct 3 ms 344 KB Output is correct
8 Correct 1 ms 344 KB Output is correct
9 Incorrect 40 ms 344 KB Not correct
10 Halted 0 ms 0 KB -