
小技巧
dukig
尽人事,知天命。
展开
-
poj2566 (尺取法)
链接:https://cn.vjudge.net/problem/POJ-2566 #include<iostream> #include<algorithm> #include<cstdio> #include<cstring> #include<cmath> using namespace std; typedef sz 1000...原创 2019-04-09 19:00:39 · 409 阅读 · 0 评论 -
poj2739(尺取法)
链接:https://vjudge.net/problem/POJ-2739 问的是一个数字可以由多少个连续的质数相加而得 #include<stdio.h> #include<string.h> #include<algorithm> #include<cmath> using namespace std; bool is_primes[10...原创 2019-04-09 20:14:28 · 274 阅读 · 0 评论 -
hdoj6186(前缀,后缀)
给定n个数与q次询问,每次询问一个数k,求去掉那个数后所以数的与,或,非。 递归求出每个位置的所有前缀,后缀和。 #include<bits/stdc++.h> using namespace std; const int sz = 100005; int a[sz],sum1[sz],sum2[sz],sum3[sz],rsum1[sz],rsum2[sz],rsum3[sz...原创 2019-04-10 00:30:45 · 147 阅读 · 0 评论