HDU 2841 Visible Trees £;%%%%%%%%£
Ì â ää 'ó Ò â £° ø äã Ò» ö öm * n µä· £ £;?½ ½? 1 £1 £1. please refer to the following link for more information) µã ò Ï Â ¿'£;ä Ä ää Ü 'Then there are too many other users who have bought them.
½ Â Ì â Ë ¼ Â?» ° Ò ° ó Ú úranâ Ì Ï É éµ µä÷ Ä äç Ç ² ''2» ¼ û µä° £ £µ² ס µä» ° guíç çázâ ö öð µ µämäú ~~~~~~~*************************************** £;****=£°
Registrantéè A Î ª (0, 0) â ç û bäüzúµ² × ¡C £ä äçá 'bó ë C ×é ³ éµä¾ Ø Ð Ö ö~nx, mx Ç ç²» ¥öw.µä{£< symbol · blank "http://www.bkjia.com/kf/ware/vc/" target = "_ blank" class = "keylink"> vcD4KPHA + y/nS1Hi00zG/qsq8w7a + users/u0 + users/users + 1xLuwztLDx7/users/W9 + NDQyN2z4qOsx/users + CjxzdHJvbmc + users + fill + fill = "brush: java; "> 21 12 3
Sample Output
15
#include #include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define eps 1e-8#define M 1000100#define LL long long//#define LL long long#define INF 0x3f3f3f#define PI 3.1415926535898#define mod 1000000007const int maxn = 100010;using namespace std;struct node{ int num[8]; int ans;} p[maxn];int f[maxn];int k[maxn];int t;void prime(){ t = 0; memset(f, 0, sizeof(f)); for(int i = 2; i <= maxn-5; i++) { if(!f[i]) k[t++] = i; for(int j = 0; j < t; j++) { if(i*k[j] > maxn-5) break; f[i*k[j]] = true; if(i%k[j] == 0) break; } }}LL judge(int n, int x){ LL cnt = 0; for(int i = 0; i < (1<<(p[x].ans)); i++) { int ss = 0; int sx = 1; for(int j = 0; j < p[x].ans; j++) { if((1<
>T; while(T--) { scanf("%d %d",&n, &m); LL sum = n; for(int i = 2; i <= m; i++) sum += judge(n, i); cout<