Submission #417943

#TimeUsernameProblemLanguageResultExecution timeMemory
417943aris12345678Handcrafted Gift (IOI20_gift)C++14
25 / 100
170 ms21896 KiB
#include <bits/stdc++.h> #include "gift.h" using namespace std; const int mxN = 500005; bool subtask1(vector<int> x, int r) { for(int i = 0; i < r; i++) { if(x[i] != 1) return false; } return true; } int construct(int n, int r, vector<int> a, vector<int> b, vector<int> x) { string ans = ""; if(subtask1(x, r)) { for(int i = 0; i < n; i++) ans += 'R'; craft(ans); return 1; } for(int i = 0; i < r; i++) { if(a[i] == b[i]) return 0; } for(int i = 0; i < n; i++) { if(i%2 == 0) ans += 'R'; else ans += 'B'; } craft(ans); return 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...