随笔分类 -  位运算

摘要:problem把一个数n进行拆分拆分出来大于一的数两两不等,使得拆出来的数可以组成[1, n]间的所有数求最少拆成多少个数。n using namespace std;int main(){ int n,ans=0; cin>>n; while(n)n>... 阅读全文
posted @ 2018-05-28 13:26 gwj1139177410 阅读(100) 评论(0) 推荐(0)
摘要:problemsolutioncodes#includeusing namespace std;int main(){ unsigned int n, x; while(cin>>n &&n){ x = n&-n; cout<<... 阅读全文
posted @ 2018-05-26 13:24 gwj1139177410 阅读(110) 评论(0) 推荐(0)
摘要:problemT组数据,每组包含n对ai,bi和一个p。 每组输出一个答案,&#x2211;i=1naibi&#x0025;p" role="presentation" style="position: relative;">∑ni=1aibi%p∑i=1naibi%... 阅读全文
posted @ 2018-05-21 13:16 gwj1139177410 阅读(231) 评论(0) 推荐(0)

选择