# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
514799 | ymm | Nautilus (BOI19_nautilus) | C++17 | 185 ms | 680 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.
///
/// What would happen if we used assembly language for CP?
/// Sorry, that was a strange thing to ask.
///
#include <bits/stdc++.h>
#define Loop(x,l,r) for(ll x = ll(l); x < ll(r); ++x)
#define LoopR(x,l,r) for(ll x = ll(r)-1; x >= ll(l); --x)
#define Kill(x) exit((cout << (x) << '\n', 0))
typedef long long ll;
typedef std::pair<int,int> pii;
typedef std::pair<ll,ll> pll;
using namespace std;
const int N = 510;
bitset<N> cur[2][N];
bitset<N> isl[N];
int n, m, k;
void up(char c){
Loop(i,0,n){
cur[1][i].reset();
if( c=='?' || c=='E') {cur[1][i] |= cur[0][i]<<1; cur[1][i][m]=0;}
if( c=='?' || c=='W') cur[1][i] |= cur[0][i]>>1;
if((c=='?' || c=='N') && i+1<n) cur[1][i] |= cur[0][i+1];
if((c=='?' || c=='S') && i >0) cur[1][i] |= cur[0][i-1];
cur[1][i] &= isl[i];
}
Loop(i,0,n) cur[0][i] = cur[1][i];
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |