제출 #444900

#제출 시각아이디문제언어결과실행 시간메모리
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; } }

컴파일 시 표준 에러 (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...