# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
667405 | Mahdi | Boat (APIO16_boat) | C++17 | 307 ms | 7384 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<bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
#define F first
#define S second
typedef long long ll;
typedef pair<int, int> pii;
const int N=505, M=1e9+7;
int n, m, a[N], b[N], dp[N][2*N], c[2*N][N], en[N][N], h[2*N][N];
vector<int>v;
int tav(int x, int p){
int res=1;
while(p){
if(p&1)
res=1LL*res*x%M;
x=1LL*x*x%M;
p>>=1;
}
return res;
}
void pre(){
en[0][0]=1;
for(int i=1;i<=n;++i){
en[i][0]=1;
for(int j=1;j<=i;++j){
en[i][j]=en[i-1][j]+en[i-1][j-1];
if(en[i][j]>=M)
en[i][j]-=M;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |