
Best coder
jn_8316
这个作者很懒,什么都没留下…
展开
-
jrMz and angles
题目链接:http://bestcoder.hdu.edu.cn/contests/contest_chineseproblem.php?cid=686&pid=1001 简单的数学题 #include #include using namespace std; int main() { int T; int flag; int a, b; ///c原创 2016-05-13 21:20:46 · 310 阅读 · 0 评论 -
取一个数的第i位
运用了一个函数,将X移i位,得到的数和1做位与运算,得到的就是X的第i位#include using namespace std; typedef unsigned long long ull; ull bits(ull x,int i) { return (x >> i) & 1ULL; } int main() { int testCase,i; while (ci原创 2016-05-14 20:41:10 · 592 阅读 · 0 评论 -
单调栈
给定一组数,做成单调递增栈(栈底到栈顶递增),一组数的选择会影响到这个程序 #include #include #include using namespace std; int main() { int a[10]={1,5,9,2,4,2,6,10},i; stacks; while(!s.empty()) s.pop(); s.push(a[0]);原创 2016-05-15 15:46:50 · 255 阅读 · 0 评论