跳到正文

___Eason___

1822122

醉后不知天在水,满船清梦压星河

在洛谷打开
资料、奖项与版本

资料

编号
1822122
抓取

缺省源

C++
#include <bits/stdc++.h>
using namespace std;
#define int long long
constexpr int MAXN = 1e5 + 5;
constexpr int INF = 1'000'000'000'000'000'000LL;
constexpr int MOD = 998244353;
#define endl '\n' 
#define pii pair <int, int> 
#define pdd pair <double, double>
#define fi first 
#define se second 
#define eb emplace_back 
#define ep emplace
#define ins insert 
#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define rep(i, l, r) for (int i = l ; i <= r ; i ++) 
#define per(i, r, l) for (int i = r ; i >= l ; i --) 
#define debug(x) cerr << #x << " = " << x << '\n'

signed main ()
{
    ios::sync_with_stdio(false), cin.tie(nullptr);
    
    return 0;
}
C++
#include<bits/stdc++.h>
using namespace std;
template <typename T>
inline T read(){
    T x = 0, f = 1;
    char ch = getchar();
    while(ch < '0' || ch > '9'){ if(ch == '-') f = -1; ch = getchar();}
    while(ch >= '0' && ch <= '9'){ x = x * 10 + (ch - '0'); ch = getchar();}
    return x * f;
} 
template <typename T>
inline T write(T x){
    if(x < 0){ putchar('-'); x = -x;}
    if(x > 9) write(x / 10);
    putchar(x % 10 + '0');
}
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vi>;
using vii = vector<pii>;
const int INF = 1e9;
const int MOD = 1e9 + 7;
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
#define eb emplace_back
#define ft first
#define sd second
#define lb lower_bound
#define ub upper_bound
#define endl '\n'
#define rep(i, a, b) for(int i = (a); i < (b); ++ i)
#define per(i, a, b) for(int i = (b) - 1; i >= (a); -- i)
#define each(x, a) for(auto &x : a)
template <typename T> T ftpow(T a, ll b, T mod){
    T res = 1;
    for(; b; b >>= 1, a = a * a % mod){
        if(b & 1) res = res * a % mod;
    }
    return res;
}
void ftit(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
}
void fp(){
    freopen("c.in","r",stdin);
    freopen("c.out","w",stdout);
}
void solve(){
    ;
}
int main(){
    solve();
    return 0;
}
共 4 篇
  1. 个人记录

    1

    我爱村口的盘山渠,它不仅是家乡的灌溉水道,更是刻在巴山褶皱里的家国记忆。童年时,我跟随爷爷在渠边放牛,触摸着祖辈用钢钎铁锤凿出的岩石痕迹;初中旱季,父亲守水时讲述修渠人不畏艰险的奋斗故事;去年回村,看到渠边新修的步行道和纪念墙,年轻一代正用现代技术延续这条水道的生命。这条流淌了数十年的盘山渠,承载着我成长的足迹,也见证了几代山里人用双手改天换地的坚韧与希望,让我明白家国情怀就藏在脚下这片被一锤一凿雕琢出的沃土中。

  2. 题解

    题解:P16209 [ECUSTPC 2025] 眼见为实

    该问题要求在给定l、m2、m3的情况下,寻找满足a ≡ m2 (mod 2)且a ≡ m3 (mod 3)的最小整数a,范围限定为l ≤ a < l+6。解决方案通过遍历该区间内的每个数,检查其对2和3取模的结果是否符合给定条件,找到第一个符合条件的数即输出,若遍历完所有可能值仍未找到则输出-1。代码采用简单循环实现,利用模运算直接判断条件,适用于范围较小的场景。

  3. 题解

    题解:P15794 【MX-J28-T1】「Cfz Round 8」Sqrt Problem

    P15794 本题有两种操作 n + 2 √n 再看大小 直接循环时 k 竟然能达到 依旧暴力(60 分) 优化 仔细看,仔细思考 n 在经过开方之后会迅速地减小,n 很小时直接套公式 二分开方,避免浮点误差 完美结束(求过)

  4. 题解

    P14934 「FAOI-R10」Add Problem

    题目描述 长度为 n 的系列 a ,每次增加 0 到 m 之间的数,几次将序列中所有的元素相等。 题目分析 需要调整的最大的数即最大的数与最小的数之差。需调整的次数即 需要调整的最大的数 / m 细节注意! 求最小值时要用 INT_MAX ! 需调整的次数要向上取整。 代码