摘要:NC15079 大水题 模板题 #include<bits/stdc++.h> #define LL long long using namespace std; LL a[5]={0,2,5,11,13}; int main() { LL n; while(scanf("%lld",&n)!=EO
阅读全文
摘要:线性dp: NC16708 过河卒 noip2002的题,注意LL和数组下标不要越界 #include<bits/stdc++.h> #define LL long long using namespace std; LL mp[30][30],dp[30][30]; int main() { in
阅读全文
摘要:栈: NC14893 栈和排序 保证输出字典序最大,预处理maxx[i]为i~n的最大值 如果当前的数比后面的数都要大的话一定就要在这个时候弹出来 #include<bits/stdc++.h> #define LL long long #define INF 0x3f3f3f3f using na
阅读全文