제출 #625966

#제출 시각아이디문제언어결과실행 시간메모리
625966huutuan죄수들의 도전 (IOI22_prison)C++17
컴파일 에러
0 ms0 KiB
//#pragma GCC optimize("Ofast,unroll-loops")
//#pragma GCC target("avx,avx2,fma")
#include "prison.h"
#include<bits/stdc++.h>

#define taskname "cf"

using namespace std;

#ifndef beez
#define cerr if (0) cerr
#endif

#define int long long
#define defll
#ifdef defll
#define sumof(a) accumulate(all(a), 0ll)
#define bit(x, i) (((x)>>(i))&1ll)
#define lsb(a) __builtin_ctzll(a)
#define msb(a) (63-__builtin_clzll(a))
#define cntbit(a) __builtin_popcountll(a)
#else
#define sumof(a) accumulate(all(a), 0)
#define bit(x, i) (((x)>>(i))&1)
#define lsb(a) __builtin_ctz(a)
#define msb(a) (31-__builtin_clz(a))
#define cntbit(a) __builtin_popcount(a)
#endif
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define sz(a) ((int) a.size())
#define ret(a) return cout << (a) << "\n", void()
#define NEVER   freopen(
#define GONNA   taskname
#define GIVE    ".inp", "r"
#define YOU
#define UP      , stdin);
#define LET     ".out", "w"
#define DOWN    , stdout);
#define RUN     ".err"
#define AROUND  , "w"
#define AND     , stderr
#define DESERT  );

template<typename A, typename B>
istream& operator>>(istream& in, pair<A, B> &v){
    in >> v.first >> v.second;
    return in;
}

template<typename A, typename B>
ostream& operator<<(ostream& out, const pair<A, B> &v){
    out << v.first << " " << v.second << " ";
    return out;
}

template<class Con, class=decltype(declval<Con>().begin())>
typename enable_if<!is_same<Con, string>::value, istream&>::type
operator>>(istream& in, Con& con){
    for (auto it=con.begin(); it!=con.end(); ++it) in >> *it;
    return in;
}

template<class Con, class=decltype(declval<Con>().begin())>
typename enable_if<!is_same<Con, string>::value, ostream&>::type
operator<<(ostream& out, const Con& con){
    if (con.empty()) return out;
    auto v=*con.begin();
    bool p=is_class<decltype(v)>::value;
    for (auto it=con.begin(), it2=--con.end(); it!=con.end(); ++it) out << *it << (!p?(it==it2?"\n":" "):"");
    return out;
}

vector<vector<int>> devise_strategy(int n){
    vector<vector<int>> v(43, vector<int>(n+1));
    for (int i=0; i<43; ++i) v[i][0]=1;
    int mm=1000;
    for (int r=0; r<4; ++r){
        for (int i=10*r+3; i<10*(r+1)+3; ++i){
            for (int j=1; j<=n; ++j){
                int t=j/mm%10;
                if (i%10<t) v[i][j]=-1;
                if (i%10>t) v[i][j]=-2;
                if (i%10==t) v[i][j]=40+r;
            }
        }
        mm/=10;
        if (r==3) break;
        for (int j=1; j<=n; ++j){
            v[r][j]=10*r+(j/mm)%10;
        }
    }
    return v;
}

// int32_t main(){
//     cout << devise_strategy(9);
//     return 0;
// }

// int32_t main(){
//     ios_base::sync_with_stdio(false);
//     cin.tie(nullptr);
//     #ifdef beez
//     NEVER GONNA GIVE YOU UP
//     NEVER GONNA LET YOU DOWN
//     NEVER GONNA RUN AROUND AND DESERT YOU
//     #endif // beez
//     int ntests=1;
//     cin >> ntests;
//     while (ntests--) solve();
//     return 0;
// }

컴파일 시 표준 에러 (stderr) 메시지

/usr/bin/ld: /tmp/ccDhjaf6.o: in function `main':
grader.cpp:(.text.startup+0x194): undefined reference to `devise_strategy(int)'
collect2: error: ld returned 1 exit status