Submission #381903

#TimeUsernameProblemLanguageResultExecution timeMemory
381903NONAMEVepar (COCI21_vepar)C++17
0 / 70
160 ms235628 KiB
#include <bits/stdc++.h> using namespace std; mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count()); template <typename T> inline bool chmin(T& a, const T b) {a = min(a, b); return (a == b);} template <typename T> inline bool chmax(T& a, const T b) {a = max(a, b); return (a == b);} const int man = (int)(1e7 + 10); bool was[man]; vector <int> prime; vector <array <int, 2> > v[man]; inline void cls() {} void solve() { cls(); int a, b, c, d; cin >> a >> b >> c >> d; for (int i = a; i <= b; ++i) {} cout << "DA\n"; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); // int t = 1; #ifdef _LOCAL system("color a"); freopen("in.txt", "r", stdin); // cin >> t; #endif for (int i = 2; i <= 1e4; ++i) { if (was[i]) { continue; } prime.push_back(i); if ((i * i) <= 1e4) { for (int j = (i * i); j <= 1e4; j += i) { was[j] = true; } } } for (int i = 2; i <= 1e4; ++i) { int d = i; vector <array <int, 2> > cur; for (int j = 0; (j < (int)(prime.size())) && ((prime[j] * prime[j]) <= d); ++j) { int cnt = 0; while ((d % prime[j]) == 0) { d /= prime[j]; ++cnt; } if (cnt) { cur.push_back({prime[j], cnt}); } } if (d != 1) { cur.push_back({d, 1}); } v[i] = cur; } int t; cin >> t; while (t--) { solve(); } // for (int i = 1; i <= t; ++i) { // cerr << "Case #" << i << ": \n"; // solve(); // cerr << "\n"; // } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...