# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
595052 | ShivanshJ | Tracks in the Snow (BOI13_tracks) | C++17 | 923 ms | 258256 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>
//#define int long long
using namespace std;
const int MAX=4e3+5;
const int INF=1e18;
const int MOD=1e9+7;
const int MAXL=32;
int dx[]={-1,0,1,0},dy[]={0,1,0,-1};
int g[MAX][MAX][2],h,w; // {T,R,B,L} , vertex-info (4)
bool chk(int x,int y) {
return (x>=0 && y>=0 && x<h && y<w && g[x][y][0]!=-1);
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
//cout<<setprecision(6)<<fixed;
//freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);
cin>>h>>w;
for(int i=0;i<h;i++) {
for(int j=0;j<w;j++) {
char s;
cin>>s;
if(s=='R') {
g[i][j][0]=0;
} else if(s=='F') {
g[i][j][0]=1;
} else {
g[i][j][0]=-1;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |