제출 #709637

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
7096372023-03-14 04:30:17aggrovectorMecho (IOI09_mecho)C++17
31 / 100
174 ms12260 KiB
#include <bits/stdc++.h>
using namespace std;
long long n,s,i,j,d[805][805],x,y,vi[805][805],tl,tr,mid;
char a[805][805];
vector<pair<long long,long long>> h;
queue<pair<long long,long long>> q;
pair<long long,long long> st,e;
int main() {
cin >> n >> s;
for (i=1;i<=n;i++) {
for (j=1;j<=n;j++) {
cin >> a[i][j];
if (a[i][j]=='H') {
h.push_back(make_pair(i,j));
}
if (a[i][j]=='M') {
st=make_pair(i,j);
}
if (a[i][j]=='D') {
e=make_pair(i,j);
}
}
}
for (i=0;i<h.size();i++) {
q.push(make_pair(h[i].first,h[i].second));
vi[h[i].first][h[i].second]=1;
}
while(!q.empty()) {
x=q.front().first;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

mecho.cpp: In function 'int main()':
mecho.cpp:25:12: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   25 |  for (i=0;i<h.size();i++) {
      |           ~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...