Submission #629121

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
6291212022-08-14 07:59:18urd05Rarest Insects (IOI22_insects)C++17
Compilation error
0 ms0 KiB
#include "insects.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> v;
bool in[2000];
bool vis[2000];
int mnv;
int val;
int mi(int i) {
in[i]=true;
move_inside(v[i]);
}
int mo(int i) {
in[i]=false;
move_outside(v[i]);
}
int pb() {
return press_button();
}
void clean() {
for(int i=0;i<n;i++) {
if (in[i]) {
mo(i);
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

insects.cpp: In function 'int mi(int)':
insects.cpp:14:1: warning: no return statement in function returning non-void [-Wreturn-type]
   14 | }
      | ^
insects.cpp: In function 'int mo(int)':
insects.cpp:19:1: warning: no return statement in function returning non-void [-Wreturn-type]
   19 | }
      | ^
insects.cpp: In function 'void clean()':
insects.cpp:26:19: error: 'n' was not declared in this scope
   26 |     for(int i=0;i<n;i++) {
      |                   ^
insects.cpp: In function 'bool isp(int)':
insects.cpp:73:18: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   73 |     if (in.size()==x*val) {
      |         ~~~~~~~~~^~~~~~~
insects.cpp:74:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   74 |         for(int i=0;i<in.size();i++) {
      |                     ~^~~~~~~~~~
insects.cpp:80:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   80 |     for(int i=0;i<out.size();i++) {
      |                 ~^~~~~~~~~~~