# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
711643 | 2023-03-17T10:31:38 Z | stevancv | Brunhilda’s Birthday (BOI13_brunhilda) | C++14 | 0 ms | 0 KB |
/*#include <bits/stdc++.h> #define ll long long #define ld long double #define sp ' ' #define en '\n' #define smin(a, b) a = min(a, b) #define smax(a, b) a = max(a, b) using namespace std; const int N = 1e5 + 2; const int M = 1e7 + 2; const int inf = 2e9; vector<int> primes[M]; int sieve[M]; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); for (int i = 2; i < M; i++) { if (sieve[i] != 0) continue; sieve[i] = i; if (i > 4000) continue; for (int j = i * i; j < M; j += i) sieve[j] = i; } for (int i = 2; i < M; i++) { int j = i; while (j > 1) { int x = sieve[j]; while (j % x == 0) j /= x; primes[i].push_back(x); } } return 0; } */