제출 #943269

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
9432692024-03-11 09:47:10yhkhoo포탈들 (BOI14_portals)C++17
0 / 100
11 ms3672 KiB
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
#define lb(vec, val) lower_bound((vec).begin(), (vec).end(), (val))
int main(){
cin.tie(0); ios_base::sync_with_stdio(0);
int r, c;
cin >> r >> c;
char m[r][c];
vector<vector<int>> cw(c), rw(r);
int S, C;
for(int i=0; i<c; i++){
cw[i].push_back(-1);
}
for(int i=0; i<r; i++){
rw[i].push_back(-1);
for(int j=0; j<c; j++){
cin >> m[i][j];
if(m[i][j] == '#'){
rw[i].push_back(j);
cw[j].push_back(i);
}
else if(m[i][j] == 'S'){
S = i*c+j;
}
else if(m[i][j] == 'C'){
C = i*c+j;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

portals.cpp: In function 'int main()':
portals.cpp:109:15: warning: 'C' may be used uninitialized in this function [-Wmaybe-uninitialized]
  109 |  cout << dst[C];
      |               ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...