#include #include int main() { int i, N, A[200001], B[200001], ans = 0; scanf("%d", &N); for (i = 1; i <= N; i++) scanf("%d", &(A[i])); for (i = 1; i <= N; i++) scanf("%d", &(B[i])); for (i = 1; i <= N; i++) ans += abs(A[i] - B[i]); printf("%d\n", ans); for (i = 1; i <= N; i++) { while (A[i] != B[i]) { if (A[i] > B[i]) { printf("%d L\n", i); A[i]--; } else { printf("%d R\n", i); A[i]++; } } } fflush(stdout); return 0; }