# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
738531 | 1075508020060209tc | Selotejp (COCI20_selotejp) | C++14 | 104 ms | 120620 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 int long long
int n;int m;
string gr[1010];
int dp[1010][12][2510];
signed main(){
cin>>n>>m;
for(int i=1;i<=n;i++){
cin>>gr[i];
}
for(int i=0;i<=n;i++){
for(int j=0;j<m;j++){
for(int A=0;A<(1<<m);A++){
dp[i][j][A]=1e9;
}
}
}
dp[0][m-1][0]=0;
for(int i=0;i<=n;i++){
for(int j=0;j<m-1;j++){
for(int A=0;A<(1<<m);A++){
//延伸
if(gr[i][j+1]=='#'&& ((A&(1<<(j+1)))!=0) ){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |