随笔分类 - 算法入门经典
摘要:#include<iostream> using namespace std; #include<stack> #include<cstdio> const int maxn = 1000+5; int a[maxn]; int main(){ int n; scanf("%d",&n);//3 s
阅读全文
摘要:#include<iostream> using namespace std; #include<string> #include<algorithm> const int len = 60; const int maxn = 1000+5; string data[maxn]; void prin
阅读全文
摘要:#include<iostream> using namespace std; #include<vector> #include<cstring> struct BigInteger{ static const int BASE = 100000000; static const int WIDT
阅读全文
摘要:#include<iostream> using namespace std; #include<vector> #include<cstring> struct BigInteger{ static const int BASE = 100000000; static const int WIDT
阅读全文
摘要:#include<iostream> #include<set> #include<vector> #include<queue> using namespace std; typedef long long LL; int coeff[3] = {2,3,5}; int main(){ prior
阅读全文
摘要://find_block //找到a所在堆p和高度h //clear_above //将p堆h高度上方所有方块归位 //pile_onto //将p堆h高度及上方所有方块移至p2 //print //打印 #include<iostream> #include<cstdio> #include<ve
阅读全文
摘要:#include<cstdio> #include<algorithm> using namespace std; const int maxn = 10000; int main(){ int n,q,x,a[maxn],kase = 0; while(scanf("%d%d",&n,&q)==2
阅读全文
摘要:#include<iostream> #include<string> #include<sstream> using namespace std; int main(){ string line; while(getline(cin,line)){ long long sum = 0,x; str
阅读全文