제출 #943203

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
9432032024-03-11 09:15:26WongYiKai포탈들 (BOI14_portals)C++17
0 / 100
1 ms388 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll r,c;
ll a(ll i, ll j) {
return (i)*(c+2)+j;
}
pair<ll,ll> ra(ll x) {
return {(x)/(c+2),(x)%(c+2)};
}
int main(){
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cin >> r >> c;
ll grid[r+5][c+5];
ll s,e;
memset(grid,0,sizeof(grid));
for (int i=1;i<=r;i++){
string temp;
cin >> temp;
for (int j=1;j<=c;j++){
if (temp[j-1]=='.') grid[i][j] = 1;
else if (temp[j-1]=='#') grid[i][j] = 0;
else if (temp[j-1]=='C') {
grid[i][j] = 1;
e = a(i,j);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

portals.cpp: In function 'int main()':
portals.cpp:250:15: warning: 'e' may be used uninitialized in this function [-Wmaybe-uninitialized]
  250 |  cout << dis[e];
      |               ^
#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...