Tag: Codeforces Round #429 (Div. 2)

Codeforces Round #429 (Div. 2), problem: (E) On the Bench Solution In C/C++

#include<bits/stdc++.h> #define ll long long int #define LL long long int #define ULL unsigned long long int #define sf(a) scanf(“%d”,&a) #define sl(a)...

Codeforces Round #429 (Div. 2), problem: (D) Leha and another game about graph Solution In C/C++

#include<cstdio> using namespace std; const int MAXN = 300000+5; const int MAXE = MAXN*2; int to, nxt, head, ne; void addEdge(int f,...

Codeforces Round #429 (Div. 2), problem: (C) Leha and Function Solution In C/C++

#include<bits/stdc++.h> using namespace std; int main(){ std::ios::sync_with_stdio(false); int m; cin>>m; int a,b; for(int i=0;i<m;i++) cin>>a; vector<pair<int,int> >br(m); for(int i=0;i<m;i++){ cin>>b; br=make_pair(b,i); } sort(a,a+m); int ans; sort(br.begin(),br.end()); reverse(br.begin(),br.end()); for(int i=0;i<m;i++) ans.second]=a; for(int i=0;i<m;i++) cout<<ans<<” “; return 0; }

Want to stay up to date with the latest news?

We would love to hear from you! Please fill in your details and we will stay in touch. It's that simple!