# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
857513 | Trisanu_Das | Radio (COCI22_radio) | C++17 | 354 ms | 61288 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |