답안 #710182

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
710182 2023-03-15T05:34:33 Z nicky4321 Art Collections (BOI22_art) C++17
0 / 100
0 ms 208 KB
#include <bits/stdc++.h>
#include "art.h"
#define ll long long
#define ld long double
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pdd pair<double, double>
#define ALL(x) x.begin(), x.end()
#define vi vector<int>
#define vl vector<ll>
#define SZ(x) (int)x.size()
#define CASE int t;cin>>t;for(int ca=1;ca<=t;ca++)
#define IOS ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
const int MAX = 1 << 20, MOD = 1e9 + 7;

void solve(int N){
    int n = N;
    int lt = 0;
    vi v;
    for(int i = 1;i <= n;i++){
        v.PB(i);
    }
    do{
        int tmp = publish(v);
        if(tmp == lt){
            answer(v);
        }
        lt = tmp;
    }while(next_permutation(ALL(v)));
}

// int main(){
//     IOS
//     // CASE
//     int n;
//     cin >> n;
//         solve(n);
//     return 0;
// }

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) {
      |        ~~~~~~~~~^~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 208 KB Security violation!
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 208 KB Security violation!
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 208 KB Security violation!
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 208 KB Security violation!
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 208 KB Security violation!
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 208 KB Security violation!
2 Halted 0 ms 0 KB -