| # | User | Rating |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | Kevin114514 | 3659 |
| 3 | jiangly | 3640 |
| 4 | turmax | 3450 |
| 5 | tourist | 3382 |
| 6 | strapple | 3360 |
| 7 | Um_nik | 3354 |
| 8 | squareOf105 | 3348 |
| 9 | maroonrk | 3312 |
| 10 | idontwannadothis…e | 3191 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 155 |
| 2 | nik_exists | 151 |
| 3 | maspy | 149 |
| 4 | AmShZ | 145 |
| 5 | Um_nik | 143 |
| 6 | Errichto | 139 |
| 7 | BledDest | 136 |
| 8 | adamant | 134 |
| 9 | maroonrk | 132 |
| 10 | cry | 130 |
|
0
thanks! |
|
0
Will u guys please add this in gym? |
|
+1
Team: queue_T_pie from VIT Pune Members: YSlow L1419GHT IamDragonite Regionals: Amritapuri (Mysore) Preferences in probleset: no constructives,adhoc,heavy observation and geometry problems :) → Reply |
|
0
U can solve C without DP using simple prefix and suffix sums |
|
+1
C messed up the whole contest, but D was saver |
|
0
bhai hamari branch kyu allowed nahi hai :(((( |
|
0
Thanks buddy for the help! :) |
|
0
Whats wrong with people , always giving iterative code is not a good idea , some questions have recursive code more intuitive to understand and moreover if u writing a blog on cf where all will see its better to add such codes which are more understandable and intuitive |
|
-7
Author of B must get death penalty for such shit crime |
|
0
VIDEO TUTORIAL FOR COUNTING GRIDS : https://youtu.be/OqNATOhgQ_g SOLUTION CODE : https://gist.github.com/AyushhChavan/653513f11fe6643cca264dd8a814d587 |
|
-8
https://codeforces.me/contest/1237/submission/274033759 Another way of problem B using two stacks , u can optimize it by using array instead of map for hashing |
|
-8
B can be solved like this also ~~~~~ void Solve() { int n; cin >> n; vi a(n-1); cin >> a; vi ans;
ans.pb(a[0]);
for(int i = 1; i < n-1; ++i) {
int num = a[i] | a[i-1];
if((ans.back() & num) != a[i-1]) {
cout << -1 << nl;
return ;
}
ans.pb(num);
}
ans.pb(a[n-2]);
cout << ans << nl;} ~~~~~ |
|
0
include <bits/stdc++.h>using namespace std; using namespace chrono; define ll long longdefine mod 1000000007define nn "\n\n"define pb emplace_backdefine sz(x) int(x.size())define all(x) x.begin(), x.end()define watch(x) cout << #x << " = " << x << '\n'define endl '\n'int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); auto ssss = high_resolution_clock::now();
int T;
cin >> T;
for (int tc = 1; tc <= T; ++tc) {
cout << "Test Case #" << tc << ":" << endl;
int n , l , r;
cin >> n >> l >> r;
ll ans = 0 , sum = 0;
vector<int> a(n);
for(auto& x : a) cin >> x;
int index = -1;
for(int i = 0; i < n; ++i) {
sum += a[i];
if(sum >= l && sum <= r) {
sum = 0 , ans++;
continue;
}
else {
index = (index == -1) ? i : index;
i++;
while(i < n && sum < l) {
sum += a[i];
i++;
}
while(index < i && sum > r) {
sum -= a[index];
index++;
}
if(sum >= l && sum <= r) {
sum = 0;
ans++;
index = -1;
}
i--;
}
}
cout << ans << endl;
cout << nn;
}auto eeee = high_resolution_clock::now(); duration duration_sec = duration_cast<duration>(eeee — ssss); cout << "Total time taken: " << duration_sec.count() << " seconds" << endl; return 0; } Can anyone tell me why this code is not getting selected o 3rd ?? |
|
0
Top Reasons of Depression 1.Breakup 2.WA on div2 A |
|
+2
right!! |
| Name |
|---|


