Submission #594969

#TimeUsernameProblemLanguageResultExecution timeMemory
594969MadokaMagicaFanCounting Mushrooms (IOI20_mushrooms)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using vi = vector<int>;
using pi = pair<int,int>;

#define all(v)          v.begin(),v.end()
#define sort(v)         sort(all(v))
#define endl            '\n'
#define forn(i,n)       for(int i = 0; i < n; ++i)
#define forbe(i,b,e)    for(int i = b; i < e; ++i)
#define forr(i,n)       for(int i = n-1; i >= 0; --i)
#define sz(v)           ((int)v.size())
#define pb              push_back
#define f               first
#define s               second

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int rand(int a, int b) {
    return a + rng()%(b-a+1);
}

#ifdef ONPC
void solve() {
    int n = 20000;
//    n = rand(5,100);

    cout << n;
    cout << endl;

    cout << 'A';
    forn(i, n-1) {
        if (rand(0,1))
            cout << 'A';
        else
            cout << 'B';
    }
    cout << endl;
}

int main() {
//    freopen("in", "r", stdin);
//    ios_base::sync_with_stdio(0);cin.tie(0);
    solve();
}
#endif

Compilation message (stderr)

/usr/bin/ld: /tmp/ccnIOqjV.o: in function `main':
stub.cpp:(.text.startup+0x86): undefined reference to `count_mushrooms(int)'
collect2: error: ld returned 1 exit status