# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1155255 | nathan4690 | Necklace (Subtask 1-3) (BOI19_necklace1) | C++20 | 789 ms | 8928 KiB |
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define f1(i,n) for(int i=1;i<=n;i++)
#define __file_name ""
using namespace std;
const ll maxn = 1e6+5, inf=1e18;
struct Result{
int len, i, j;
Result(int len=0, int i=0, int j=0): len(len), i(i), j(j){};
bool operator<(const Result &rhs) const{
return len < rhs.len;
}
};
int n, m;
string s, t;
vector<int> outs[3005];
priority_queue<int, vector<int>, greater<int>> pq;
bool del[3005];
Result solve(){
Result ans;
for(int pos=0;pos<m;pos++){
string pref = t.substr(0, pos+1), suff = t.substr(pos+1, m);
string p = suff + '#' + s;
int sz = p.size();
vector<int> z(sz, 0);
for (int i = 1, l = 0, r = 0; i < sz; ++i) {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |