1013A codeforces - Piles with stones


1013A codeforces - Piles with stones






Solution in C++


#include <bits/stdc++.h>
using namespace std;

typedef long long int lli;
#define pii pair<int,int>

int n,acc1,acc2,t;

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    cin>>n;
    for(int i=0;i<n;i++)
    {
        cin>>t;
        acc1+=t;
    }
    for(int i=0;i<n;i++)
    {
        cin>>t;
        acc2+=t;
    }
    cout<<((acc2>acc1)?"No":"Yes");
    return 0;
}
Share on Google Plus

About Mohamed Sobhi

My name is Mo.Sobhy ,I study at School excelling high school in Ain Shams ,Cairo
My hobbies is programming ,and web development ,playing chess and writing horror stories.
    Blogger Comment
    Facebook Comment

1 التعليقات:

  1. If you don't want to undergo an operation, you can still try some natural treatments for piles. Kshar karma therapy is an option that can shrink the pile mass and stop the bleeding. It can also help with the recurrence of the problem. The mass will shed within a couple of days. It is a pain-free procedure and doesn't require surgery. It can be done at home and there are few risks involved.
    Buy Ayurvedic Piles Relief Capsules

    ردحذف