a
and limit
are both vectors, this is an example of their initialization
vector<int> a(10,0);
vector<int> limit(10,10);
This simple piece of code
if (a[i]+1 < limit[i]) a[i]++;
else {
}
It consumed more than 6% of process time as shown in performance profiler after compile.
Can it be optimize even more?