# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
321123 | CodeTiger927 | Relativnost (COCI15_relativnost) | C++14 | 4067 ms | 56728 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.
using namespace std;
#include <iostream>
#include <cstring>
#define MAXN 100005
#define MOD 10007
#define MAXC 25
// Polynomial template
struct poly {
long long coefs[MAXC];
poly() {
memset(coefs,0,sizeof(coefs));
coefs[0] = 1;
}
poly(long long a,long long b) {
memset(coefs,0,sizeof(coefs));
coefs[0] = a % MOD;
coefs[1] = b % MOD;
}
poly operator *(const poly& b) {
poly ret;
ret.coefs[0] = 0;
for(int i = 0;i < MAXC;++i) {
for(int j = 0;j < MAXC;++j) {
if(i + j < MAXC) ret.coefs[i + j] += coefs[i] * b.coefs[j] % MOD;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |