en
Feedback
Deloitte | PWC | ATS resumes | Wipro | Infosys | Accenture | Capegemini | job links

Deloitte | PWC | ATS resumes | Wipro | Infosys | Accenture | Capegemini | job links

Open in Telegram
4 673
Subscribers
No data24 hours
-17 days
-630 days
Posts Archive
#include using namespace std; vector rankSongs(vector> pref) {     int n = pref.size();    
#include<bits/stdc++.h> using namespace std; vector<int> rankSongs(vector<vector<int>> pref) { Ā Ā Ā  int n = pref.size(); Ā Ā Ā  int m = pref[0].size(); Ā Ā Ā  vector<vector<int>> b(m, vector<int>(m, 0)); Ā Ā Ā  vector<int> w(m, 0), r(m); Ā Ā Ā  iota(r.begin(), r.end(), 0); Ā Ā Ā  for (int i = 0; i < n; i++) { Ā Ā Ā Ā Ā Ā Ā  for (int j = 0; j < m; j++) { Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  for (int k = j + 1; k < m; k++) { Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  b[pref[i][j]][pref[i][k]]++; Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  } Ā Ā Ā Ā Ā Ā Ā  } Ā Ā Ā  } Ā Ā Ā  for (int i = 0; i < m; i++) { Ā Ā Ā Ā Ā Ā Ā  for (int j = 0; j < m; j++) { Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  if (i != j && (b[i][j] > b[j][i] || (b[i][j] == b[j][i] && i < j))) { Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  w[i]++; Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  } Ā Ā Ā Ā Ā Ā Ā  } Ā Ā Ā  } Ā Ā Ā  sort(r.begin(), r.end(), [&](int i, int j) { Ā Ā Ā Ā Ā Ā Ā  return w[i] > w[j] || (w[i] == w[j] && i < j); Ā Ā Ā  }); Ā Ā Ā  return r; } int main() { Ā Ā Ā  int n, m; Ā Ā Ā  cin >> n >> m; Ā Ā Ā  vector<vector<int>> p(n, vector<int>(m)); Ā Ā Ā  for (int i = 0; i < n; i++) { Ā Ā Ā Ā Ā Ā Ā  for (int j = 0; j < m; j++) { Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  cin >> p[i][j]; Ā Ā Ā Ā Ā Ā Ā  } Ā Ā Ā  } Ā Ā Ā  vector<int> r = rankSongs(p); Ā Ā Ā  for (int i = 0; i < m; i++) { Ā Ā Ā Ā Ā Ā Ā  cout << r[i] << endl; Ā Ā Ā  } Ā Ā Ā  cout << endl; Ā Ā Ā  return 0; }

Company name : MEESHO Role : BUSINESS ANALYST Package : 4.8 Lpa APPLY LINK :- https://docs.google.com/forms/d/e/1FAIpQLSc3DvqJDjZeYjFZX2OgVPwm5shjCX4a0APzYBaTBoPzTf4khg/viewform?pli=1 While applying make sure in your CV mention python and sql. After you getting exam link contact us, we will help you

Meesho Tech Mahindra IBM Help available Any Other Oncampus/ Offcampus Exam 100% Clearance Guarantee. Contact @PlacementsBrošŸ˜Ž

IBM exam clearedāœ… Got mail for next round https://t.me/Coding_palace/6570 100 percent clearanceāœ… -->@placementsBrošŸ˜Ž
+1
IBM exam clearedāœ… Got mail for next round https://t.me/Coding_palace/6570 100 percent clearanceāœ… -->@placementsBrošŸ˜Ž

Register and Utilize this guy's šŸ‘†

Discover the magic of Python in Data Science! šŸ Witness a live demonstration showcasing its capabilities. Don't miss out! šŸš€šŸ“ˆ āŒ1 day left āŒ Register Now for Free: https://bit.ly/47KtVSN