A
#includeusing namespace std; int main() { int h,w,u1,d1,u2,d2,sum=0; cin>>w>>h>>u1>>d1>>u2>>d2; sum=w; while(h>0) { sum=sum+h; if(h==d1)sum=sum-u1; if(h==d2)sum=sum-u2; sum=max(sum,0); h--; } cout<
B
#includeusing namespace std; int main() { long long n; cin>>n; n=sqrt((4*n)-3); n=n+1; cout<
C
#includeusing namespace std; #define long long ll int main() { string s; cin>>s; int l = s.length(); int k; cin>>k; int count1 = 0; int count2 = 0; for(int i=0; i d && count2==0) cout<<"Impossible"; else { int tmp; for(int i=0; i
D
#include#define LL long longusing namespace std; const int inf = 1e9 + 10; vector v[100010]; int a[100010]; int s[100010]; int flag; void dfs(int x,int pre,int sum) { if(flag == 0) return; if(s[x]!= -1) { if(s[x]< sum) { flag = 0; return; } a[x]=s[x]-sum; } else { int minn = inf; for(int i=0; i
【Codeforces|Codeforces #530.div2】转载于:https://www.cnblogs.com/raincle/p/10389809.html
推荐阅读