Codeforces Round #244 (Div. 2) A. Police Recruits
2014-05-03 19:34
260 查看
题目的意思就是找出未能及时处理的犯罪数,
#include <iostream> using namespace std; int main(){ int n; cin >> n; int a,recruit = 0, crimes = 0;; for(int i = 0 ; i < n; ++ i){ cin >> a; if(a > 0) recruit+=a; else recruit?recruit-- : crimes++; } cout<<crimes<<endl; }
相关文章推荐
- codeforces --- Round #244 (Div. 2) A. Police Recruits
- Codeforces Round #244 (Div. 2)——A. Police Recruits(水)
- Codeforces Round #244 (Div. 2)a Police Recruits
- Codeforces Round #244 (Div. 2) E. Police Patrol(数学)
- Codeforces Round #244 (Div. 2)E. Police Patrol
- Codeforces Round #408 (Div. 2) D - Police Stations
- Codeforces 427A Police Recruits
- A. Police Recruits
- Codeforces Round #244 (Div. 2) E. Police Patrol
- codeforces——427A——Police Recruits
- CodeForces 427A Police Recruits
- codeforces Police Recruits
- Codeforces Round #244 (Div. 2) E. Police Patrol
- 思维题——Police Recruits
- A. Police Recruits
- CodeForces 427A Police Recruits (水题)
- div或表格高度自适应的问题
- 【Codeforces #131 Div2】Solutions
- Codeforces Round #208 (Div. 2) A_ Dima and Continuous Line
- QuickSums - SRM 197 Div 2 dp+矩阵+暴力