# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
465801 | MohamedFaresNebili | Handcrafted Gift (IOI20_gift) | C++14 | 1578 ms | 12428 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) {
bool used=true; string s(n, 'X');
for(int l=0;l<r&&used;l++) {
int lo=a[l], hi=b[l], w=x[l];
if(w==1) {
int cnt=0;
for(int i=lo;i<=hi;i++)
s[i]='R';
}
}
for(int l=0;l<n;l++)
if(s[l]=='X') s[l]='B';
if(used) { craft(s); return 1; }
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... |