CodeForces 595A Vitaly and Night
水题。
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std; int a[][];
int n,m,ans; int main()
{
scanf("%d%d",&n,&m);
for(int i=;i<=n;i++)
for(int j=;j<=*m;j++)
scanf("%d",&a[i][j]);
ans=;
for(int i=;i<=n;i++)
for(int j=;j<=m;j++)
if(a[i][*j-]+a[i][*j]!=) ans++;
printf("%d\n",ans);
return ;
}
CodeForces 595A Vitaly and Night的更多相关文章
- CodeForces 595A
题目链接: http://codeforces.com/problemset/problem/595/A 题意: 一栋楼,有n层,每层有m户,每户有2个窗户,问这栋楼还有多少户没有睡觉(只要一个窗户灯 ...
- codeforces 518A. Vitaly and Strings
A. Vitaly and Strings time limit per test 1 second memory limit per test 256 megabytes input standar ...
- CodeForces - 557D Vitaly and Cycle(二分图)
Vitaly and Cycle time limit per test 1 second memory limit per test 256 megabytes input standard inp ...
- codeforces 557D. Vitaly and Cycle 二分图染色
题目链接 n个点, m条边, 问最少加几条边可以出现一个奇环, 在这种情况下, 有多少种加边的方式. 具体看代码解释 #include<bits/stdc++.h> using names ...
- CodeForces 518A Vitaly and Strings (水题,字符串)
题意:给定两个相同长度的字符串,让你找出一个字符串,字典序在两都之间. 析:这个题当时WA了好多次,后来才发现是这么水,我们只要把 s 串加上,然后和算数一样,该进位进位,然后再和 t 比较就行. 代 ...
- codeforces 557D Vitaly and Cycle
题意简述 给定一个图 求至少添加多少条边使得它存在奇环 并求出添加的方案数 (注意不考虑自环) ---------------------------------------------------- ...
- Codeforces Round #311 (Div. 2) D. Vitaly and Cycle 图论
D. Vitaly and Cycle Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/557/p ...
- 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 ...
- 【34.57%】【codeforces 557D】Vitaly and Cycle
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard ou ...
随机推荐
- ARM 环境下使用azure powershell 从远程blob中拉去vhd 并创建虚拟机
最近需要从指定公共访问的blob中复制vhd到自己的订阅存储账户,并使用vhd创建AZURE ARM虚拟机(非经典版),而且在portal.azure.cn中无法实现虚拟机映像创建等功能,于是自己使用 ...
- check_http.c:312: error: ‘ssl_version’
安装nagios-plugins-1.4.16,安装的过程中出现了错误,提示如下.check_http.c:312: error: ‘ssl_version’ undeclared (first us ...
- innerHTML的性能问题
看到一遍文章When innerHTML isn’t Fast Enough,反应了innerHTML在操作量大了以后的性能下降的问题. 并且给出了一个replaceHTML的函数 function ...
- Web服务器安全设置
Web服务器安全方面一直重视程度不够,是各种网站经常被黑的主要原因.下面笔者总结了一下关于怎样保证Web服务器安全的措施,希望能给那些服务器尚存在漏洞的用户提供一些帮助. 本文主要以Windows s ...
- Eclipse被卡死了或者失去响应了后分析根源的一个小技巧
提升程序员工作效率的工具/技巧推荐系列 推荐一个功能强大的文件搜索工具SearchMyFiles 介绍一个好用的免费流程图和UML绘制软件-Diagram Designer 介绍Windows任务管理 ...
- PHP一句话后门过狗姿势万千之理论篇
写在前面: 过狗相关的资料网上也是有很多,所以在我接下来的文章中,可能观点或者举例可能会与网上部分雷同,或者表述不够全面. 但是我只能说,我所传达给大家的信息,是我目前所掌握或者了解的,不能保证所有人 ...
- ACCEPT详解
NAME 名称 accept - 在一个套接字上接收一个连接 SYNOPSIS 概述 #include <sys/types.h> #include <sys/socket.h> ...
- // mounted: {}, 原来是 空方法 导致了 vue 的警告 !| [Vue warn]: Error in mounted hook: "TypeError: handlers[i].call is not a function"
// mounted: {}, 原来是 空方法 导致了 vue 的警告 !| vue.runtime.esm.js?2b0e:587 [Vue warn]: Error in mounted hook ...
- 如何安装多个pip包
要在命令行上安装多个软件包,只需将它们作为以空格分隔的列表传递,例如: pip install wsgiref boto
- QT_2
1.默认生成代码的含义(.pro)