摘要:
View Code 1 #include<iostream> 2 #include<set> 3 #include<cstdio> 4 #include<cmath> 5 #include<vector> 6 #include<algorithm> 7 #define MAXN 40004 8 using namespace std; 9 typedef long long int ll;10 int dp[MAXN];11 struct point {12 int x,y;13 int val,t;14 point(){ 阅读全文
摘要:
View Code 1 #include<iostream> 2 #include<set> 3 #include<cstdio> 4 #include<cmath> 5 using namespace std; 6 typedef long long int ll; 7 set<ll> S; 8 9 void prepare()10 {11 ll end = ll(sqrt(double((1<<31) - 1)));12 for (ll i(2); i<=end; ++i) {13 S.insert(i*i); 阅读全文
摘要:
View Code 1 #include<iostream> 2 #include<cstdio> 3 using namespace std; 4 5 int main() 6 { 7 int n; 8 while (scanf("%d",&n) != EOF) { 9 int cnt(0);10 while (n) {11 cnt += (n&1);12 n >>= 1; 13 } 14 printf("%d\n",(1<... 阅读全文