# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
821919 | BidoTeima | Lamps (JOI19_lamps) | C++17 | 1087 ms | 66864 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>
typedef long long ll;
using namespace std;
int main()
{
int n;
string a,b;
cin>>n>>a>>b;
for(char&ch:a)ch-='0';
for(char&ch:b)ch-='0';
map<vector<int>,int>ind{};
vector<int>vec[20];
vector<int>vmsk[20];
int mask[20];
int to[2][20];
int cur=0;
for(int i = 0; i < 8; i++){
vector<int>v;
int msk=0;
for(int j = 0; j < 3; j++){
if(i&(1<<j))v.push_back(j),msk+=(1<<j);
}
vmsk[msk]=v;
do{
vec[cur]=v;
ind[v]=cur;
mask[cur]=msk;
++cur;
}while(next_permutation(v.begin(),v.end()));
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... |