Submission #583546

#TimeUsernameProblemLanguageResultExecution timeMemory
583546EinsiteinPaint By Numbers (IOI16_paint)C++98
Compilation error
0 ms0 KiB
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #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 <locale> #include <map> #include <memory> #include <new> #include <numeric> #include <ostream> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <typeinfo> #include <utility> #include <valarray> #include <vector> using namespace std; string solve_puzzle(string s, int c[]) { return (s.length() - c[0] + 1); }

Compilation message (stderr)

paint.cpp: In function 'std::string solve_puzzle(std::string, int*)':
paint.cpp:56:31: error: could not convert '((s.std::__cxx11::basic_string<char>::length() - ((std::__cxx11::basic_string<char>::size_type)(* c))) + 1)' from 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   56 |     return (s.length() - c[0] + 1);
      |            ~~~~~~~~~~~~~~~~~~~^~~~
      |                               |
      |                               std::__cxx11::basic_string<char>::size_type {aka long unsigned int}