제출 #1068226

#제출 시각아이디문제언어결과실행 시간메모리
1068226vjudge1Text editor (CEOI24_editor)C++17
0 / 100
1 ms348 KiB
#include <bits/stdc++.h> #define int long long using namespace std; void solve() { int n, sl, sc, el, ec; cin >> n >> sl >> sc >> el >> ec; sl--, sc--, el--, ec--; vector<int> l(n); for(int i = 0; i < n; i++) cin >> l[i]; int temp = min(abs(sc - ec), min(l[0] - sc + 1 - ec, sc + 1 + l[0] - ec)); cout << abs(sl - el) + min(abs(sc - ec), min(l[0] - sc - ec, sc + 2 + l[0] - ec)) << "\n"; } signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); solve(); }

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

Main.cpp: In function 'void solve()':
Main.cpp:12:9: warning: unused variable 'temp' [-Wunused-variable]
   12 |     int temp = min(abs(sc - ec), min(l[0] - sc + 1 - ec, sc + 1 + l[0] - ec));
      |         ^~~~
#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...