Submission #533664

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5336642022-03-06 21:51:17rumen_mAliens (IOI16_aliens)C++17
Compilation error
0 ms0 KiB
#include <cstdio>
#include <set>
#include <algorithm>
#include <vector>
#include <cassert>
#include <iostream>
#include <chrono>
#include <map>
using namespace std;
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
typedef long long llong;
const llong linf = 1e13;
const int inf = 1e9;
llong sqr(int x) {
return 1ll * x * x;
}
chrono::high_resolution_clock::time_point start;
double wallTime() {
auto cur = std::chrono::high_resolution_clock::now();
return std::chrono::duration_cast<std::chrono::nanoseconds>(cur - start).count() / 1e9;
}
const int segs = 1;
const double timeLimit = 1.9;
mt19937 rng;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

aliens.cpp:29:1: error: 'mt19937' does not name a type
   29 | mt19937 rng;
      | ^~~~~~~
aliens.cpp: In function 'int rnd(int, int)':
aliens.cpp:33:48: error: 'rng' was not declared in this scope; did you mean 'rnd'?
   33 |     return uniform_int_distribution<int>(a, b)(rng);
      |                                                ^~~
      |                                                rnd
aliens.cpp: In member function 'void state::mutate(double, double)':
aliens.cpp:102:26: error: 'bernoulli_distribution' was not declared in this scope
  102 |         if (delta < 0 || bernoulli_distribution(prob)(rng)) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~
aliens.cpp:102:55: error: 'rng' was not declared in this scope; did you mean 'rnd'?
  102 |         if (delta < 0 || bernoulli_distribution(prob)(rng)) {
      |                                                       ^~~
      |                                                       rnd
aliens.cpp: In function 'long long int take_photos(int, int, int, std::vector<int>, std::vector<int>)':
aliens.cpp:147:41: error: 'rng' was not declared in this scope; did you mean 'rnd'?
  147 |         shuffle(tmp.begin(), tmp.end(), rng);
      |                                         ^~~
      |                                         rnd
aliens.cpp:154:32: error: 'fabs' was not declared in this scope; did you mean 'labs'?
  154 |         double norm = max(1.0, fabs(init - init2));
      |                                ^~~~
      |                                labs
aliens.cpp:164:31: error: 'log' was not declared in this scope; did you mean 'long'?
  164 |             double temp = exp(log(temp1) * (1 - t) + log(temp2) * t);
      |                               ^~~
      |                               long
aliens.cpp:164:27: error: 'exp' was not declared in this scope
  164 |             double temp = exp(log(temp1) * (1 - t) + log(temp2) * t);
      |                           ^~~