제출 #1036545

#제출 시각아이디문제언어결과실행 시간메모리
1036545model_codeSprinklers (CEOI24_sprinklers)C++17
3 / 100
28 ms856 KiB
// Author: Robert Jaworski #include <bits/stdc++.h> using namespace std; int main() { int N, M; cin >> N >> M; vector<int> s(N, 0), f(M, 0); for (auto&& x : s) { cin >> x; } for (auto&& x : f) { cin >> x; } if (N == 1) { if (s.back() <= f[0]) { cout << (f.back() - s.back()) << endl << "R" << endl; } else if (s[0] >= f.back()) { cout << (s[0] - f[0]) << endl << "L" << endl; } else { cout << -1 << endl; } return 0; } int K = max(f.back() - s[0], s[1] - f[0]); cout << K << endl << "RL"; for (int x = 2; x < N; x++) { cout << 'L'; } cout << endl; return 0; }
#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...