# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
593256 | Bench0310 | Mecho (IOI09_mecho) | C++17 | 374 ms | 7184 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;
typedef long long ll;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int n,one;
cin >> n >> one;
vector<string> s(n);
array<int,2> bear;
array<int,2> house;
vector<array<int,2>> bees;
for(int i=0;i<n;i++)
{
cin >> s[i];
for(int j=0;j<n;j++)
{
if(s[i][j]=='M') bear={i,j};
if(s[i][j]=='D') house={i,j};
if(s[i][j]=='H') bees.push_back({i,j});
}
}
auto in=[&](int r,int c)->bool{return (0<=r&&r<n&&0<=c&&c<n);};
vector<array<int,2>> z={{1,0},{-1,0},{0,-1},{0,1}};
int ltime=-1,rtime=n*n;
while(ltime<rtime-1)
{
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |