思路:每到路灯前,通过已走路程判断路灯的颜色。遇到红灯时进行再进行运算。
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5;
int a[maxn],r[maxn],g
思路:每到路灯前,通过已走路程判断路灯的颜色。遇到红灯时进行再进行运算。
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5;
int a[maxn],r[maxn],g