# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
465822 | MohamedFaresNebili | Handcrafted Gift (IOI20_gift) | C++14 | 0 ms | 0 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 "gift.h"
#include <bits/stdc++.h>
using namespace std;
int construct(int n, int r, std::vector<int> a, std::vector<int> b, std::vector<int> x) {
string s=""; char c='R'; bool f=true;
for(int l=0;l<n;l++) {
s=s+c;
if(c=='R') c='B';
else c='R';
}
for(int l=0;l<r&&f;l++) {
int x=a[l], y=b[l];
if(x==y) f=false;
}
if(used) { craft(s); return 1; }
return 0;
}