Submission #617569

# Submission time Handle Problem Language Result Execution time Memory
617569 2022-08-01T12:13:55 Z Sergio_2357 Toy Train (IOI17_train) C++17
Compilation error
0 ms 0 KB
#include "train.h"
#include <bits/stdc++.h>

using namespace std;

#define int long long

vector<signed> who_wins(vector<signed> a, vector<signed> r, vector<signed> u, vector<signed> v)
{
    rseed(time(0));
    vector<signed> res(a.size());
    for (int i = 0; i < res.size(); i++)
        res[i] = rand() % 2;
    return res;
}

Compilation message

train.cpp: In function 'std::vector<int> who_wins(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
train.cpp:10:5: error: 'rseed' was not declared in this scope
   10 |     rseed(time(0));
      |     ^~~~~
train.cpp:12:23: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 |     for (int i = 0; i < res.size(); i++)
      |                     ~~^~~~~~~~~~~~