# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
835404 | mohammad_kilani | Mecho (IOI09_mecho) | C++17 | 125 ms | 6384 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 mod 1000000007
#define oo 1000000010
const int N = 810;
int n , s;
char grid[N][N];
int cost[N][N];
int dr[] = {0 , 1, 0 , -1};
int dc[] = {1 , 0 , -1 , 0};
int sr , sc , er , ec;
int cost2[N][N];
void BFSH(){
queue < pair< int , int > > q;
memset(cost , -1, sizeof(cost));
for(int i = 0;i < n;i++){
for(int j = 0 ;j < n;j++){
if(grid[i][j] == 'H'){
q.push(make_pair(i , j));
cost[i][j] = 0;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |