
思维
dukig
尽人事,知天命。
展开
-
hdoj6185(递推+矩阵快速幂)
给定n,问4*n的平面由2*1或1*2的板砖铺满要多少块。 看图说话,可能对大神来说最难的是解决前4块。 #include <iostream> #include <cstring> #include <cstdio> using namespace std; #define LL long long const int mod=1000000007...原创 2019-04-10 20:54:53 · 196 阅读 · 0 评论 -
处女座的砝码(思维 找规律)
链接:https://ac.nowcoder.com/acm/contest/327/C 砝码每次都选3的k次放。。 #include<iostream> #include<algorithm> #include<cstdio> #include<cstring> using namespace std; int main(){ long ...原创 2019-04-09 14:46:25 · 171 阅读 · 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 评论 -
D. Stas and the Queue at the Buffet(贪心)
链接:http://codeforces.com/contest/1151/problem/D 根据题目对a与b排序 #include<cstdio> #include<cstring> #include<algorithm> #include<iostream> #include<vector> #include<queue...原创 2019-04-21 14:27:48 · 232 阅读 · 0 评论