-1

Người tui yêu!

đã đăng vào 24, Tháng 3, 2025, 16:39

"Như là người tôi yêu thương nhất trên đời này. Cô ấy có một nụ cười dịu dàng và ánh mắt ấm áp, luôn khiến tôi cảm thấy bình yên mỗi khi nhìn vào. Như không chỉ đẹp về ngoại hình mà còn có một tâm hồn trong sáng, luôn quan tâm và chăm sóc những người xung quanh. Cô ấy khiến tôi cảm thấy mình là người may mắn nhất khi có thể chia sẻ những khoảnh khắc vui buồn cùng. Mỗi lần bên Như, tôi luôn cảm thấy như thời gian trôi qua thật nhanh, và tôi biết rằng tôi muốn bên cô ấy suốt cả cuộc đời này."


Bình luận

Hãy đọc nội quy trước khi bình luận.



  • 0
    nguyennhuquynh7a  đã bình luận lúc 2, Tháng 12, 2025, 7:56

    include<bits/stdc++.h>

    define ll long long

    define sc second

    define fr first

    define pb push_back

    using namespace std;

    ll l[1000006], r[1000006]; int main(){ iosbase::syncwithstdio(0); cin.tie(0); cout.tie(0); //freopen("waiting.inp", "r", stdin); //freopen("waiting.out", "w", stdout); ll n, m; cin >> n >> m; vector<pair> v; for(int i = 0; i < n ; i++){ ll x, y; cin >> x >> y; v.pb({x, y}); } sort(v.begin(), v.end()); for(int i = 0; i < n; i++){ l[i] = v[i].fr; } r[0] = v[0].sc; for(int i = 1; i < n; i++){ r[i] = max(r[i-1], v[i].sc); } for(int i = 1; i <= m; i++){ ll x; cin >> x; auto it = upperbound(l + 1, l + n + 1,x) - l; it--; if(r[it] > x && it >= 0){ cout << 0 << "\n"; } else{ if(it == n-1){ cout << -1 << "\n"; } else{ cout << l[it] - x << "\n"; } } } }


  • 0
    nguyennhuquynh7a  đã bình luận lúc 2, Tháng 12, 2025, 7:50

    include<bits/stdc++.h>

    define ll long long

    define sc second

    define fr first

    define pb push_back

    using namespace std;

    ll l[1000006], r[1000006]; int main(){ iosbase::syncwithstdio(0); cin.tie(0); cout.tie(0); //freopen("waiting.inp", "r", stdin); //freopen("waiting.out", "w", stdout); ll n, m; cin >> n >> m; vector<pair> v; for(int i = 0; i < n ; i++){ ll x, y; cin >> x >> y; v.pb({x, y}); } sort(v.begin(), v.end()); for(int i = 0; i < n; i++){ l[i] = v[i].fr; } for(int i = 0; i < n; i++){ r[i] = max(r[i-1], v[i].sc); } for(int i = 1; i <= m; i++){ ll x; cin >> x; auto it = upperbound(l + 1, l + n + 1,x) - l; it--; if(l[it] <= x){ cout << 0 << "\n"; } else{ if(it == n-1){ cout << -1 << "\n"; break; } else{ cout << l[it] - x << "\n"; } } } }


  • 0
    nguyennhuquynh7a  đã bình luận lúc 23, Tháng 11, 2025, 10:22

    include<bits/stdc++.h>

    define ll long long

    define fr first

    define sc second

    define pb push_back

    define db double

    using namespace std; bool check(string s){ for(auto x : s){ if(!isdigit(x)) return 0; } return 1; } bool c(string s, string t){ if(s.size() == t.size()){ for(int i = 0; i < s.size(); i++){ if(s[i] < t[i]) return 1; } return 0; } return s.size() < t.size(); } int main() { iosbase::syncwith_stdio(false); cin.tie(NULL); cout.tie(NULL); //freopen("bai2.INP", "r",stdin); //freopen("bai2.out", "w", stdout); ll n; cin >> n; vector<string> v; for(int i = 0 ; i <n ;i++){ string s; cin >> s; v.pb(s); } for(int i = 0; i < n; i++){ if(check(v[i])){ for(int j = 0; j < n; j++){ if(check(v[j])){ if(c(v[i], v[j])){ swap(v[i], v[j]); } } } } } for(auto x : v){ cout << x << " "; } }


  • 0
    vyhxh  đã bình luận lúc 23, Tháng 11, 2025, 10:06

    include <bits/stdc++.h>

    using namespace std;

    define ll long long

    define ld long double

    define FOR(i,a,b) for(int i = a; i <= b; i++)

    define FOD(i,b,a) for(int i = b; i >= a; i--)

    define pii pair<int,int>

    define X first

    define Y second

    define Name "SELESHIRT"

    pii a[(int)1e5+5], b[(int)1e5+5];

    int main(){ iosbase::syncwith_stdio(0); cin.tie(NULL); cout.tie(NULL);

    if(fopen(Name".inp", "r")){
        freopen(Name".inp", "r", stdin);
        freopen(Name".out", "w", stdout);
    }
    
    int n, m, x, y;
    cin>>n>>m>>x>>y;
    FOR(i,1,n)cin>>a[i].X;
    FOR(i,1,m)cin>>b[i].X;
    FOR(i,1,n)a[i].Y=i;
    FOR(i,1,m)b[i].Y=i;
    
    sort(a+1,a+n+1);
    sort(b+1,b+m+1);
    
    vector<pii>res;
    int i = 1, j = 1;
    while(i<=n&&j<=m){
        if(a[i].X-x<=b[j].X&&a[i].X+y>=b[j].X){
            res.push_back({a[i].Y, b[j].Y});
            i++;
            j++;
        }
        else if (b[j].X < a[i].X - x) {
            j++;
        }
        else {
            i++;
        }
    }
    cout<&lt;res.size()<<endl;
    for(pii i : res)cout<&lt;i.X<< ' '<&lt;i.Y<<'\n';
    

    }

    /* */


  • 0
    vyhxh  đã bình luận lúc 23, Tháng 11, 2025, 9:52

    n / 2 * n - (n / 2) * (n / 2 + 1)


  • 0
    nguyennhuquynh7a  đã bình luận lúc 23, Tháng 11, 2025, 8:34

    include<bits/stdc++.h>

    define ll long long

    define fr first

    define sc second

    define pb push_back

    define db double

    using namespace std ;

    ll a[1000006]; db f[1000006]; bool check(ll n,ll k, db mid){ for(int i = 0; i < n; i++){ f[i] = f[i-1] + a[i] - mid; } ll l = 0, r = 0; db m = 1e18; while(r <= n){ while(r -l +1>= k){ if(f[r] - m >= 0){ return 1; } m = min( m, f[l]); l++; } r++; } return 0; }

    int main() { iosbase::syncwith_stdio(false); cin.tie(NULL); cout.tie(NULL); //freopen("AVERAGE.INP", "r",stdin); //freopen("AVERAGE.out", "w", stdout); ll n, k; cin >> n >> k; for(int i = 0 ; i < n ; i++){ cin >> a[i]; } ll l = -1e9, r = 1e9; db ans = 0; for(int i = 1; i <= 80; i++){ db mid = (l+r)/2; if(check(n, k, mid)){ ans = mid; l = mid; } else{ r = mid; } } cout << fixed << setprecision(3) << ans ; }


  • 0
    nguyennhuquynh7a  đã bình luận lúc 23, Tháng 11, 2025, 8:21

    `#include<bits/stdc++.h>

    define ll long long

    define fr first

    define sc second

    define pb push_back

    define db double

    using namespace std ;

    ll a[1000006]; db f[1000006]; bool check(ll n,ll k, db mid){ f[0] = a[0] - mid; for(int i = 1; i < n; i++){ f[i] = f[i-1] + a[i] - mid; } ll l = 0, r = 0; db m = 0; while(r <= n){ while(r -l + 1 >= k){ if(f[r] - m >= 0){ return 1; } m = min( m, f[l]); l++; } r++; } return 0; }

    int main() { iosbase::syncwith_stdio(false); cin.tie(NULL); cout.tie(NULL); //freopen("AVERAGE.INP", "r",stdin); //freopen("AVERAGE.out", "w", stdout); ll n, k; cin >> n >> k; for(int i = 0 ; i < n ; i++){ cin >> a[i]; } ll l = -1e9, r = 1e9; db ans = 0; for(int i = 0; i < 80; i++){ db mid = (l+r)/2; if(check(n, k, mid)){ ans = mid; l = mid; } else{ r = mid; } } cout << fixed << setprecision(3) << ans ; } `


  • 0
    nguyennhuquynh7a  đã bình luận lúc 23, Tháng 11, 2025, 7:37

    include <bits/stdc++.h>

    using namespace std;

    define ll long long

    define ld long double

    define FOR(i,a,b) for(int i = a; i <= b; i++)

    define FOD(i,b,a) for(int i = b; i >= a; i--)

    define pii pair<int,int>

    define X first

    define Y second

    define Name ""

    int n, k; int a[(int)2e5+5]; ld f[(int)2e5+5];

    bool ok(ld x){ FOR(i,1,n)f[i]=f[i-1]+a[i]-x; ld mi = 0; int r = 1, l = 1; while(r<=n){ while(r-l+1>=k){ if(f[r]-mi>=0)return true; mi=min(mi, f[l++]); } r++; } return false; }

    int main(){ iosbase::syncwith_stdio(0); cin.tie(NULL); cout.tie(NULL);

    if(fopen(Name".inp", "r")){
        freopen(Name".inp", "r", stdin);
        freopen(Name".out", "w", stdout);
    }
    
    cin>>n>>k;
    FOR(i,1,n)cin>>a[i];
    
    ld l = -1e9, r = 1e9, res = 0;
    FOR(i,1,80){
        ld mid = (l+r)/2;
        if(ok(mid)){
            res=mid;
            l=mid;
        }
        else{
            r=mid;
        }
    }
    cout<&lt;fixed<<setprecision(3)<<res;
    

    }

    /* */


  • 0
    nguyennhuquynh7a  đã bình luận lúc 23, Tháng 11, 2025, 1:22

    include<bits/stdc++.h>

    define ll long long

    define sc second

    define fr first

    define pb push_back

    using namespace std;

    bool check(string s){ if(isdigit(s[1])){ return 0; } if(isdigit(s[0])){ if(s[0] - '0' > 1) return 0; } return 1; } bool tinh(string s){ ll i = s.size() - 1; if(s[i] == 'x' || s[i] == 'y' || s[i] == 'z' ) return 1; else if(s[i]== 'h' && s[i-1] == 'c' ||s[i]== 'h' && s[i-1] == 's') return 1; return 0; } int main() { iosbase::syncwith_stdio(false); cin.tie(NULL); cout.tie(NULL); //freopen("danhtu.inp", "r",stdin); //freopen("danhtu.out", "w", stdout); string t; getline(cin, t); stringstream ss(t); string w; vector<string> v; while(ss >> w){ if(!check(w)){ v.pb(w); } } ll e = 0, s = 0, ans = 0; for(auto x : v){ if(tinh(x)){ e++; s++; } else{ s++; } } cout << e << " " << s; }


  • 0
    nguyennhuquynh7a  đã bình luận lúc 23, Tháng 11, 2025, 0:43

    include<bits/stdc++.h>

    define ll long long

    define sc second

    define fr first

    define pb push_back

    using namespace std;

    bool check(ll a[], ll n, ll m, ll mid){ if(mid == 0) return 0; ll res = 0; for(int i = 0 ; i < n ; i++){ res += a[i]/mid; if(res >= m) return 1; } return 0; } ll a[100005]; int main() { iosbase::syncwithstdio(false); cin.tie(NULL); cout.tie(NULL); //freopen("good.inp", "r",stdin); //freopen("good.out", "w", stdout); ll n, m; cin >> n >> m; for(int i = 0 ; i < n ; i++){ cin >> a[i]; } ll l = 0, r = *maxelement(a, a+n); ll ans = 0; while(l <= r){ ll mid = (l+r)/2; if(check(a, n, m, mid)){ ans = mid; l = mid + 1; } else{ r = mid - 1; } } cout << ans; }


  • 0
    nguyennhuquynh7a  đã bình luận lúc 22, Tháng 11, 2025, 7:26

    include <bits/stdc++.h>

    using namespace std;

    int main() { ios::syncwithstdio(false); cin.tie(nullptr);

    int n;
    cin >> n;
    
    vector&lt;long long> b(n), c(n);
    for (int i = 0; i < n; i++) cin >> b[i];
    for (int i = 0; i < n; i++) cin >> c[i];
    
    sort(c.begin(), c.end());
    
    long long ans = LLONG_MAX;
    
    for (int i = 0; i < n; i++) {
        long long target = -b[i];
    
        int pos = lower_bound(c.begin(), c.end(), target) - c.begin();
    
        if (pos < n) {
            ans = min(ans, llabs(b[i] + c[pos]));
        }
        if (pos > 0) {
            ans = min(ans, llabs(b[i] + c[pos - 1]));
        }
    }
    
    cout << ans;
    return 0;
    

    }


  • 0
    vyhxh  đã bình luận lúc 21, Tháng 11, 2025, 9:53

    include <bits/stdc++.h>

    using namespace std;

    define ll long long

    define ld long double

    define FOR(i,a,b) for(int i = a; i <= b; i++)

    define FOD(i,b,a) for(int i = b; i >= a; i--)

    define pii pair<int,int>

    define X first

    define Y second

    define Name "CPHOTO"

    struct Bo{ int id, l, r, x; }a[(int)1e5+5]; int f[(int)1e5+5];

    void pull(int i){ a[a[i].l].r=a[i].r; a[a[i].r].l=a[i].l; a[i].l=0; a[i].r=0; }

    void left(int i, int j){//i j a[i].r=j; a[i].l=a[j].l; a[a[j].l].r=i; a[j].l=i; }

    void right(int i, int j){//j i a[i].l=j; a[i].r=a[j].r; a[a[j].r].l=i; a[j].r=i; }

    int main(){ iosbase::syncwith_stdio(0); cin.tie(NULL); cout.tie(NULL);

    if(fopen(Name".inp", "r")){
        freopen(Name".inp", "r", stdin);
        freopen(Name".out", "w", stdout);
    }
    
    int n, m;
    cin>>n>>m;
    
    FOR(i,1,n){
        a[i].id=i;
        a[i].l=i-1;
        a[i].r=i+1;
    }
    
    FOR(i,1,n)cin>>a[i].x;
    

    // cout<<m<

    FOR(t,1,m){
        char x;
        int i, j;
        cin>>x>>i>>j;
    

    // cout<<x<<' '<<i<<' '<<j<

    // FOR(i,1,n)cout<<a[i].id<<": "<<a[i].l<< ' '<<a[i].r<

    vector<int>idx;
    Bo p;
    FOR(i,1,n)if(a[i].l==0)p=a[i];
    while(p.r!=0){
        idx.push_back(p.x);
        p=a[p.r];
    }
    unordered_set<int>s;
    for(auto i : idx)s.insert(i);
    int res=  1e9, l =0 , r= 0, cnt =0, need=s.size();
    while(r&lt;idx.size()){
        f[idx[r]]++;
        if(f[idx[r]]==1)cnt++;
        while(cnt==need){
            res=min(res, r-l+1);
            f[idx[l]]--;
            if(f[idx[l]]==0)cnt--;
            l++;
        }
        r++;
    }
    cout<&lt;res;
    

    }

    /* */


  • 0
    nguyennhuquynh7a  đã bình luận lúc 25, Tháng 10, 2025, 8:16

    include<bits/stdc++.h>

    define ll long long

    define fr first

    define sc second

    using namespace std ;

    ll a[1000006]; int main() { iosbase::syncwith_stdio(false); cin.tie(NULL); cout.tie(NULL); //freopen("HV.inp", "r", stdin); //freopen("HV.out", "w", stdout); ll n; cin >> n; ll ans = 0; for(int i = 0 ; i < n ;i++){ cin >> a[i]; } sort(a, a+n); for(int i = 0; i < n; i++){ ans = max(ans, a[i] * (n - i + 1)); } cout << ans; }


  • 0
    nguyennhuquynh7a  đã bình luận lúc 3, Tháng 10, 2025, 9:55

    include<bits/stdc++.h>

    define ll long long

    using namespace std;

    ll a[1000006]; int main(){ freopen("XEPGACH.INP", "r", stdin); freopen("XEPGACH.out", "w", stdout); ll n; cin >> n; for(int i = 0; i < n; i++){ cin >> a[i]; } ll h = 101, d = 1; sort(a, a+n, greater<int>()); for(int i = 1; i < n; i++){ h = min(a[i], a[i-1] - 1); if(h < 0){ break; } else{ d++; } } cout << d; }


  • 0
    vyhxh  đã bình luận lúc 26, Tháng 9, 2025, 9:03

    http://hoxuanhuong.edu.vn/contest/ct67 http://hoxuanhuong.edu.vn/contest/ct126 http://hoxuanhuong.edu.vn/contest/ct112


  • 0
    nguyennhuquynh7a  đã bình luận lúc 26, Tháng 9, 2025, 7:54

    include <bits/stdc++.h>

    define ll long long

    define sc second

    define fr first

    using namespace std; int mod = 1e9 + 7; int main() { freopen("SoDacBiet.inp", "r", stdin); freopen("SoDacBiet.out", "w", stdout); ll n, k; cin >> n >> k; ll mu = 1; //n^0 ll sum = 0; while(k){ int r = k %2; k /= 2; sum += r * mu; mu *= n; sum %= mod; mu %= mod; } cout << sum; }

    Heading


  • -1
    nguyennhuquynh7a  đã bình luận lúc 12, Tháng 9, 2025, 8:09

    include<bits/stdc++.h>

    define ll long long

    using namespace std; int mod=1e9+7; ll a, b; ll mu(ll a, ll b){ if(b==1) return a%mod; a=a%mod; ll tmp= mu(a, b/2)%mod; ll res=tmptmp%mod; if(b%2==0) return res; return ares%mod; } int main(){ cin>>a>>b; cout<<mu(a,b); }


  • -1
    vyhxh  đã bình luận lúc 12, Tháng 9, 2025, 7:58 sửa 3
    #include <bits/stdc++.h>
    using namespace std;
    
    #define NAME ""
    
    #define FOR(i,a,b) for(int i = (a); i <= (b); ++i)
    #define FOD(i,b,a) for(int i = (b); i >= (a); --i)
    #define ll long long
    #define ld long double
    
    ll solve(ll n){
        return n*n*(n*n-1)/2-(n-1)*(n-2)*4;
    }
    
    int main(){
        ios_base::sync_with_stdio(false);
        cin.tie(NULL);
        cout.tie(NULL);
    
        if(fopen(NAME".inp", "r")){
            freopen(NAME".inp", "r", stdin);
            freopen(NAME".out", "w", stdout);
        }
    
        ll n;
        cin>>n;
    
        FOR(i,1,n){
            cout<&lt;solve(i)<<'\n';
        }
    }
    
    

  • 0
    Trantrungdat6C  đã bình luận lúc 26, Tháng 7, 2025, 7:59


  • 0
    Trantrungdat6C  đã bình luận lúc 26, Tháng 7, 2025, 7:59


  • 0
    Trantrungdat6C  đã bình luận lúc 26, Tháng 7, 2025, 7:59


  • 0
    Trantrungdat6C  đã bình luận lúc 26, Tháng 7, 2025, 7:57


  • 0
    Trantrungdat6C  đã bình luận lúc 26, Tháng 7, 2025, 7:57


  • -1
    hoangquocdat6c  đã bình luận lúc 19, Tháng 5, 2025, 15:06

    f


  • -1
    hoangquocdat6c  đã bình luận lúc 19, Tháng 5, 2025, 15:06

    f


  • -1
    hoangquocdat6c  đã bình luận lúc 19, Tháng 5, 2025, 15:06

    f


  • -1
    hoangquocdat6c  đã bình luận lúc 19, Tháng 5, 2025, 15:04

    f


  • -1
    hoangquocdat6c  đã bình luận lúc 19, Tháng 5, 2025, 15:04

    f


  • -2
    hoangquocdat6c  đã bình luận lúc 19, Tháng 5, 2025, 15:04

    fff


  • -1
    Trantrungdat6C  đã bình luận lúc 19, Tháng 5, 2025, 15:02

    v \


  • -1
    Trantrungdat6C  đã bình luận lúc 18, Tháng 5, 2025, 13:03

    v


  • -1
    Trantrungdat6C  đã bình luận lúc 18, Tháng 5, 2025, 13:03

    v


  • -1
    Trantrungdat6C  đã bình luận lúc 18, Tháng 5, 2025, 13:03

    v


  • -1
    Trantrungdat6C  đã bình luận lúc 18, Tháng 5, 2025, 13:03

    v


  • -1
    Trantrungdat6C  đã bình luận lúc 18, Tháng 5, 2025, 8:00

    :)))


  • 1
    nguyennhuquynh7a  đã bình luận lúc 24, Tháng 4, 2025, 3:26

    .