T(n) as the sum of all numbers which are positive integers can divied n. and S(n) = T(1) + T(2) + T(3)…..+T(n). 定义T(n)为n的因子和($\sigma(n)$),求$S(n) % 2=\sum\limits_{i=1}^{n}T(i) mod 2$,n<=1e9. 你总是说找规律,可是找规律已经累了.找规律不想对付数论题,它想做水题(这个就是呀),你考虑过它的感受吗?没有!你只关心你…
E. Holes Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/13/problem/E Description Little Petya likes to play a lot. Most of all he likes to play a game «Holes». This is a game for one person with following rules: There are…
Description An array of positive integers a1, a2, ..., an is given. Let us consider its arbitrary subarray al, al + 1..., ar, where 1 ≤ l ≤ r ≤ n. For every positive integer s denote by Ks the number of occurrences of s into the subarray. We call the…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6152 题意:判定一个无向图是否有三个点的团或者三个点的独立集. 解法:Ramsey theorem,n >= 6 直接输出 Bad 否则暴力.我是直接暴力,加个break优化就好了. #include <bits/stdc++.h> using namespace std; typedef long long LL; const int maxn = 3e3+3; bool w[maxn][…