# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
236702 | mohamedsobhi777 | Beautiful row (IZhO12_beauty) | C++14 | 2490 ms | 164732 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 ;
const int N =20 ;
int n;
int r2[N] , r3[N] ;
int a[N] ;
vector<int> p ;
long long dp[N][(1<<N)] ;
int solve1(int x , int base){
int ret = 0 ;
while(x){
ret+= (x%base==1) ;
x/=base ;
}
return ret ;
}
vector<int> adj[N] ;
long long solve(int x , int mask){
if(dp[x][mask]!= -1)
return dp[x][mask] ;
if(mask == (1<<n) -1){
return 1LL ;
}
long long ret = 0 ;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |