Cf438D The Child and Sequence
有点吉司机线段树的味
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
const int maxn=1e5+9;
struct Node{
ll l,r,v,ma;
}tr[maxn<<2];
ll n,m,a[maxn];
void build (int l,int r,int tot){
if(l==r){
tr[tot].v=tr[tot].
more...CF914D Bash and a Tough Math Puzzle
#include<bits/stdc++.h>
using namespace std;
using ll =long long ;
const int maxn=5e5+9;
struct Node{
int l,r,v;
}tr[maxn<<2];
int gcd(int ma,int mi){return mi?gcd(mi,ma%mi):ma;}
int a[maxn],n,m,cnt;
void build(int l,int r,int now){
more...ICPC第二场网络赛B
有思路但老是被否,自己却难以implement
#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
more...