Submission #1084621

#TimeUsernameProblemLanguageResultExecution timeMemory
1084621SulAText editor (CEOI24_editor)C++17
0 / 100
0 ms344 KiB
#include <bits/stdc++.h> using namespace std; void subtask1() { array<int, 2> start{}, end{}; cin >> start[0] >> start[1] >> end[0] >> end[1]; int l; cin >> l; if (start[0] == 1 && end[0] == 1) { // both one line 1 cout << min( (start[1] - end[1] + l + 1) % (l + 1), (end[1] - start[1] + l + 1) % (l + 1) ); } else if (start[0] != end[0]) { // one on line 1, other on line 2 cout << 1; } else { // both on line 2 cout << 0; } } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; if (n == 2) subtask1(); }
#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...