Submission #627772

#TimeUsernameProblemLanguageResultExecution timeMemory
627772hy_1The Big Prize (IOI17_prize)C++14
Compilation error
0 ms0 KiB
#include "prize.h" #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <cmath> #include <locale> #include <map> #include <memory> #include <new> #include <numeric> #include <ostream> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdexcept> #include <streambuf> #include <string> #include <typeinfo> #include <utility> #include <valarray> #include <vector> #include <unordered_map> using namespace std; #define sum(a) accumulate(a.begin(), a.end(), 0LL) #define vi vector < int > #define int long long #define llu unsigned long long #define MOD 1000000007 #define INF 2000000000 #define IN 100001 #define MINF -2000000000 #define all(x) x.begin(),x.end() #define ios ios_base::sync_with_stdio(0);cin.tie(0); #define sum(a) accumulate(a.begin(), a.end(), 0LL) int find_best(int n) { for(int i =0; i <n; i++){ vector<int> res = ask(i); if(res[0] == 0 && res[1] == 0){ return i; } } }

Compilation message (stderr)

prize.cpp: In function 'long long int find_best(long long int)':
prize.cpp:58:24: error: conversion from 'vector<int>' to non-scalar type 'vector<long long int>' requested
   58 |   vector<int> res = ask(i);
      |                     ~~~^~~
prize.cpp:63:1: warning: control reaches end of non-void function [-Wreturn-type]
   63 | }
      | ^