Submission #1202049

#TimeUsernameProblemLanguageResultExecution timeMemory
1202049AMel0nFinding Routers (IOI20_routers)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
typedef ll long long;
#define FOR(i,N) for(ll i = 0; i < N; i++)
#define F first
#define S second
#define all(x) (x).begin(),(x).end()

#include “routers.h”

vector<int> find_rotuers(int l, int n, int q) {
  vector<int> res(n);
  for(int i = 1; i < n; i++) {
    int le = res[i-1], ri = n;
    while(le < ri - 1) {
      int mi = (le + ri) / 2;
      int im = use_detector(mi);
      if (i <= im) r = mi;
      else l = mi;
    }
    res[i] = le * r - res[i - 1];
  }
  return res;
}

Compilation message (stderr)

routers.cpp:9:10: error: extended character “ is not valid in an identifier
    9 | #include “routers.h”
      |          ^
routers.cpp:9:10: error: #include expects "FILENAME" or <FILENAME>
    9 | #include “routers.h”
      |          ^~~~~~~~
routers.cpp:9:19: error: extended character ” is not valid in an identifier
    9 | #include “routers.h”
      |                   ^
routers.cpp:3:9: error: 'll' does not name a type; did you mean 'all'?
    3 | typedef ll long long;
      |         ^~
      |         all
routers.cpp: In function 'std::vector<int> find_rotuers(int, int, int)':
routers.cpp:17:16: error: 'use_detector' was not declared in this scope
   17 |       int im = use_detector(mi);
      |                ^~~~~~~~~~~~
routers.cpp:18:20: error: 'r' was not declared in this scope; did you mean 'ri'?
   18 |       if (i <= im) r = mi;
      |                    ^
      |                    ri
routers.cpp:21:19: error: 'r' was not declared in this scope; did you mean 'ri'?
   21 |     res[i] = le * r - res[i - 1];
      |                   ^
      |                   ri