coderforce 586A Alena's Schedule
来源:互联网 发布:王鑫南京金贝网络 编辑:程序博客网 时间:2024/06/09 05:26
#include<stdio.h>#include<string.h>#include<algorithm>using namespace std;const int maxm=1e2+10;int a[maxm];int main(){ int n; while(scanf("%d",&n)!=EOF) { a[0]=0; a[n+1]=0; int cnt=0; for(int i=1;i<=n;i++) { scanf("%d",&a[i]); } for(int i=1;i<=n;i++) { if((a[i-1]&&a[i+1])||(a[i])) { cnt++; } } printf("%d\n",cnt); } return 0;}
0 0
- coderforce 586A Alena's Schedule
- A. Alena's Schedule
- Code Forces 586 A. Alena's Schedule(水~)
- Codeforces Round #325 A Alena's Schedule
- CodeForces 325# A. Alena's Schedule
- Alena's Schedule[水题]
- codeforces586A Alena's Schedule(模拟)
- Alena's Schedule(模拟)
- coderforce 576A Vasya and Petya's Game
- coderforce 2A-Winner
- coderforce 282A Bit++
- coderforce 306A Candies
- coderforce 527A Arrays
- coderforce 534A Exam
- coderforce 483A Counterexample
- 【CoderForce A】Contest
- coderforce 579A Raising Bacteria
- coderforce A.Ilya and Diplomas
- iPhone开发 判断当前的网络是3g还是wifi
- C++primer学习:关于upper_bound和lower_bound的探究.
- android在代码中怎么设置 RadioGroup的默认值
- LeetCode 213: House Robber II
- MySQL怎样存储IP地址
- coderforce 586A Alena's Schedule
- E-R模型、E-R分析介绍
- 图像的锐化和边缘提取
- UIDevice
- linux kvm 创建虚拟机
- Android学习碎片(一)——startActivityForResult
- 一个数组a[0...n-1],求a[j]-a[i]的最大值,其中i<j
- eclipse设置黑色主题
- tomcat 配置内存