Submission #534758

#TimeUsernameProblemLanguageResultExecution timeMemory
534758Icebear16Keys (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; }

Compilation message (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...