Problem Link: codeforces.com/contest/2051/problem/D
@LolpaKhum3 күн бұрын
code plz ?
@NeerajMansingh-l2lКүн бұрын
Nice video, explained in a concise way. Please could you also add writings if possible ? However thanks for the explanation 😊
@codeNLearnNCode22 сағат бұрын
@@LolpaKhum #include using namespace std; void solve() { long long n, x, y, sum = 0; cin >> n >> x >> y; vector a(n); for (int i = 0; i < n; i++) { cin >> a[i]; sum += a[i]; } sort(a.begin(), a.end()); long long ans = 0; for (int i = 0; i < n - 1; i++) { sum -= a[i]; int f1 = -1, f2 = -1; int start = i + 1, end = n - 1; while (start = x && sum - a[mid]
@codeNLearnNCode22 сағат бұрын
@@NeerajMansingh-l2l thanks man, sure i'll try to add writings too