codeforces 686A Free Ice Cream
来源:互联网 发布:长虹网络电视机顶盒 编辑:程序博客网 时间:2024/06/05 13:52
点击打开链接
水题
#include<iostream>#include<cstdio>#include<cstring>#include<cmath>#include<cstdlib>using namespace std;typedef long long ll;int main(){ ll n,x,s=0,m; char str; cin>>n>>x; for(int i=0;i<n;i++) { cin>>str>>m; if(str=='+') x+=m; else { if(x>=m) x-=m; else s++; } } cout<<x<<" "<<s<<endl; return 0;}
阅读全文
0 0
- CodeForces 686A Free Ice Cream
- codeforces 686A Free Ice Cream
- CodeForces 686A Free Ice Cream(模拟)
- A. Free Ice Cream
- Codeforces Round #359 (Div. 2) A. Free Ice Cream
- Codeforces Round #359 (Div. 2) A. Free Ice Cream
- CodeForces 686AFree Ice Cream
- Free Ice Cream
- Codeforces Round #359 (Div. 2)A. Free Ice Cream(水一发,好久没写题解了)
- Codeforces Round #411 (Div. 2)E. Ice cream coloring
- Codeforces Round #411 E.Ice cream coloring (dfs染色)
- Codeforces Round #411 (Div. 1) C. Ice cream coloring
- Icy ice cream delivery
- 拯救ice-cream
- 【搜索】拯救ice-cream
- Gym101194D-Ice Cream Tower
- Ice-cream Tycoon SGU
- 【Codeforces Round #411 (Div. 1)】Codeforces 804C Ice cream coloring
- 数据库事务与MySQL事务总结
- ubuntu16.04下安装tomcat
- 【算法题】神奇数
- jsonp跨域
- 编程之美——递归思想的归纳
- codeforces 686A Free Ice Cream
- XC7K325TFPGA+4路SFP+万兆光纤+USB3.0+SATA 3.0FMC载板
- .NET的Actor模型:Orleans Orleans是微软推出的类似Scala Akka的Actor模型,
- 悬浮隐藏效果
- 数据结构基础知识核心归纳(二)
- C语言基础复习——结构体(1)
- 数据库(4)查询
- Python科学计算--NumPy的数组对象ndarray
- 使用web服务器写一个登陆注册的界面