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...