首页 > 其他分享 >2022河南萌新联赛第(三)场:河南大学

2022河南萌新联赛第(三)场:河南大学

时间:2024-02-04 19:23:44浏览次数:34  
标签:const 萌新 int long 2022 ans 河南大学 using define

A-玉米大炮

二分一个时间,然后计算每门大炮可以射击的次数

#include<bits/stdc++.h>
using namespace std;
#define int long long
//#define int __int128
#define double long double
typedef pair<int,int>PII;
typedef pair<string,int>PSI;
typedef pair<string,string>PSS;
const int N=100+5,INF=0x3f3f3f3f,Mod=1e9+7,mod=998244353;
const int MAXN=1e8+5;
const double eps=1e-12;
const int dx[4]={-1,1,0,0};
const int dy[4]={0,0,-1,1};



void solve() {
    int n,m;
    cin>>n>>m;
    vector<int>a(n),b(n);
    for(int i=0;i<n;++i)cin>>a[i]>>b[i];
    int l=0,r=1e18,x;
    auto check=[&](int s){
        __int128 ans=0;
        for(int i=0;i<n;++i){
            __int128 c=s/b[i]+1;
            ans+=a[i]*c;
        }
        return ans>=(__int128)m;
    };
    while(l<=r){
        int mid=l+r>>1;
        if(check(mid))r=mid-1,x=mid;
        else l=mid+1;
    }
    cout<<x;
}

signed main(){
    ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
    int t=1;
//    cin>>t;
    while(t--){
        solve();
    }
    return 0;
}

B-逆序对计数

因为长度比较小,所以直接预处理每个区间的逆序对个数,翻转区间只会导致区间内的逆序对数量发生改变。

预处理就对前缀反复的做逆序对即可。

#include <bits/stdc++.h>
using namespace std;
// #define endl '\n'
//#define inf 1e18
typedef long long ll;
typedef __int128 lll;
typedef pair<ll, ll> P;
#define x first
#define y second
#define pi 3.14159265358
#define int long long

const int p = 1e9 + 7;
const int pp = 998244353;

int dx[8] = {-1, 0, 1, 0, -1, -1, 1, 1}, dy[8] = {0, 1, 0, -1, -1, 1, -1, 1};
int ddx[8] = {1, 1, 2, 2, -1, -1, -2, -2}, ddy[8] = {2, -2, 1, -1, 2, -2, 1, -1};

ll ksm(ll a, ll b, ll p) {
    ll ans = 1;
    while(b) {
        if(b & 1) ans = (ans * a) % p;
        b >>= 1;
        a = (a * a) % p;
    }
    return ans % p;
}

std::mt19937 rng;  // 随机数生成器  
int rand(int l, int r) {
    std::uniform_int_distribution<int> distribution(l, r);
    return distribution(rng);
}

class BIT {
public:
    BIT(int size) : size_(size), tree_(size + 1, 0) {}

    void update(int index, int delta) {
        for (int i = index + 1; i <= size_; i += (i & -i)) {
            tree_[i] += delta;
        }
    }

    int query(int index) {
        int sum = 0;
        for (int i = index + 1; i > 0; i -= (i & -i)) {
            sum += tree_[i];
        }
        return sum;
    }

    int queryRange(int left, int right) {
        return query(right) - query(left - 1);
    }

private:
    int size_;
    vector<int> tree_;
};

const int N = 6005;
int n;
int a[N], f[N][N];

void solve() {
	cin >> n;
	for(int i = 1; i <= n; i++) {
		cin >> a[i];
	}
	for(int i = n; i; i--) {
		BIT b(n + 1);
		for(int j = i + 1; j <= n; j++) {
			b.update(a[j], 1);
			f[i][j] = b.query(a[i]);
            f[i][j] += f[i + 1][j];
		}
	}
//     for(int i = 1; i <= n; i++) {
//         for(int j = 1; j <= n; j++) {
//             cout << f[i][j] << " \n"[j == n];
//         }
//     }
	int ans = f[1][n];
	int q;
	cin >> q;
	while(q -- ) {
		int l, r;
		cin >> l >> r;
		int len = (r - l + 1);
		cout << ((ans - f[l][r]) + (len * (len - 1) >> 1) - f[l][r]) << endl;
	}
}


/*



*/

signed main () {
//     init(minp, primes, m); // primes
    // init();
    ios::sync_with_stdio(0);
    cin.tie(0), cout.tie(0);
    int _ = 1;
//   cin >> _;
    while(_ -- ) {
        solve();
    }
    return 0;
}

C-区间操作

其实\(f(x)\)就是求质因数分解后有多少个质因数,而opt1是求\(f(\sum b_i)\),所以直接存储每个数的质因数个数即可,题目转换为了区间修改,区间求和。套一个线段树的模板即可。

#include <bits/stdc++.h>
using namespace std;
// #define endl '\n'
//#define inf 1e18
typedef long long ll;
typedef __int128 lll;
typedef pair<ll, ll> P;
#define x first
#define y second
#define pi 3.14159265358
#define int long long

const int p = 1e9 + 7;
const int pp = 998244353;

int dx[8] = {-1, 0, 1, 0, -1, -1, 1, 1}, dy[8] = {0, 1, 0, -1, -1, 1, -1, 1};
int ddx[8] = {1, 1, 2, 2, -1, -1, -2, -2}, ddy[8] = {2, -2, 1, -1, 2, -2, 1, -1};

ll ksm(ll a, ll b, ll p) {
    ll ans = 1;
    while(b) {
        if(b & 1) ans = (ans * a) % p;
        b >>= 1;
        a = (a * a) % p;
    }
    return ans % p;
}

std::mt19937 rng;  // 随机数生成器  
int rand(int l, int r) {
    std::uniform_int_distribution<int> distribution(l, r);
    return distribution(rng);
}

class SegmentTree {  
public:  
    SegmentTree(vector<int>& nums) {  
        n = nums.size() - 1;  
        tree.resize(4 * n + 1);  
        lazy.resize(4 * n + 1);  
        build(nums, 1, 1, n);  
    }  
  
    void build(vector<int>& nums, int i, int start, int end) {  
        if (start == end) {  
            tree[i] = nums[start];  
            return;  
        }  
        int mid = (start + end) / 2;  
        build(nums, 2 * i, start, mid);  
        build(nums, 2 * i + 1, mid + 1, end);  
        tree[i] = tree[2 * i] + tree[2 * i + 1];  
    }  
  
    void push_up(int i, int start, int end) {  
        tree[i] = tree[2 * i] + tree[2 * i + 1];  
    }  
  
    void push_down(int i, int start, int end) {  
        if (lazy[i] != 0) {  
            int mid = (start + end) / 2;  
            lazy[2 * i] += lazy[i];  
            lazy[2 * i + 1] += lazy[i];  
            tree[2 * i] += lazy[i] * (mid - start + 1);  
            tree[2 * i + 1] += lazy[i] * (end - mid);  
            lazy[i] = 0;  
        }  
    }  
  
    void update(int i, int start, int end, int s, int e, int val) {  
        if (s <= start && end <= e) {  
            tree[i] += val * (end - start + 1);  
            lazy[i] += val;  
            return;  
        }  
        push_down(i, start, end);  
        int mid = (start + end) / 2;  
        if (s <= mid) update(2 * i, start, mid, s, e, val);  
        if (e > mid) update(2 * i + 1, mid + 1, end, s, e, val);  
        push_up(i, start, end);  
    }  
  
    int query(int i, int start, int end, int s, int e) {  
        if (s <= start && end <= e) return tree[i];  
        push_down(i, start, end);  
        int mid = (start + end) / 2;  
        int count = 0;  
        if (s <= mid) count += query(2 * i, start, mid, s, e);  
        if (e > mid) count += query(2 * i + 1, mid + 1, end, s, e);  
        return count;  
    }  
  
    void updateRange(int s, int e, int val) {  
        update(1, 1, n, s, e, val);  
    }  
  
    int queryRange(int s, int e) {  
        return query(1, 1, n, s, e);  
    }  
  
private:  
    int n;  
    vector<int> tree;  
    vector<int> lazy;  
};

const int m = 4e6;
vector<int> minp(m + 10), primes;
void init(vector<int> & minp, vector<int> & primes, int ma) {
    for(int i = 2; i <= ma; i++) {
        if(!minp[i]) {
            minp[i] = i;
            primes.emplace_back(i);
        }
        for(auto & p : primes) {
            if(i * p > ma) break;
            minp[i * p] = p;
            if(p == minp[i]) break;
        }
    }
}

int n, q;
vector<int> a;

int f(int x) {
	int ans = 0;
	while(x > 1) {
		x /= minp[x];
		ans ++ ;
	}
	return ans;
}

void solve() {
	cin >> n;
	a = vector<int>(n + 1);
	for(int i = 1, x; i <= n; i++) {
		cin >> x;
		while(x > 1) {
			a[i] ++ ;
			x /= minp[x];
		}
	}
	SegmentTree tr(a);
	cin >> q;
	while(q -- ) {
		int op, l, r;
		cin >> op >> l >> r;
		if(op == 1) {
			cout << tr.queryRange(l, r) << endl;
		}
		else {
			int w;
			cin >> w;
			tr.updateRange(l, r, f(w));
		}
	}
}


/*



*/

signed main () {
     init(minp, primes, m); // primes
    // init();
    ios::sync_with_stdio(0);
    cin.tie(0), cout.tie(0);
    int _ = 1;
//   cin >> _;
    while(_ -- ) {
        solve();
    }
    return 0;
}

D-小蓝的新技能

首先一个引理是

\[\gcd(x^3,y^3) = gcd(x,y)^3 \]

所以根据题目,我们可以得出

\[(ab)^3 = gcd(a,b)^3(n - \gcd(a,b)^3) \]

并且当\(b\)取最小值\(1\)时,可以得到\(a^3=n\),所以\(a^3 \le 10^5\)

所以可以暴力的枚举\(a\),然后枚举\(a\)的因子做\(\gcd(a,b)\),然后带入上式反解出\(b\),然后只需要判断\(b\)是否合法即可。

#include <bits/stdc++.h>
using namespace std;
// #define endl '\n'
//#define inf 1e18
typedef long long ll;
typedef __int128 lll;
typedef pair<ll, ll> P;
#define x first
#define y second
#define pi 3.14159265358
#define int long long

const int p = 1e9 + 7;
const int pp = 998244353;

int dx[8] = {-1, 0, 1, 0, -1, -1, 1, 1}, dy[8] = {0, 1, 0, -1, -1, 1, -1, 1};
int ddx[8] = {1, 1, 2, 2, -1, -1, -2, -2}, ddy[8] = {2, -2, 1, -1, 2, -2, 1, -1};

ll ksm(ll a, ll b, ll p) {
    ll ans = 1;
    while(b) {
        if(b & 1) ans = (ans * a) % p;
        b >>= 1;
        a = (a * a) % p;
    }
    return ans % p;
}

std::mt19937 rng;  // 随机数生成器  
int rand(int l, int r) {
    std::uniform_int_distribution<int> distribution(l, r);
    return distribution(rng);
}

vector<int> d[201010];
int n;
void init() {
	for(int i = 1; i <= 2e5; i++) {
		for(int j = i; j <= 2e5; j += i) {
			d[j].emplace_back(i);
		}
	}
}

int sqrt(int x) {
	int l = 0, r = 1e5;
	while(l < r) {
		int mid = (l + r + 1) >> 1;
		if(mid * mid * mid <= x) l = mid;
		else r = mid - 1;
	}
	if(l * l * l != x) return -1;
	return l;
}

void solve() {
	cin >> n;
	int ans = 0;
	for(int a = 1; a <= 1e5; a++) {
		for(auto & g : d[a]) {
			int m = n - g * g * g;
			int sq = sqrt(m);
			if(sq == -1) continue;
//             cout << "g : " << g << endl;
//             cout << "l3 : " << m << ", sq : " << sq << endl;
			int ab = sq * g;
//             cout << ab << endl;
			if(ab > 0 && ab % a == 0 && g * g * g + sq * sq * sq == n && __gcd(a, ab / a) == g) {
//                 cout << "a : " << a << ", b : " << ab / a << endl;
				ans ++ ;
                break;
			}
		}
	}
	cout << ans << endl;
}


/*



*/

signed main () {
//     init(minp, primes, m); // primes
     init();
    ios::sync_with_stdio(0);
    cin.tie(0), cout.tie(0);
    int _ = 1;
//    cin >> _;
    while(_ -- ) {
        solve();
    }
    return 0;
}

E-演算任务

其实就是简单的背包问题,\(f[i][j][0/1]\)前\(i\)个数组合出\(j\)有没有使用除2的最小花费。

难点其实是第二位可能是负数,所以要偏移一下。

#include<bits/stdc++.h>

using namespace std;

using vi = vector<int>;
using i32 = int32_t;
using i64 = long long;
using i128 = __int128;

//#define int i64

using pii = pair<int, int>;
using vii = vector<pii>;
const int inf = 1e9, INF = LLONG_MAX;
const int mod = 1e9 + 7;
const vi dx = {0, 0, 1, -1}, dy = {1, -1, 0, 0};
using edge = array<int, 3>;

i32 main() {
    ios::sync_with_stdio(false), cin.tie(nullptr);
    int n, x;
    cin >> n >> x;
    int N = abs(x) + n * 100;
    vector f(2, vector(2, vi(N * 2 + 1, inf)));
    f[0][0][0 + N] = 0;
    int i = 1;
    for (int v; n; n--, i ^= 1) {
        cin >> v;
        for (int j = -N, t; j <= N; j++) {
            t = j + v;
            if (-N <= t and t <= N) {
                f[i][0][t + N] = min(f[i ^ 1][0][t + N], f[i ^ 1][0][j + N] + 1);
                f[i][1][t + N] = min(f[i ^ 1][1][t + N], f[i ^ 1][1][j + N] + 1);
            }
            t = (j + v) / 2;

            if (-N <= t and t <= N) {
                f[i][1][t + N] = min({f[i][1][t + N], f[i ^ 1][1][t + N], f[i ^ 1][0][j + N] + 1});
            }
        }
    }
    int res = min(f[i ^ 1][0][x + N], f[i ^ 1][1][x + N]);
    if (res == inf) res = -1;

    cout << res << "\n";
    return 0;
}

F-爱学习的小蓝

#include<bits/stdc++.h>

using namespace std;

#define int long long
using vi = vector<int>;
using i32 = int32_t;
using pii = pair<int, int>;
using vii = vector<pii>;
using i128 = __int128;
const int inf = INT_MAX, INF = LLONG_MAX;
const int mod = 1e9 + 7;
const vi dx = {0, 0, 1, -1}, dy = {1, -1, 0, 0};
using edge = array<int, 3>;

vector t = {2, 8, 8, 18, 18, 32, 32};


void solve() {
    int n, res = 0;
    cin >> n;
    for (const auto i: t) {
        res++;
        n -= i;
        if (n <= 0)break;
    }
    cout << res << "\n";
    return;
}

i32 main() {
    ios::sync_with_stdio(false), cin.tie(nullptr);
    int TC;
    for (cin >> TC; TC; TC--)
        solve();
    return 0;
}

H-树上问题

换根dp

#include<bits/stdc++.h>
using namespace std;
#define x first
#define y second
typedef long long ll;
typedef pair<ll, ll> P;
#define int long long

int n;
vector<vector<int>> g;
vector<int> a, val, son, mx, val2;

int dfs1(int u, int fa) {
    for(auto & ne : g[u]) {
        if(ne == fa) continue;
        int d = dfs1(ne, u) + a[ne];
        if(d > val[u]) {
            val2[u] = val[u];
            val[u] = d;
            son[u] = ne;
        }
        else if(d > val2[u]) {
            val2[u] = d;
        }
    }
    return val[u];
}

void dfs2(int u, int fa, int now) {
    mx[u] = max(val[u], now) + a[u];
    for(auto & ne : g[u]) {
        if(ne == fa) continue;
        if(ne == son[u]) { // 重儿子
            dfs2(ne, u, max(now, val2[u]) + a[u]);
        }
        else {
            dfs2(ne, u, max(now, val[u]) + a[u]);
        }
    }
}

signed main () {
    cin >> n;
    mx = son = val = val2 = a = vector<int>(n + 1);
    for(int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    g = vector<vector<int>>(n + 1);
    for(int i = 0, u, v; i < n - 1; i++) {
        cin >> u >> v;
        g[u].emplace_back(v);
        g[v].emplace_back(u);
    }
    dfs1(1, 0);
    dfs2(1, 0, 0);
    int ans = 0;
    for(int i = 1; i <= n; i++) {
        int d1 = 0, d2 = 0;
        for(auto & ne : g[i]) {
            if(mx[ne] > d1) {
                d2 = d1;
                d1 = mx[ne];
            }
            else if(mx[ne] > d2) {
                d2 = mx[ne];
            }
        }
        ans = max(ans, d1 + d2 + mx[i]);
    }
    cout << ans << endl;
    return 0;
}

I-旅行

把点分成\((x,0/1)\)表示在\(x\)点有没有做核酸,然后不能连续经过两个0,因此建图

\[((u,0),(v,1),w+x)\\ ((u,1),(v,0),w)\\ ((u,1),(v,1),w+2) \]

以及他们的反向边,然后跑最短路就行

#include<bits/stdc++.h>

using namespace std;

#define int long long
using vi = vector<int>;
using i32 = int32_t;
using pii = pair<int, int>;
using vii = vector<pii>;
using i128 = __int128;
const int inf = INT_MAX, INF = LLONG_MAX;
const int mod = 1e9 + 7;
const vi dx = {0, 0, 1, -1}, dy = {1, -1, 0, 0};
using edge = array<int, 3>;


i32 main() {
    ios::sync_with_stdio(false), cin.tie(nullptr);
    int n, m, x;
    cin >> n >> m >> x;
    vi dis(n * 2 + 1, INF);
    dis[1] = 0;
    priority_queue<pii, vector<pii>, greater<pii>> q;
    q.emplace(0, 1);
    vector<vector<pii>> e(n * 2 + 1);
    for (int u, v, w; m; m--) {
        cin >> u >> v >> w;
        e[u].emplace_back(v + n, w + x);
        e[u + n].emplace_back(v, w);
        e[u + n].emplace_back(v + n, w + x);
        e[v].emplace_back(u + n, w + x);
        e[v + n].emplace_back(u, w);
        e[v + n].emplace_back(v + n, w + x);
    }
    vi vis(n * 2 + 1);
    while (not q.empty()) {
        auto [d, u] = q.top();
        q.pop();
        if (vis[u]) continue;
        vis[u] = 1;
        for (auto [v, w]: e[u]) {
            if (vis[v] or d + w >= dis[v]) continue;
            dis[v] = d + w;
            q.emplace(dis[v], v);
        }
    }
    cout << min(dis[n], dis[n + n]) << "\n";
    return 0;
}

J-神奇数字

任意两个数差值的gcd就是答案

#include <bits/stdc++.h>
using namespace std;
// #define endl '\n'
//#define inf 1e18
typedef long long ll;
typedef __int128 lll;
typedef pair<ll, ll> P;
#define x first
#define y second
#define pi 3.14159265358
#define int long long

const int p = 1e9 + 7;
const int pp = 998244353;

int dx[8] = {-1, 0, 1, 0, -1, -1, 1, 1}, dy[8] = {0, 1, 0, -1, -1, 1, -1, 1};
int ddx[8] = {1, 1, 2, 2, -1, -1, -2, -2}, ddy[8] = {2, -2, 1, -1, 2, -2, 1, -1};

ll ksm(ll a, ll b, ll p) {
    ll ans = 1;
    while(b) {
        if(b & 1) ans = (ans * a) % p;
        b >>= 1;
        a = (a * a) % p;
    }
    return ans % p;
}

std::mt19937 rng;  // 随机数生成器  
int rand(int l, int r) {
    std::uniform_int_distribution<int> distribution(l, r);
    return distribution(rng);
}

vector<int> d[201010];
void init () {
    for(int i = 1; i <= 2e5; i++) {
        for(int j = i; j <= 2e5; j += i) {
            d[j].emplace_back(i);
        }
    }
}

void solve() {
	int a[3] = {};
	for(int i = 0; i < 3; i++) {
		cin >> a[i];
	}
	sort(a, a + 3);
	int g = 0;
	for(int i = 0; i < 3; i++) {
		for(int j = i + 1; j < 3; j++) {
			g = __gcd(g, a[j] - a[i]);
		}
	}
//     cout << g << endl;
	if(g == 0) cout << -1 << endl;
	else {
        for(auto & x : d[g]) {
            cout << x << " ";
        }
        cout << endl;
	}
}


/*



*/

signed main () {
//     init(minp, primes, m); // primes
    init();
    ios::sync_with_stdio(0);
    cin.tie(0), cout.tie(0);
    int _ = 1;
   cin >> _;
    while(_ -- ) {
        solve();
    }
    return 0;
}

L-合成游戏

找规律

#include<bits/stdc++.h>
using namespace std;
#define int long long
//#define int __int128
#define double long double
typedef pair<int,int>PII;
typedef pair<string,int>PSI;
typedef pair<string,string>PSS;
const int N=1e5+5,INF=0x3f3f3f3f,Mod=1e9+7,mod=998244353;
const int MAXN=1e8+5;
const double eps=1e-12;
const int dx[4]={-1,1,0,0};
const int dy[4]={0,0,-1,1};

int fac[N];
int f[N];
int ksm(int a,int b){
    int res=1;
    while(b){
        if(b&1)res=res*a%Mod;
        b>>=1;
        a=a*a%Mod;
    }
    return res;
}
void init(){
    fac[0]=f[0]=1;
    int c=ksm(2,Mod-2);
    for(int i=1;i<=1e5;++i){
        fac[i]=fac[i-1]*i%Mod;
        f[i]=f[i-1]*c%Mod;
    }
}
void solve() {
    int n;
    cin>>n;
    int ans=fac[n];
    while(n>1){
        n/=2;
        ans=ans*f[n]%Mod;
    }
    cout<<ans<<'\n';
}

signed main(){
    ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
    int t=1;
    cin>>t;
    init();
    while(t--){
        solve();
    }
    return 0;
}

标签:const,萌新,int,long,2022,ans,河南大学,using,define
From: https://www.cnblogs.com/PHarr/p/18006862

相关文章

  • 2022省赛B组真题
    2022省赛B组真题(时间复杂度:如果1s就要控制在1亿以内)填空题1.顺子日期小明特别喜欢顺子。顺子指的就是连续的三个数字:123、456等。顺子日期指的就是在日期的yyyymmdd 表示法中,存在任意连续的三位数是一个顺子的日期。例如20220123就是一个顺子日期,因为它出现了一个顺子:123......
  • Windows Server 2022 OVF, updated Jan 2024 (sysin) - VMware 虚拟机模板
    WindowsServer2022OVF,updatedJan2024(sysin)-VMware虚拟机模板2024年1月版本更新,现在自动运行sysprep,支持ESXiHostClient部署请访问原文链接:https://sysin.org/blog/windows-server-2022-ovf/,查看最新版。原创作品,转载请保留出处。作者主页:sysin.org现在......
  • P8338 [AHOI2022] 排列
    建边:\(i\top_i\),这样会形成若干个置换环,每次操作相当于每个点同时走一步。记置换环的数量为\(m\),从\(1\)到\(m\)编号,第\(i\)个置换环的大小是\(s_i\),\(bel_i\)为点\(i\)所属的置换环编号。显然\(f(i,j)=0\)的充要条件是\(i,j\)在同一置换环上,否则\(f(i,j......
  • 2022CCPC女生赛-L.彩色的树(线段树合并)
     链接Problem-L-Codeforces以前迷迷糊糊用dsuontree写的题目但是其实没搞明白现在换一种写(太菜了还是没搞明白dsuontree)题意:给你一棵树,询问给定询问的节点上,子树内距离小于等于k的节点不同颜色的种类有多少个。k是固定的值。解法:本题做法为比较板子的线段树合并,......
  • 在 Windows 10 上使用 Visual Studio 2022 C++ 桌面开发
    工具下载链接:https://pan.quark.cn/s/c70b23901ccb环境介绍在今天的快速发展的软件开发行业中,选择合适的开发环境是非常关键的一步。对于C++开发人员来说,VisualStudio2022(VS2022)是一个强大的集成开发环境(IDE),特别是在Windows10操作系统中。安装VisualStudio2022本文将引导您......
  • 2022-2023 ICPC East Central North America Regional Contest (ECNA 2022)
    Preface闲了两天没训练,今天又开始上班,结果唐得发昏后期也没题可写直接光速下班只能说感觉老外的题目难度跨度都好大,easy确实简单,hard确实难,medium确实少A.A-MazingPuzzle题目看起来很复杂,但仔细一想会发现有用的状态总数只有\(4n^2\)种即我们可以暴力记录下两个机器人的坐......
  • vs2022支持c++20 import模块功能
    参考链接:https://blog.csdn.net/fellow1984/article/details/124819231工具->获取工具和功能->VisualStudioInstaller->单个组件:搜索C++模块,勾选项目属性对应项修改编译代码即可//helloworldimport<iostream>;intmain(){ std::cout<<"helloworld\n";......
  • 萌新的多项式学习笔记(板子)
    萌新的多项式学习笔记(板子)详细讲解FFT直接放板子structcp{ doublex,y; cp(doublexx=0,doubleyy=0){x=xx,y=yy;}};intr[maxn];cpoperator+(constcp&a,constcp&b){returncp(a.x+b.x,a.y+b.y);}cpoperator-(constcp&a,constcp&b){returncp(a.x-b.x,a......
  • 【Loading】ctfshow_WriteUp | _萌新
    萌新_密码1题目密文:53316C6B5A6A42684D3256695A44566A4E47526A4D5459774C5556375A6D49324D32566C4D4449354F4749345A6A526B4F48303D提交格式:KEY{XXXXXXXXXXXXXX}分析所有字符由数字和ABCDEF组成,先用HEX解码得到S1lkZjBhM2ViZDVjNGRjMTYwLUV7ZmI2M2VlMDI5OGI4ZjRkOH0=。......
  • 李宏毅《机器学习》总结 - 2022 HW3(图像识别、CNN) Strong Baseline
    调参调吐了。。最好做到了private0.82/public0.808这题前前后后做了五天。。主要是后来train一次就得花很长很长时间,我的kaggle余额也用的差不多了。。这个题目大概就是给你11种食物的图片,让你学习,并分类CNN处理图片就先转化成\(128\times128\)个pixel,然后做......