https://codeforces.com/contest/1013

A

 1 #include<bits/stdc++.h>
 2 using namespace std;
 3 #define lson l,mid,rt<<1
 4 #define rson mid+1,r,rt<<1|1
 5 #define IT set<node>::iterator
 6 #define sqr(x) ((x)*(x))
 7 #define pb push_back
 8 #define eb emplace_back
 9 #define maxn 200005
10 #define eps 1e-8
11 #define pi acos(-1.0)
12 #define rep(k,i,j) for(int k=i;k<j;k++)
13 typedef long long ll;
14 typedef pair<int,int> pii;
15 typedef pair<ll,ll>pll;
16 typedef pair<ll,int> pli;
17 typedef pair<pair<int,string>,pii> ppp;
18 typedef unsigned long long ull;
19 const long long MOD=1e9+7;
20 const double oula=0.57721566490153286060651209;
21 using namespace std;
22 
23 
24 int n,ans1,ans2;
25 
26 int main(){
27     std::ios::sync_with_stdio(false);
28     cin>>n;
29     int x;
30     for(int i=1;i<=n;i++){
31         cin>>x;
32         ans1+=x;
33     }
34     for(int i=1;i<=n;i++){
35         cin>>x;
36         ans2+=x;
37     }
38     if(ans1>=ans2) puts("YES");
39     else puts("NO");
40 }
View Code

相关文章: