Submission #1168531

#TimeUsernameProblemLanguageResultExecution timeMemory
1168531nijatCombo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

using namespace __gnu_pbds;
using namespace std;
#define fast_IO ios_base::sync_with_stdio(0); cin.tie(0)
#define int long long
#define ld long double
#define endl '\n'
#define forUSACO freopen(".in", "r", stdin); freopen(".out", "w", stdout)
#define S second
#define F first
#define pb push_back
#define all(x) x.begin(), x.end()
const int N = 1e4 + 5;
const int sz = 1e5 + 5;
const int mod = 998244353;
const int INF = 1e18;
typedef tree<
        int,
        null_type,
        less_equal<int>,
        rb_tree_tag,
        tree_order_statistics_node_update>  ordered_set;
char a[N][N];
void solve()
{
    int n, j = 0, ans = 0, ok = 0;
    cin >> n;
    string s, t = "ABXYY";
    cin >> s;
    for (int i = 0; i < n; i ++) {
        if (s[i] == t[j]) j ++, ok = 1;
        else              j = 0;
        ans = max(ans, j);
    }
    cout << max(ans, ok) << endl;
}

signed main()
{
    fast_IO;
    //forUSACO;

    int T = 1;
    //cin >> T;
    while (T --)
    {
        solve();
    }

}

Compilation message (stderr)

/usr/bin/ld: /tmp/ccWxDc4j.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccs8YV1Q.o:combo.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccWxDc4j.o: in function `main':
grader.cpp:(.text.startup+0x4c): undefined reference to `guess_sequence[abi:cxx11](int)'
collect2: error: ld returned 1 exit status