题目的意思就是找出未能及时处理的犯罪数,

#include <iostream>
using namespace std; int main(){
int n;
cin >> n;
int a,recruit = , crimes = ;;
for(int i = ; i < n; ++ i){
cin >> a;
if(a > ) recruit+=a;
else recruit?recruit-- : crimes++;
}
cout<<crimes<<endl;
}

Codeforces Round #244 (Div. 2) A. Police Recruits的更多相关文章

  1. Codeforces Round #244 (Div. 2)D (后缀自己主动机)

    Codeforces Round #244 (Div. 2)D (后缀自己主动机) (标号为0的节点一定是null节点,不管怎样都不能拿来用,切记切记,以后不能再错了) 这题用后缀自己主动机的话,对后 ...

  2. Codeforces Round #244 (Div. 2)

    今天是水题集啊.... A. Police Recruits time limit per test 1 second memory limit per test 256 megabytes inpu ...

  3. Codeforces Round #130 (Div. 2) C - Police Station 最短路+dp

    题目链接: http://codeforces.com/problemset/problem/208/C C. Police Station time limit per test:2 seconds ...

  4. Codeforces Round #408 (Div. 2) D - Police Stations

    地址:http://codeforces.com/contest/796/problem/D 题目: D. Police Stations time limit per test 2 seconds ...

  5. Codeforces Round #130 (Div. 2) C. Police Station

    题目链接:http://codeforces.com/contest/208/problem/C 思路:题目要求的是经过1~N的最短路上的某个点的路径数 /  最短路的条数的最大值.一开始我是用spf ...

  6. Codeforces Round #244 (Div. 2) B. Prison Transfer 线段树rmq

    B. Prison Transfer Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/problemset/pro ...

  7. Codeforces Round #244 (Div. 2) C. Checkposts (tarjan 强连通分量)

    题目:http://codeforces.com/problemset/problem/427/C 题意:给你n座城市,m条有向道路,然后有一个机制,你在某一个城市设置检查点,那么被设置的检查点受保护 ...

  8. Codeforces Round #244 (Div. 2) B. Prison Transfer

    题目是选出c个连续的囚犯,而且囚犯的级别不能大于t #include <iostream> using namespace std; int main(){ int n,t,c; cin ...

  9. Codeforces Round #244 (Div. 2)——Checkposts

    题目链接 题意: 给定n个点,每一个点有一个权值的有向图.如今须要选定一些点,使得这些点权值和最小.且满足:假设i能到达j且j能到达i,那么i.j能够仅仅选一个 分析: 强联通模板题 //使用时仅仅更 ...

随机推荐

  1. js 删除确定

    "<td><a href='shanchu.php?c={$v[0]}' onclick=\"return confirm('确定删除么?')\"> ...

  2. Feature hashing相关 - 1

    考虑典型的文本分类,一个经典的方法就是     分词,扫描所有特征,建立特征词典 重新扫描所有特征,利用特征词典将特征映射到特征空间编号 得到特征向量 学习参数 w 存储学习参数 w , 存储特征映射 ...

  3. 让那些为Webkit优化的网站也能适配IE10(转载)

    转载地址:http://www.w3cplus.com/css3/adapting-your-webkit-optimized-site-for-internet-explorer-10.html 特 ...

  4. hdu 3695:Computer Virus on Planet Pandora(AC自动机,入门题)

    Computer Virus on Planet Pandora Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 256000/1280 ...

  5. [LeetCode] Ugly Number II

    Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors ...

  6. C# DatrgridView表格控件的一些用法

    public class useDatrgrivView { string conn = null; string sqlComm = null; DataSet das = null; DataGr ...

  7. 为什么要使用 Node.js

    这是一个移动端工程师涉足前端和后端开发的学习笔记,如有错误或理解不到位的地方,万望指正. Node.js 是什么 传统意义上的 JavaScript 运行在浏览器上,这是因为浏览器内核实际上分为两个部 ...

  8. 【微信Java开发 --2】接入微信公众平台开发,配置自己的服务器,验证过程

    接入微信公众平台开发,开发者需要按照如下步骤完成: 1.填写服务器配置 2.验证服务器地址的有效性 3.依据接口文档实现业务逻辑好我们就开始:1.填写好我们的URL和Token[此处是已经通过验证的] ...

  9. 【转】【异常处理】Incorrect string value: '\xF0\x90\x8D\x83...' for column... Emoji表情字符过滤的Java实现

    http://blog.csdn.net/shootyou/article/details/44852639 Emoji表情字符现在在APP已经广泛支持了.但是MySQL的UTF8编码对Emoji字符 ...

  10. Almost Sorted Array

    http://acm.hdu.edu.cn/contests/contest_showproblem.php?cid=646&pid=1006 #include<iostream> ...