BZOJ3211花神游历各国 BZOJ luogu 分块 记一个all表示该块是否全部<=1,如果all不为真就暴力修改 因为一个数被开根的次数不多,即使\(10^{12}\)只要开根6次也会变成1,所以复杂度是可以证明的 注意BZOJ数据含0 #define ll long long #include<bits/stdc++.h> using namespace std; const int N=1e5+5; int re(){ int x=0,w=1;char ch=getchar(
GSS4 - Can you answer these queries IV || luogu4145上帝造题的七分钟2 / 花神游历各国 GSS4 - Can you answer these queries IV 题目链接:https://www.luogu.org/problemnew/show/SP2713 线段树经典题目,然而被我用分块A了. 对于区间开根号,\(1e18\)最多会被开\(6\)次就会成为\(1\),成为\(1\)后,再开根号也是\(1\),0开根号也是0,线段树(分块
最近刷LettCode,遇到几个没思路的算法题,都是关于位运算的 # 136 Single Number Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without u