Mod Tree Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 96 Accepted Submission(s): 38 Problem Description The picture indicates a tree, every node has 2 children. The depth of the nodes whos…
http://acm.hdu.edu.cn/showproblem.php?pid=2815 //解 K^D ≡ N mod P #include<map> #include<cmath> #include<cstdio> #include<iostream> using namespace std; map<int,int>mp; typedef long long LL; void read(int &x) { x=; char c=…
Accepted 406MS 8576K 2379 B C++/** 这里加了一点限制,,大体还是一样的,, **/ #include <iostream> #include <cstdio> #include <cmath> #include <cstring> #include <algorithm> using namespace std; long long a,b,n; ; bool Hash[maxn]; long long val[…