# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
239021 | NONAME | Mate (COCI18_mate) | C++17 | 382 ms | 32560 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <vector>
#include <queue>
#include <fstream>
using namespace std;
typedef long long ll;
typedef pair <ll, ll> pll;
const int N = 2e5 + 10;
const int base = 1e9 + 7;
string s;
int c[2500][2500], res[2500][2500], res0[26][2500], sf[2500][26];
int main() {
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
// freopen("in.txt", "r", stdin);
cin >> s;
int n = int(s.size());
for (int i = 0; i < 2500; ++i) {
c[i][0] = c[i][i] = 1;
for (int j = 1; j < i; ++j)
c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % base;
}
for (int i = n - 1; i >= 0; --i)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |