poj1247
来源:互联网 发布:农村淘宝怎么设置地址 编辑:程序博客网 时间:2024/06/06 01:02
#include
using namespace std;
int main(){
int n;
while(cin>>n&&n){
int a[35],sum=0,i=0,h=0;
while(n--){
cin>>a[i];
sum+=a[i];
i++;
}
if(sum%2==0){
sum/=2;
for(int j=0;j
if(h
}
else if(sum==h){
cout<<"Sam stops at position "<<j<<" andElla stops at position "<<j+1<<'.'<<endl;
break;
}
else{
cout<<"No equal partitioning."<<endl;
break;
}
}
}
else if(sum%2==1)
}
return 0;
}
0 0
- poj1247
- POJ1247
- poj1247
- poj1247
- POJ1247
- poj1247
- poj1247(Magnificent Meatballs)
- POJ1247解题报告
- POJ1247:Magnificent Meatballs
- 【模拟】poj1247 Magnificent Meatballs
- POJ1247解题报告
- poj1247对半分
- POJ1247解题报告——我写的第一篇解题报告
- poj1118
- Linux中tty框架与uart框架之间的调用关系剖析
- poj1159
- poj1163
- poj1207
- poj1247
- poj1248
- poj1250
- poj1298
- poj1316
- poj1318
- poj1326
- poj1338
- poj1350