Submission #1224449

#TimeUsernameProblemLanguageResultExecution timeMemory
1224449LIAPaint By Numbers (IOI16_paint)C++17
Compilation error
0 ms0 KiB
#include "paint.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef tuple <ll,ll,ll> plll;
typedef vector <plll> vplll;
typedef pair <ll,ll> pll;
typedef vector <ll> vll;
typedef vector <pll> vpll;
typedef vector <vector <pll>> vvpll;
typedef vector <vector <ll>> vvll;
typedef vector <bool> vb;
typedef vector <vector <bool>> vvb;
#define loop(i, s, e) for (ll i = (s); i < (e); ++i)
#define loopr(i, e, s) for (ll i = (e)-1; i >= (s); --i)
#define all(a) a.begin(), a.end()
const ll inf = 1e9 + 7;


std::string solve_puzzle(std::string s, std::vector<int> c) {
    ll n = s.size(), k = c.size();
    ll c1 = c[0];
    vll vis(n);
    ll ans = n-2*k;
    return max(0LL, -ans);
    return "";
}

Compilation message (stderr)

paint.cpp: In function 'std::string solve_puzzle(std::string, std::vector<int>)':
paint.cpp:25:15: error: could not convert 'std::max<long long int>(0, (- ans))' from 'const long long int' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   25 |     return max(0LL, -ans);
      |            ~~~^~~~~~~~~~~
      |               |
      |               const long long int
paint.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
paint_c.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~