题目的意思是要选一些数,但是这些数如果满足两个条件的话就不能一起被选. type arr=record toward,next,cap:longint; end; const maxn=; maxm=; var gap,first,cur,d,num1,num2:..maxn]of longint; edge:..maxm]of arr; tot,s,t,n,esum,sum:longint; function min(x,y:longint):longint; begin if x<y the…
3858: Number Transformation Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 82 Solved: 41[Submit][Status] Description Teacher Mai has an integer x. He does the following operations k times. In the i-th operation, x becomes the least integer no less th…
Search GO 说明:输入题号直接进入相应题目,如需搜索含数字的题目,请在关键词前加单引号 Problem ID Title Source AC Submit Y 1000 A+B Problem 10983 18765 Y 1036 [ZJOI2008]树的统计Count 5293 13132 Y 1588 [HNOI2002]营业额统计 5056 13607 1001 [BeiJing2006]狼抓兔子 4526 18386 Y 2002 [Hnoi2010]Bounce 弹飞绵羊 43…
把我写吐了 太弱了 首先按照欧拉函数性质 我只需要统计区间不同质数个数就好了 一眼主席树 其次我被卡了分解质因数这里 可以通过质数筛时就建边解决 不够灵性啊,不知道如何改 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e6+1000; const int H = 5e4+5; const int M = H*100; const int mod = 1e6+777; int i…
本来以为是一道数学题,一顿XJBT导式子,结果就是个幼儿园都会的模拟. Code: #include<bits/stdc++.h> #define ll long long using namespace std; int main(){ ll n; scanf("%lld",&n); int ans=0; for(;n>1;++ans){ if(n%2==0) n>>=1; else n=n*3+1; } printf("%d"…
Code: #include <bits/stdc++.h> #define ll long long #define maxn 50207 #define setIO(s) freopen(s".in","r",stdin) #define mod 1000777 using namespace std; struct Tree { int tot; int lson[maxn*270],rson[maxn*270]; ll mul[maxn*270]…