2 条题解
-
0
大水题
#include<bits/stdc++.h> using namespace std; int x,n,b,y; string a; int read()//快读 { int x=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9'){ if(ch=='-')f=-1; ch=getchar(); } while(ch>='0'&&ch<='9') { x=x*10+(ch-'0'); ch=getchar(); } return x*f; } void write(int x) {//快输 if(x<0){ putchar('-'); write(-x); return; } if(x>=10)write(x/10); putchar(x%10+'0'); } int main() { x=read(); cin>>a;//简单模拟 n=read(); while(n--){ cin>>a>>a; b=read(); y+=b; } write(y+max(0,y-x)); return 0; }
- 1
信息
- ID
- 167
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 7
- 标签
- (无)
- 递交数
- 139
- 已通过
- 29
- 上传者