Submission #444900

#TimeUsernameProblemLanguageResultExecution timeMemory
444900ala2Handcrafted Gift (IOI20_gift)C++14
25 / 100
151 ms20108 KiB
#include "gift.h" #include <iostream> using namespace std; int construct(int n, int r, vector<int> a, vector<int> b, vector<int> x) { string s(n,'R'); if(x[0]==1) { craft(s); return 1; } if(x[0]==2) { for(int i=0; i<r; i++) { if(a[i]==b[i]) { return 0; } } for(int i=1; i<n; i+=2) { s[i]='B'; } craft(s); return 1; } }

Compilation message (stderr)

gift.cpp: In function 'int construct(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
gift.cpp:6:19: warning: control reaches end of non-void function [-Wreturn-type]
    6 |     string s(n,'R');
      |                   ^
#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...