# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
903613 | Tenis0206 | Street Lamps (APIO19_street_lamps) | C++11 | 1 ms | 600 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;
int n,q;
int main()
{
freopen("nr.in","r",stdin);
freopen("nr.out","w",stdout);
srand(time(NULL));
cin>>n>>q;
cout<<n<<' '<<q<<'\n';
for(int i=1;i<=n;i++)
{
cout<<rand() % 2;
}
cout<<'\n';
for(int i=1;i<=n;i++)
{
int tip = rand() % 2;
if(tip == 0)
{
cout<<"toggle ";
cout<<1 + rand() % n<<'\n';
}
else
{
cout<<"query ";
int st = 1 + rand() % (n + 1);
int dr = 1 + rand() % (n + 1);
while(st == dr)
{
st = 1 + rand() % (n + 1);
dr = 1 + rand() % (n + 1);
}
if(st > dr)
{
swap(st,dr);
}
cout<<st<<' '<<dr<<'\n';
}
}
return 0;
}
Compilation message (stderr)
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |