Skip to content

Instantly share code, notes, and snippets.

View tamarous's full-sized avatar
🎯
Focusing

Tamarous tamarous

🎯
Focusing
View GitHub Profile
@tamarous
tamarous / maxSequenceSum.cpp
Last active October 10, 2016 12:53
求最大子序列和,如果求出来的值为负数,则返回0。时间复杂度:O(NlogN)
#include <iostream>
using namespace std;
int max(int a,int b,int c)
{
return a>b?(a>c?a:c):(c>b?c:b);
}