QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#533927#1490. Road Closuresotarius#Compile Error//C++141.2kb2024-08-26 17:04:082024-08-26 17:04:11

Judging History

你现在查看的是最新测评结果

  • [2024-08-26 17:04:11]
  • 评测
  • [2024-08-26 17:04:08]
  • 提交

answer

// #include "jumps.h"
#include <bits/stdc++.h>
#include <bits/extc++.h>
using namespace __gnu_pbds;
using namespace std;

// #pragma GCC optimize("Ofast")
// #pragma GCC optimize ("unroll-loops")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#define ff first
#define sc second
#define pb push_back
#define ll long long
#define pll pair<ll, ll>
#define pii pair<int, int>
#define ull unsigned long long
#define all(x) (x).begin(),(x).end()

// #define int long long
// #define int unsigned long long

// #define ordered_set(T) tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>
// #define ordered_multiset(T) tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>

void open_file(string filename) {
    freopen((filename + ".in").c_str(), "r", stdin);
    freopen((filename + ".out").c_str(), "w", stdout);
}

// const ll mod = 1e9 + 7;
// const ll mod = 998244353;

const ll inf = 1e9;
const ll biginf = 1e18;
const int maxN = 2 * 1e5 + 25;

vector<ll> minimize_closure_costs(int n, vector<int> u, vector<int> v, vector<int> w) {
    vector<int> ans(n, 0);
    return ans;
}

Details

answer.code: In function ‘std::vector<long long int> minimize_closure_costs(int, std::vector<int>, std::vector<int>, std::vector<int>)’:
answer.code:40:12: error: could not convert ‘ans’ from ‘vector<int>’ to ‘vector<long long int>’
   40 |     return ans;
      |            ^~~
      |            |
      |            vector<int>
answer.code: In function ‘void open_file(std::string)’:
answer.code:27:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   27 |     freopen((filename + ".in").c_str(), "r", stdin);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
answer.code:28:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   28 |     freopen((filename + ".out").c_str(), "w", stdout);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~