제출 #465801

#제출 시각아이디문제언어결과실행 시간메모리
465801MohamedFaresNebiliHandcrafted Gift (IOI20_gift)C++14
0 / 100
1578 ms12428 KiB
#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; }

컴파일 시 표준 에러 (stderr) 메시지

gift.cpp: In function 'int construct(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
gift.cpp:10:8: warning: unused variable 'cnt' [-Wunused-variable]
   10 |    int cnt=0;
      |        ^~~
#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...