제출 #1068429

#제출 시각아이디문제언어결과실행 시간메모리
1068429vjudge1Text editor (CEOI24_editor)C++17
0 / 100
1 ms348 KiB
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int x1,y1,x2,y2; cin >> x1 >> y1 >> x2 >> y2; int so = abs(x1 - x2); int arr[n]; for(int i = 0; i < n; i++){ cin >> arr[i]; } if(x2 == n){ cout << so << endl; }else{ if(x1 == n){ x1--; y1 = 0; } int ro = arr[0] + 1; int dist1 = abs(y2 - y1); int dist2 = ro - dist1; cout << so + min(dist1,dist2) << endl; } }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...