https://www.luogu.org/problemnew/show/P1579 先预处理出素数看看有多少个,大概才2500个不到(事实上素数的个数大约是 $\frac{n}{ln(n)}$ ),所以他们两两组合不会超过 $10^7$ ,从小到大枚举所有的两两组合,算出第三个是不是素数即可. #include<bits/stdc++.h> using namespace std; #define ll long long int n; ]; ]; ; int init(){ num[]=…
D. Dima and Lisa Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/584/problem/D Description Dima loves representing an odd number as the sum of multiple primes, and Lisa loves it when there are at most three primes. Help them…