Submission #1071982

# Submission time Handle Problem Language Result Execution time Memory
1071982 2024-08-23T13:00:07 Z edogawa_something How to Avoid Disqualification in 75 Easy Steps (CEOI23_avoid) C++17
10 / 100
1 ms 344 KB
#include "avoid.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vii;
typedef pair<ll,ll> pii;
#define F first
#define S second
#define all(v) v.begin(),v.end()
#define pb push_back
const ll M=5e5+10;
const ll inf=2e18;

pair<int, int> scout(int R, int H) {
  for(int bit=0;bit<10;bit++) {
    vector<int>v;
    for(int i=1;i<=1000;i++) {
      if((i&(1<<bit))>0)
        v.pb(i);
    }
    send(v);
  }
  vector<int>v=wait();
  int ans=0;
  for(int i=0;i<v.size();i++) {
    ans+=(v[i]*(1<<i));
  }
  return {ans,ans};
}

Compilation message

avoid.cpp: In function 'std::pair<int, int> scout(int, int)':
avoid.cpp:25:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   25 |   for(int i=0;i<v.size();i++) {
      |               ~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Correct: 10 robot(s) used, 1 hour(s) passed
2 Correct 0 ms 344 KB Correct: 10 robot(s) used, 1 hour(s) passed
3 Correct 0 ms 344 KB Correct: 10 robot(s) used, 1 hour(s) passed
4 Correct 1 ms 344 KB Correct: 10 robot(s) used, 1 hour(s) passed
5 Correct 0 ms 344 KB Correct: 10 robot(s) used, 1 hour(s) passed
6 Correct 0 ms 344 KB Correct: 10 robot(s) used, 1 hour(s) passed
7 Correct 0 ms 344 KB Correct: 10 robot(s) used, 1 hour(s) passed
8 Correct 0 ms 344 KB Correct: 10 robot(s) used, 1 hour(s) passed
9 Correct 0 ms 344 KB Correct: 10 robot(s) used, 1 hour(s) passed
10 Correct 0 ms 344 KB Correct: 10 robot(s) used, 1 hour(s) passed
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Not correct
2 Halted 0 ms 0 KB -