题意:给你很多对数,要么是0要么是1。不全0则ans++。

思路即题意。

#include<cstdio>
#include<cstring>
#include<iostream> using namespace std; #define MAX(x,y) (((x)>(y)) ? (x) : (y))
#define MIN(x,y) (((x) < (y)) ? (x) : (y))
#define ABS(x) ((x)>0?(x):-(x)) const int inf = 0x7fffffff;
const int N=; int win[N][*N];
int state[N];Z int main()
{
int n,m;
while(cin>>n>>m)
{
int cnt=;
for(int i=; i<=n; i++)
{
for(int j=; j<=*m; j++)
{
scanf("%d",&win[i][j]);
if(j% == ){
if(win[i][j-] == || win[i][j] == ){
cnt++;
}
}
}
}
cout<<cnt<<endl;
}
return ;
}

随笔—邀请赛前训— Codeforces Round #330 (Div. 2) Vitaly and Night的更多相关文章

  1. 随笔—邀请赛前训— Codeforces Round #330 (Div. 2) B题

    题意: 这道英文题的题意稍稍有点复杂. 找长度为n的数字序列有多少种.这个序列可以分为n/k段,每段k个数字.k个数可以变成一个十进制的数Xi.要求对这每n/k个数,剔除Xi可被ai整除的情况,剔除X ...

  2. Codeforces Round #330 (Div. 1) A. Warrior and Archer 贪心 数学

    A. Warrior and Archer Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/594 ...

  3. Codeforces Round #330 (Div. 1) C. Edo and Magnets 暴力

    C. Edo and Magnets Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/594/pr ...

  4. Codeforces Round #330 (Div. 2)D. Max and Bike 二分 物理

    D. Max and Bike Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/595/probl ...

  5. Codeforces Round #330 (Div. 2) B. Pasha and Phone 容斥定理

    B. Pasha and Phone Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/595/pr ...

  6. Codeforces Round #330 (Div. 2) A. Vitaly and Night 暴力

    A. Vitaly and Night Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/595/p ...

  7. Codeforces Round #330 (Div. 2)

    C题题目出错了,unrating,2题就能有很好的名次,只能呵呵了. 水 A - Vitaly and Night /***************************************** ...

  8. Codeforces Round #330 (Div. 2) B. Pasha and Phone

    B. Pasha and Phone time limit per test 1 second memory limit per test 256 megabytes input standard i ...

  9. Codeforces Round #330 (Div. 2) B 容斥原理

    B. Pasha and Phone time limit per test 1 second memory limit per test 256 megabytes input standard i ...

随机推荐

  1. 收集的maven 仓库地址(maven repository)

    maven 仓库地址: 共有的仓库http://repo1.maven.org/maven2/http://repository.jboss.com/maven2/http://repository. ...

  2. C# 导出到Excel

    一个DataGrid里有两张表的数据,导出成一张表 protected void btnExcel_Click(object sender, EventArgs e) { InfoExport(); ...

  3. 使用response实现文件的下载

    package cn.itcast.request; import java.io.FileInputStream;import java.io.IOException;import java.io. ...

  4. poj2369 Permutations ——置换群

    link:http://poj.org/problem?id=2369 置换群,最简单的那种. 找所有数字循环节的最小公倍数. /* ID: zypz4571 LANG: C++ TASK: perm ...

  5. 转weblogic 10.3新建域

    一.安装前准备 1.解决linux中文乱码问题 修改/etc/sysconfig/i18n文件 #LANG="en_US.UTF-8"#SUPPORTED="en_US. ...

  6. (转)Deep Learning Research Review Week 1: Generative Adversarial Nets

    Adit Deshpande CS Undergrad at UCLA ('19) Blog About Resume Deep Learning Research Review Week 1: Ge ...

  7. Func<T>与Action<T>委托泛型介绍

    .Net 3.5之后,微软推出了Func<T>与Action<T>泛型委托.进一步简化了委托的定义. Action<T>委托主要的表现形式如下: public de ...

  8. C# 两个集合对比获取不同

    public class CompareCollection { public List<string> CompareList(List<string> oldList, L ...

  9. ios uiwebview 上几个技巧

    以下内容转自 CrespoXiao的微博 分享个tips,阅读类app内容加载一般是本地存几个html框架,接口传body过来就行了,目的是节省流量.但是loadHTMLString在内容多尤其是图片 ...

  10. Asp.net MVC 之请求生命周期

    今天主要试着描述一下ASP.NET MVC 请求从开始到结束的整个生命周期,了解这些后,对MVC会有一个整体的认识. 这里主要研究了MVC请求的五个过程. 1.创建RouteTable 当ASP.NE ...