답안 #617569

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
617569 2022-08-01T12:13:55 Z Sergio_2357 장난감 기차 (IOI17_train) C++17
컴파일 오류
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++)
      |                     ~~^~~~~~~~~~~~