# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
321123 | CodeTiger927 | Relativnost (COCI15_relativnost) | C++14 | 4067 ms | 56728 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
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... |