![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
乱搞
Ren_Ivan
衡中oier,fight for furture
展开
-
与非 乱搞233
题目大意: 初始时你有一个空序列,之后有N个操作。 操作分为一下两种: 1. x:在序列末尾插入一个元素x(x=0或1)。 2.LR:定义nand[L,R]为序列第L个元素到第R个元素的与非和,询问nand[L,L]^nand[L,L+1]^nand[L,L+2]^……^nand[L,R]。 Nand就是先与,再取反 f[n]=nand(1,i); sum[n]=∑ni=1f(i)\su原创 2017-08-08 17:22:47 · 268 阅读 · 0 评论 -
bzoj 4173 打表???
没有任何思路,打表发现ans=phi(n)*phi(m)*n*m %%% popoqqq Orz 然而并没有看懂……#include<cstdio>#include<cstring>#include<iostream>#include<algorithm>#include<cmath>#define mod 998244353llusing namespace std;long原创 2017-08-12 17:11:10 · 333 阅读 · 0 评论 -
NOIP2013华容道 大爆搜
预处理出每个点周围四个点互相到达的最短路,再在整个图上跑SPFA,要记录路径#include#include#include#include#include#include#define N 32using namespace std;int dx[4]={-1,1,0,0},dy[4]={0,0,-1,1};int n,m,g[N][N],dis[N][N][5][5],f原创 2017-08-20 17:43:59 · 348 阅读 · 0 评论