제출 #534758

#제출 시각아이디문제언어결과실행 시간메모리
534758Icebear16열쇠 (IOI21_keys)C++17
0 / 100
0 ms280 KiB
#include <vector> std::vector<int> find_reachable(std::vector<int> r, std::vector<int> u, std::vector<int> v, std::vector<int> c) { std::vector<int> ans(r.size(), 1); for(int i=0;i<r.size();i++){ if(r[i]==0){ ans[i]=0; } } bool temp=false; for(int i=0;i<r.size();i++){ if(ans[i]==1){ temp=true; } } if(temp==false){ for(int i=0;i<r.size();i++){ ans[i]=1; } } return ans; }

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

keys.cpp: In function 'std::vector<int> find_reachable(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
keys.cpp:5:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    5 |  for(int i=0;i<r.size();i++){
      |              ~^~~~~~~~~
keys.cpp:11:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 |  for(int i=0;i<r.size();i++){
      |              ~^~~~~~~~~
keys.cpp:17:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |   for(int i=0;i<r.size();i++){
      |               ~^~~~~~~~~
#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...