2.8k3 分钟

参考:将线段树封装成模板 线段树封装成模板需要C++20 :) #include<bits/stdc++.h> using namespace std; using ll=long long; template < typename T, auto op, T e, typename F, auto mapping, auto composition, F e1 > class segtree { int n; vector< T > v; vector< F >
2.8k3 分钟

以后小t出的题还是赶紧跑,D是个原味大模拟。 #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; const
7441 分钟

#include<bits/stdc++.h> using namespace std; using ll=long long; ll query(ll x){ cout<<"walk "<<x<<endl; cin>>x; return x; } void guess(ll x){ cout<<"guess "<<x<<endl; exit(0); }
1.4k1 分钟

洛谷P2522的弱化版 #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; const double eln
1.4k1 分钟

#include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; const double eln = 2.718