Submission #1099790

#TimeUsernameProblemLanguageResultExecution timeMemory
1099790model_codeMessage (IOI24_message)C++17
0 / 100
141 ms816 KiB
// runtime_error/misbehaving1.cpp #include "message.h" #include <bits/stdc++.h> using namespace std; vector<vector<bool>> msgs; int ind=0; // Trying to use global variables to save message, doesn't fail when shuffling but fails with different instances. void send_message( std::vector<bool> message, std::vector<bool> positions) { msgs.push_back(message); for(int i=0;i<10;i++) { vector<bool> cur(31, (ind>>i)&1); send_packet(cur); } } std::vector<bool> receive_message( std::vector<std::vector<bool>> received_bits) { int ind=0; for (int i=0;i<received_bits.size();i++) { auto round=received_bits[i]; std::sort(round.begin(), round.end()); ind |=round[15]; } return msgs[ind]; }

Compilation message (stderr)

message.cpp: In function 'std::vector<bool> receive_message(std::vector<std::vector<bool> >)':
message.cpp:27:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<bool> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   27 |   for (int i=0;i<received_bits.size();i++) {
      |                ~^~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...