# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
698464 | karrigan | Nautilus (BOI19_nautilus) | C++14 | 212 ms | 684 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
bitset<501>dp[2][509];
bitset<501>a[509];
signed main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
//freopen("usaco.INP","r",stdin);
//freopen("usaco.OUT","w",stdout);
int n,m,k;
cin>>n>>m>>k;
for (int i=1;i<=n;i++){
for (int j=1;j<=m;j++){
char r;
cin>>r;
if (r=='.')dp[0][i][j]=a[i][j]=1;
}
}
string s;
cin>>s;
s=" "+s;
for (int i=1;i<=k;i++){
if (s[i]=='?'){
for (int j=1;j<=n;j++){
dp[1][j]=((dp[0][j-1])|(dp[0][j+1])|(dp[0][j]>>1)|(dp[0][j]<<1));
}
}
else if (s[i]=='N'){//up
for (int j=1;j<=n;j++){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |