답안 #1068308

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1068308 2024-08-21T09:12:12 Z vjudge1 COVID tests (CEOI24_covid) C++14
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#define int long long

using namespace std;

bool test_students(vector<bool> mask) {}

vector<bool> find_positive() {
    int n, p, t;
    cin >> n >> p >> t;
    vector<bool>tmp(n, 0), ans(n, 0);
    for(int i=0; i<n; ++i) {
        tmp[i] = 1;
        vector<bool>x = test_students(tmp);
        ans[i] = x[i];
        tmp[i] = 0;
    }
    return ans;
}

Compilation message

Main.cpp: In function 'bool test_students(std::vector<bool>)':
Main.cpp:6:40: warning: no return statement in function returning non-void [-Wreturn-type]
    6 | bool test_students(vector<bool> mask) {}
      |                                        ^
Main.cpp: In function 'std::vector<bool> find_positive()':
Main.cpp:14:38: error: conversion from 'bool' to non-scalar type 'std::vector<bool>' requested
   14 |         vector<bool>x = test_students(tmp);
      |                         ~~~~~~~~~~~~~^~~~~