#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pii pair<int,int>
const int INF = 2e9;
struct d{
int a;
int b;
int c;
};
d gentrojki(){
int a = rand() % 10;
int b = rand() % 10;
int c = rand() % 10;
return {a, b, c};
}
set<int> usuniete;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int seed;
cin >> seed;
srand(seed);
int a = rand() % 10;
int b = rand() % 10;
int c = rand() % 10;
while(a == 0 and b == 0 and c == 0){
a = rand() % 10;
b = rand() % 10;
c = rand() % 10;
}
cout << a << " " << b << " " << c << "\n";
int n = 10;
cout << n << "\n";
int cnt = 0;
while(n > 0){
int W = rand() % 2;
if(W == 0){
d t = gentrojki();
if(t.a + t.b + t.c == 0) continue;
cnt++;
cout << "A " << t.a << " " << t.b << " " << t.c << "\n";
n--;
}
else{
if(usuniete.size() == cnt) continue;
cout << "R ";
int x = rand() % cnt + 1;
while(usuniete.find(x) != usuniete.end()){
x = rand() % cnt + 1;
}
cout << x << "\n";
usuniete.insert(x);
n--;
}
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |