Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
//#include
#include
#include
#include
#define ll long long using namespace std; int n,m; int main() { int n,m; cin >> n >> m; char mat[n][m]; int di[]={-1,1,0,0}; int dj[]={0,0,1,-1}; int si,sj,ei,ej; int k;cin>>k; for(int i=0;i
> mat[i][j]; if(mat[i][j] == 'M'){ si =i; sj = j; } if(mat[i][j] == 'V'){ ei =i; ej = j; } } } queue
q; vector
> visited(n+1,vector
(m+1,false)); q.push(si); q.push(sj); visited[si][sj]=true; vector
> cell; int dist[n][m]; while(!q.empty()){ int ci = q.front(); q.pop(); int cj = q.front(); q.pop(); visited[ci][cj] = true; if(mat[ci][cj] == 'V'){ cout << "DA"<
=0 and ti
=0 and tj
=0 and ti
=0 and tj
=0 and ti
=0 and tj
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)