Analyze the time complexity of this code:
// @a: a vector of integers!
// @return the maximum positive subsequence sum.
// If the maximum sum is smaller than 0, return 0
int MaxSubsequenceSum(const vector<int> &a) {
int maxsum = 0;
int currentsum = 0;
for (size_t i = 0; i < a.size(); i++) {
currentsum += a[i];
if (currentsum > maxsum) {
maxsum = currentsum;
} elseif (currentsum < 0) {
currentsum = 0;
}
}
return maxsum;
}