# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
857513 | Trisanu_Das | Radio (COCI22_radio) | C++17 | 354 ms | 61288 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
void solve1(int n, int q){
bool a[n + 1]; memset(a, false, sizeof(a));
while(q--) {
char t; cin >> t;
if (t == 'S') {
int x; cin >> x;
a[x] = !a[x];
}else{
int x, y; cin >> x >> y;
bool ans = true;
for (int i = x; i <= y; i++){
if (!a[i]) continue;
for (int j = i + 1; j <= y; j++){
if (a[j] && __gcd(i, j) > 1) {
ans = false; break;
}
}
if(ans) break;
}
if (ans) cout << "NE\n"; else cout << "DA\n";
}
}
}
void solve2(int n, int q){
vector<vector<int>> prime(n + 1);
for (int i = 2; i <= n; ++i){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |