10271 - Chopsticks
#include <iostream>#include <cstdio>#include <algorithm>#include <cstring>using namespace std;const int maxn=5000+10;const int INF=1000000000;int a[maxn],dp[maxn][maxn];int main(){ int T;