Language: C++

#include<iostream>
#include<vector>
#include<cmath>

using namespace std;

int main(){
  int cost = 100000;
  vector<int> a(3);
  cin >> a[0] >> a[1] >> [2];  
  for(int i = 0; i < 3; i++){
    for(int j = 0; j < 3; j++){
      if(i == j) continue;
      for(int k = 0; k < 3; k++){
        if(j == k) continue;
        cost = min(abs(a[k] - a[j]) + abs(a[j] - a[i]),cost);
      }
    }
  }
  cout << cost;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: expected identifier before numeric constant
   10 |   cin >> a[0] >> a[1] >> [2];
      |                           ^
a.cc: In lambda function:
a.cc:10:29: error: expected '{' before ';' token
   10 |   cin >> a[0] >> a[1] >> [2];
      |                             ^
a.cc: In function 'int main()':
a.cc:10:23: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'main()::<lambda()>')
   10 |   cin >> a[0] >> a[1] >> [2];
      |                       ^~ ~~~
      |                          |
      |                          main()::<lambda()>
In file included from /usr/include/c++/14/iostream:42,
                 from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  170 |       operator>>(bool& __n)
      |       ^~~~~~~~
/usr/include/c++/14/istream:170:7: note:   conversion of argument 1 would be ill-formed:
a.cc:10:26: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'void (*)()'
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^~~
a.cc:10:26: note:   after user-defined conversion: 'constexpr main()::<lambda()>::operator void (*)()() const'
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
  174 |       operator>>(short& __n);
      |       ^~~~~~~~
/usr/include/c++/14/istream:174:7: note:   conversion of argument 1 would be ill-formed:
a.cc:10:26: error: invalid user-defined conversion from 'main()::<lambda()>' to 'short int&' [-fpermissive]
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^~~
a.cc:10:26: note: candidate is: 'constexpr main()::<lambda()>::operator void (*)()() const' (near match)
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^
a.cc:10:26: note:   no known conversion from 'void (*)()' to 'short int'
a.cc:10:26: error: invalid conversion from 'void (*)()' to 'short int' [-fpermissive]
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^~~
      |                          |
      |                          void (*)()
a.cc:10:26: error: conversion to non-const reference type 'short int&' from rvalue of type 'void (*)()' [-fpermissive]
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  177 |       operator>>(unsigned short& __n)
      |       ^~~~~~~~
/usr/include/c++/14/istream:177:7: note:   conversion of argument 1 would be ill-formed:
a.cc:10:26: error: invalid user-defined conversion from 'main()::<lambda()>' to 'short unsigned int&' [-fpermissive]
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^~~
a.cc:10:26: note: candidate is: 'constexpr main()::<lambda()>::operator void (*)()() const' (near match)
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^
a.cc:10:26: note:   no known conversion from 'void (*)()' to 'short unsigned int'
a.cc:10:26: error: invalid conversion from 'void (*)()' to 'short unsigned int' [-fpermissive]
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^~~
      |                          |
      |                          void (*)()
a.cc:10:26: error: conversion to non-const reference type 'short unsigned int&' from rvalue of type 'void (*)()' [-fpermissive]
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
  181 |       operator>>(int& __n);
      |       ^~~~~~~~
/usr/include/c++/14/istream:181:7: note:   conversion of argument 1 would be ill-formed:
a.cc:10:26: error: invalid user-defined conversion from 'main()::<lambda()>' to 'int&' [-fpermissive]
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^~~
a.cc:10:26: note: candidate is: 'constexpr main()::<lambda()>::operator void (*)()() const' (near match)
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^
a.cc:10:26: note:   no known conversion from 'void (*)()' to 'int'
a.cc:10:26: error: invalid conversion from 'void (*)()' to 'int' [-fpermissive]
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^~~
      |                          |
      |                          void (*)()
a.cc:10:26: error: conversion to non-const reference type 'int&' from rvalue of type 'void (*)()' [-fpermissive]
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  184 |       operator>>(unsigned int& __n)
      |       ^~~~~~~~
/usr/include/c++/14/istream:184:7: note:   conversion of argument 1 would be ill-formed:
a.cc:10:26: error: invalid user-defined conversion from 'main()::<lambda()>' to 'unsigned int&' [-fpermissive]
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^~~
a.cc:10:26: note: candidate is: 'constexpr main()::<lambda()>::operator void (*)()() const' (near match)
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^
a.cc:10:26: note:   no known conversion from 'void (*)()' to 'unsigned int'
a.cc:10:26: error: invalid conversion from 'void (*)()' to 'unsigned int' [-fpermissive]
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^~~
      |                          |
      |                          void (*)()
a.cc:10:26: error: conversion to non-const reference type 'unsigned int&' from rvalue of type 'void (*)()' [-fpermissive]
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  188 |       operator>>(long& __n)
      |       ^~~~~~~~
/usr/include/c++/14/istream:188:7: note:   conversion of argument 1 would be ill-formed:
a.cc:10:26: error: invalid user-defined conversion from 'main()::<lambda()>' to 'long int&' [-fpermissive]
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^~~
a.cc:10:26: note: candidate is: 'constexpr main()::<lambda()>::operator void (*)()() const' (near match)
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^
a.cc:10:26: note:   no known conversion from 'void (*)()' to 'long int'
a.cc:10:26: error: invalid conversion from 'void (*)()' to 'long int' [-fpermissive]
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^~~
      |                          |
      |                          void (*)()
a.cc:10:26: error: conversion to non-const reference type 'long int&' from rvalue of type 'void (*)()' [-fpermissive]
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  192 |       operator>>(unsigned long& __n)
      |       ^~~~~~~~
/usr/include/c++/14/istream:192:7: note:   conversion of argument 1 would be ill-formed:
a.cc:10:26: error: invalid user-defined conversion from 'main()::<lambda()>' to 'long unsigned int&' [-fpermissive]
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^~~
a.cc:10:26: note: candidate is: 'constexpr main()::<lambda()>::operator void (*)()() const' (near match)
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^
a.cc:10:26: note:   no known conversion from 'void (*)()' to 'long unsigned int'
a.cc:10:26: error: invalid conversion from 'void (*)()' to 'long unsigned int' [-fpermissive]
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^~~
      |                          |
      |                          void (*)()
a.cc:10:26: error: conversion to non-const reference type 'long unsigned int&' from rvalue of type 'void (*)()' [-fpermissive]
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  199 |       operator>>(long long& __n)
      |       ^~~~~~~~
/usr/include/c++/14/istream:199:7: note:   conversion of argument 1 would be ill-formed:
a.cc:10:26: error: invalid user-defined conversion from 'main()::<lambda()>' to 'long long int&' [-fpermissive]
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^~~
a.cc:10:26: note: candidate is: 'constexpr main()::<lambda()>::operator void (*)()() const' (near match)
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^
a.cc:10:26: note:   no known conversion from 'void (*)()' to 'long long int'
a.cc:10:26: error: invalid conversion from 'void (*)()' to 'long long int' [-fpermissive]
   10 |   cin >> a[0] >> a[1] >> [2];
      |                          ^~~
      |                          |
      |                          void (*)()
a.cc:10:26: error: conversion to non-const reference type 'long long int&' from rvalue of type 'void (*)()' [-fpermissive]
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(lo