Submission #1295692

#TimeUsernameProblemLanguageResultExecution timeMemory
1295692eldaees131313Unscrambling a Messy Bug (IOI16_messy)C++20
Compilation error
0 ms0 KiB
////////////////////////////// Author:eldaee, coder_viper
#pragma GCC optimize ("Ofast")
#include <bits/stdc++.h>
#define int long long
#define str string
#define vec vector
#define dou double
#define ld long double
#define pb push_back
#define ppb pop_back
#define eb emplace_back
#define OK cout << "OK" << '\n'
#define Ok cout << "Ok" << '\n'
#define YES cout << "YES" << '\n'
#define Yes cout << "Yes" << '\n'
#define NO cout << "NO" << '\n'
#define No cout << "No" << '\n'
#define gcd __gcd
#define all(x) x.begin(),x.end()
#define eldaee ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;

/*



*/

vec<int> add_element(str x) { 
    return {}; 
}  
vec<int> compile_set() { 
    return {}; 
}          
bool check_element(str x) { 
    return false; 
}    
vec<int> v(int n, int w, int r) {
    vec<int> z(n);  
    for (int i = 0; i < n; i++) {
        str s(n, '0');
        s[i] = '1';
        add_element(s);
    }
    compile_set();
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            str s(n, '0');
            s[j] = '1';
            if (check_element(s)) {
                z[i] = j;
                break;
            }
        }
    }
    return z;
}

void solve() { 
    int n, w, r;
    cin >> n >> w >> r;
    vec<int> ans = v(n , w, r);
    for (int i = 0; i < n; i++) {
        cout << ans[i] << ' ';
    }
    cout << '\n';
}

signed main() {
    eldaee

    solve();
}

Compilation message (stderr)

messy.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
messy_c.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
/usr/bin/ld: /tmp/ccLzsD4e.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccOVuS6u.o:messy.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccLzsD4e.o: in function `check_element(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
grader.cpp:(.text+0x650): multiple definition of `check_element(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'; /tmp/ccOVuS6u.o:messy.cpp:(.text+0x40): first defined here
/usr/bin/ld: /tmp/ccLzsD4e.o: in function `add_element(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
grader.cpp:(.text+0x7d0): multiple definition of `add_element(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'; /tmp/ccOVuS6u.o:messy.cpp:(.text+0x0): first defined here
/usr/bin/ld: /tmp/ccLzsD4e.o: in function `compile_set()':
grader.cpp:(.text+0x830): multiple definition of `compile_set()'; /tmp/ccOVuS6u.o:messy.cpp:(.text+0x20): first defined here
/usr/bin/ld: /tmp/ccLzsD4e.o: in function `main':
grader.cpp:(.text.startup+0x16f): undefined reference to `restore_permutation(int, int, int)'
collect2: error: ld returned 1 exit status