Submission #721631

# Submission time Handle Problem Language Result Execution time Memory
721631 2023-04-11T05:54:12 Z OttincaM Art Collections (BOI22_art) C++17
Compilation error
0 ms 0 KB
#include <iostream>
#include <chrono>
#include <random>
#include <iomanip>
#include <algorithm>
#include <utility>
#include <fstream>
#include <numeric>
#include <sstream>
#include <functional>
#include <memory.h>

#include <vector>
#include <map>
#include <set>
#include <deque>
#include <string>
#include <queue>
#include <array>
#include <stack>
#include <bitset>
#include <unordered_set>
#include <unordered_map>

#include <ctime>
#include <cmath>
#include <climits>
#include "stdio.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cassert>


#include "art.h"

using namespace std;



void solve(int N){
    int n = N;
    vector <int> fnd(1, 1);
    for(int i = 2; i <= n; i ++){
        vector <int> f, s = fnd;

        f.push_back(i);
        for(int &t: fnd) f.push_back(t);
        s.push_back(i);

        for(int j = i + 1; j <= n; j ++){
            f.push_back(j);
            s.push_back(j);
        }
        
        int x = publish(f);
        int y = publish(s);

        bool ch = 0;
        vector <int> nwf;
        for(int j = 1; j <= i - 1; j ++){
            int Y = j - 1, X = i - 1 - Y;
            if(X - Y == x - y){
                ch = 1;
                nwf.push_back(i);
            }
            nwf.push_back(fnd[j - 1]);
        }
        if(!ch) nwf.push_back(i);
        fnd = nwf;
    }
    for(int i: fnd) cout << i << " " << "\n";
}


signed main(){
    ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    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) {
      |        ~~~~~~~~~^~~~
/usr/bin/ld: /tmp/ccJwWM8i.o: in function `main':
interface.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccJd2C2k.o:art.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status