criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>
#include <cstdio>

int main() {
int n;
long long min = INT_MAX;
long long max = INT_MIN;
long long sum = 0;
long long* a = new long long[n];

std::cin >> n;
for(int i = 0; i < n; i++) {
std::cin >> a[i];
if(min > a[i]) {
min = a[i];
}
if(max < a[i]) {
max = a[i];
}
sum += a[i];
}
std::cout << min << ' ' << max << ' ' << sum << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'INT_MAX' was not declared in this scope
    6 | long long min = INT_MAX;
      |                 ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include <cstdio>
  +++ |+#include <climits>
    3 | 
a.cc:7:17: error: 'INT_MIN' was not declared in this scope
    7 | long long max = INT_MIN;
      |                 ^~~~~~~
a.cc:7:17: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Language: C++

#include <iostream>
#include <cstdio>

#define INT_MAX
#define INT_MIN

int main() {
int n;
long long min = INT_MAX;
long long max = INT_MIN;
long long sum = 0;
long long* a = new long long[n];

std::cin >> n;
for(int i = 0; i < n; i++) {
std::cin >> a[i];
if(min > a[i]) {
min = a[i];
}
if(max < a[i]) {
max = a[i];
}
sum += a[i];
}
std::cout << min << ' ' << max << ' ' << sum << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: expected primary-expression before ';' token
    9 | long long min = INT_MAX;
      |                        ^
a.cc:10:24: error: expected primary-expression before ';' token
   10 | long long max = INT_MIN;
      |                        ^
Language: C++

#include <iostream>
#include <cstdio>

#define INT_MAX
#define INT_MIN

int main() {
int n;
min = INT_MAX;
max = INT_MIN;
long long sum = 0;
long long* a = new long long[n];

std::cin >> n;
for(int i = 0; i < n; i++) {
std::cin >> a[i];
if(min > a[i]) {
min = a[i];
}
if(max < a[i]) {
max = a[i];
}
sum += a[i];
}
std::cout << min << ' ' << max << ' ' << sum << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: 'min' was not declared in this scope; did you mean 'std::min'?
    9 | min = INT_MAX;
      | ^~~
      | std::min
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:9:14: error: expected primary-expression before ';' token
    9 | min = INT_MAX;
      |              ^
a.cc:10:1: error: 'max' was not declared in this scope; did you mean 'std::max'?
   10 | max = INT_MIN;
      | ^~~
      | std::max
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:10:14: error: expected primary-expression before ';' token
   10 | max = INT_MIN;
      |              ^
Language: C++

num = gets.chomp.to_i
line = gets.split.map(&:to_i)
max_num = line.max
min_num = line.min
sum_num = line.inject{|sum,n| sum + n}
puts "#{min_num} #{max_num} #{sum_num}"

Compiler output:
a.cc:1:1: error: 'num' does not name a type; did you mean 'enum'?
    1 | num = gets.chomp.to_i
      | ^~~
      | enum
a.cc:6:1: error: 'puts' does not name a type
    6 | puts "#{min_num} #{max_num} #{sum_num}"
      | ^~~~
Language: C++

#include <stdio.h>

int main() {
	int i;
	__int64 num;
	__int64 *data;

	scanf("%d", &num);
	
	data = new __int64[num];
	for (i = 0; i < num; i++) scanf("%d", &data[i]);

	__int64 min, max, sum;
	min = max = sum = data[0];
	for (i = 1; i < num; i++) {
		if (min > data[i])min = data[i];
		else if (max < data[i])max = data[i];
		sum += data[i];
	}


	printf("%d %d %d\n",min,max,sum);
	
	delete[] data;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
    5 |         __int64 num;
      |         ^~~~~~~
      |         __int64_t
a.cc:6:18: error: 'data' was not declared in this scope
    6 |         __int64 *data;
      |                  ^~~~
a.cc:8:22: error: 'num' was not declared in this scope; did you mean 'enum'?
    8 |         scanf("%d", &num);
      |                      ^~~
      |                      enum
a.cc:10:20: error: '__int64' does not name a type; did you mean '__int64_t'?
   10 |         data = new __int64[num];
      |                    ^~~~~~~
      |                    __int64_t
a.cc:13:16: error: expected ';' before 'min'
   13 |         __int64 min, max, sum;
      |                ^~~~
      |                ;
a.cc:14:9: error: 'min' was not declared in this scope; did you mean 'main'?
   14 |         min = max = sum = data[0];
      |         ^~~
      |         main
a.cc:14:15: error: 'max' was not declared in this scope
   14 |         min = max = sum = data[0];
      |               ^~~
a.cc:14:21: error: 'sum' was not declared in this scope
   14 |         min = max = sum = data[0];
      |                     ^~~
a.cc:24:9: error: type '<type error>' argument given to 'delete', expected pointer
   24 |         delete[] data;
      |         ^~~~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
	int n, min, max, tmp;
	__int64 sum = 0;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> tmp;
		if (i == 0){
			min = tmp;
			max = tmp;
		} else {
			if (tmp < min){
				min = tmp;
			}
			if (tmp > max){
				max = tmp;
			}
		}
		sum += tmp;
	}
	cout << min << " " << max << " " << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
    6 |         __int64 sum = 0;
      |         ^~~~~~~
      |         __int64_t
a.cc:21:17: error: 'sum' was not declared in this scope
   21 |                 sum += tmp;
      |                 ^~~
a.cc:23:45: error: 'sum' was not declared in this scope
   23 |         cout << min << " " << max << " " << sum << endl;
      |                                             ^~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

using namespace std;

int main() {
	int n;
	vector<int> a;

	cin >> n;

	a.resize(n);

	for(int i = 0;i < n;i++) {
		cin >> a[i];
	}

	int min = *min_element(a.begin(), a.end());
	int max = *max_element(a.begin(), a.end());
	int sum = accumulate(a.begin(), a.end(), 0);

	cout << min << " " << max << " " << sum << endl;
	
	return 0;
}
kate

Compiler output:
a.cc:28:1: error: 'kate' does not name a type
   28 | kate
      | ^~~~
Language: C++

#include<iostream>
using namespace std;
vector<int>A;
int Max()
{
    int m=−1000000;
    for(int i=0;i<A.size();i++)
    {
         if(A[i]>m)
            m=A[i];
    }
    return m;
}

int Min()
{
    int m=1000000;
    for(int i=0;i<A.size();i++)
    {
         if(A[i]<m)
            m=A[i];
    }
    return m;
}
]int sum()
{
    int m=0;
    for(int i=0;i<A.size();i++)
        m+=A[i];
    return m;
}
int main()
{
    int N;
    cin>>N;
    for(int i=0;i<N;i++)
    {
        cin>>A[i];
    }
    cout<<Min()<<' '<<Max()<<' '<<sum()<<endl;
}


Compiler output:
a.cc:6:11: error: extended character − is not valid in an identifier
    6 |     int m=−1000000;
      |           ^
a.cc:3:1: error: 'vector' does not name a type
    3 | vector<int>A;
      | ^~~~~~
a.cc: In function 'int Max()':
a.cc:6:11: error: '\U000022121000000' was not declared in this scope
    6 |     int m=−1000000;
      |           ^~~~~~~~
a.cc:7:19: error: 'A' was not declared in this scope
    7 |     for(int i=0;i<A.size();i++)
      |                   ^
a.cc: In function 'int Min()':
a.cc:18:19: error: 'A' was not declared in this scope
   18 |     for(int i=0;i<A.size();i++)
      |                   ^
a.cc: At global scope:
a.cc:25:1: error: expected unqualified-id before ']' token
   25 | ]int sum()
      | ^
a.cc: In function 'int main()':
a.cc:38:14: error: 'A' was not declared in this scope
   38 |         cin>>A[i];
      |              ^
a.cc:40:35: error: 'sum' was not declared in this scope
   40 |     cout<<Min()<<' '<<Max()<<' '<<sum()<<endl;
      |                                   ^~~
Language: C++

#include<iostream>
using namespace std;
vector<int>A;
int Max()
{
    int m=−1000000;
    for(int i=0;i<A.size();i++)
    {
         if(A[i]>m)
            m=A[i];
    }
    return m;
}

int Min()
{
    int m=1000000;
    for(int i=0;i<A.size();i++)
    {
         if(A[i]<m)
            m=A[i];
    }
    return m;
}
]int sum()
{
    int m=0;
    for(int i=0;i<A.size();i++)
        m+=A[i];
    return m;
}

int main()
{
    int N;
    cin>>N;
    for(int i=0;i<N;i++)
    {
        int x;
        cin>>x;
        A.push_back(x);
    }
    cout<<Min()<<' '<<Max()<<' '<<sum()<<endl;
}



Compiler output:
a.cc:6:11: error: extended character − is not valid in an identifier
    6 |     int m=−1000000;
      |           ^
a.cc:3:1: error: 'vector' does not name a type
    3 | vector<int>A;
      | ^~~~~~
a.cc: In function 'int Max()':
a.cc:6:11: error: '\U000022121000000' was not declared in this scope
    6 |     int m=−1000000;
      |           ^~~~~~~~
a.cc:7:19: error: 'A' was not declared in this scope
    7 |     for(int i=0;i<A.size();i++)
      |                   ^
a.cc: In function 'int Min()':
a.cc:18:19: error: 'A' was not declared in this scope
   18 |     for(int i=0;i<A.size();i++)
      |                   ^
a.cc: At global scope:
a.cc:25:1: error: expected unqualified-id before ']' token
   25 | ]int sum()
      | ^
a.cc: In function 'int main()':
a.cc:41:9: error: 'A' was not declared in this scope
   41 |         A.push_back(x);
      |         ^
a.cc:43:35: error: 'sum' was not declared in this scope
   43 |     cout<<Min()<<' '<<Max()<<' '<<sum()<<endl;
      |                                   ^~~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
vector<int>A;
int Max()
{
    int m=−1000000;
    for(int i=0;i<A.size();i++)
    {
         if(A[i]>m)
            m=A[i];
    }
    return m;
}

int Min()
{
    int m=1000000;
    for(int i=0;i<A.size();i++)
    {
         if(A[i]<m)
            m=A[i];
    }
    return m;
}
]int sum()
{
    int m=0;
    for(int i=0;i<A.size();i++)
        m+=A[i];
    return m;
}

int main()
{
    int N;
    cin>>N;
    for(int i=0;i<N;i++)
    {
        int x;
        cin>>x;
        A.push_back(x);
    }
    cout<<Min()<<' '<<Max()<<' '<<sum()<<endl;
}



Compiler output:
a.cc:7:11: error: extended character − is not valid in an identifier
    7 |     int m=−1000000;
      |           ^
a.cc: In function 'int Max()':
a.cc:7:11: error: '\U000022121000000' was not declared in this scope
    7 |     int m=−1000000;
      |           ^~~~~~~~
a.cc: At global scope:
a.cc:26:1: error: expected unqualified-id before ']' token
   26 | ]int sum()
      | ^
a.cc: In function 'int main()':
a.cc:44:35: error: 'sum' was not declared in this scope
   44 |     cout<<Min()<<' '<<Max()<<' '<<sum()<<endl;
      |                                   ^~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main(void) {
  int num;
  vector<int> a;
  cin >> num;
  for(int i = 0; i < num; i++) {
    cin >> a.push_back();
  }

  sort(a.begin(), a.end());
  int sum = 0;
  for(int i = 0; i < num; i++) {
    sum += a[i];
  }

  cout << a.back() << " " << a.front() << " " << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: no matching function for call to 'std::vector<int>::push_back()'
   11 |     cin >> a.push_back();
      |            ~~~~~~~~~~~^~
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note:   candidate expects 1 argument, 0 provided
Language: C++

#include <iostream>
#include <cstdio>
#include <numeric>
#include <vector>

int main()
{
    int input_num;
    std::cin >> input_num;
    std::vector<int> inputs;

    int input;
    while (std::cin >> input) {
        inputs.push_back(input);
    }

    std::printf("%d %d %d\n", *std::min_element(inputs.begin(), inputs.end()), *std::max_element(inputs.begin(), inputs.end()), std::accumulate(inputs.begin(), inputs.end(), 0));

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:37: error: 'min_element' is not a member of 'std'; did you mean 'tuple_element'?
   17 |     std::printf("%d %d %d\n", *std::min_element(inputs.begin(), inputs.end()), *std::max_element(inputs.begin(), inputs.end()), std::accumulate(inputs.begin(), inputs.end(), 0));
      |                                     ^~~~~~~~~~~
      |                                     tuple_element
a.cc:17:86: error: 'max_element' is not a member of 'std'; did you mean 'tuple_element'?
   17 |     std::printf("%d %d %d\n", *std::min_element(inputs.begin(), inputs.end()), *std::max_element(inputs.begin(), inputs.end()), std::accumulate(inputs.begin(), inputs.end(), 0));
      |                                                                                      ^~~~~~~~~~~
      |                                                                                      tuple_element
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main(void) {
  int num;
  vector<int> a;
  cin >> num;
  for(int i = 0; i < num; i++) {
    int tmp
    cin >> tmp;
    a.push_back(tmp);
  }

  sort(a.begin(), a.end());
  int sum = 0;
  for(int i = 0; i < num; i++) {
    sum += a[i];
  }

  cout << a.back() << " " << a.front() << " " << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected initializer before 'cin'
   12 |     cin >> tmp;
      |     ^~~
a.cc:13:17: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   13 |     a.push_back(tmp);
      |                 ^~~
      |                 tm
Language: C++

#include<iostream>
#include <iomanip>
#include <math.h>
using namespace std;
int main()
{
  int N;
  cin >> N;
  int x[N];
  int sum=0;
  for(int i=0;i<N;i++){
    cin >>x[i];
    sum += x[i];
  }

  cout << min(x) <<" "<<max(x)<<" "<<sum<<endl;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: no matching function for call to 'min(int [N])'
   16 |   cout << min(x) <<" "<<max(x)<<" "<<sum<<endl;
      |           ~~~^~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
a.cc:16:28: error: no matching function for call to 'max(int [N])'
   16 |   cout << min(x) <<" "<<max(x)<<" "<<sum<<endl;
      |                         ~~~^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include<iostream>
#include <iomanip>
#include <math.h>
using namespace std;
int main(){

  int N;
  cin >> N;
  int x[N];
  int sum=0;
  int size = sizeof(x)/sizeof(x[0]);
  for(int i=0;i<N;i++){
    cin >>x[i];
    sum += x[i];
  }

  cout << *min_element(x,x+size) <<" "<<*max_element(x,x+size)<<" "<<sum<<endl;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: 'min_element' was not declared in this scope
   17 |   cout << *min_element(x,x+size) <<" "<<*max_element(x,x+size)<<" "<<sum<<endl;
      |            ^~~~~~~~~~~
a.cc:17:42: error: 'max_element' was not declared in this scope
   17 |   cout << *min_element(x,x+size) <<" "<<*max_element(x,x+size)<<" "<<sum<<endl;
      |                                          ^~~~~~~~~~~
Language: C++

#include <stdio.h>
int main(void)
{
	unsignedint n,a,max=-1000000,min=1000000,total=0;
	scanf("%d", &n);
	for(int i=1;i<=n;i++)
	{
		scanf("%d", &a);
		total = total + a;
		if(a>=max)
		{
			max = a;
		}
		if(a<=min)
		{
			min = a;
		}
	}
	printf("%d %d %d\n", min, max, total);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'unsignedint' was not declared in this scope; did you mean 'unsigned'?
    4 |         unsignedint n,a,max=-1000000,min=1000000,total=0;
      |         ^~~~~~~~~~~
      |         unsigned
a.cc:5:22: error: 'n' was not declared in this scope
    5 |         scanf("%d", &n);
      |                      ^
a.cc:8:30: error: 'a' was not declared in this scope
    8 |                 scanf("%d", &a);
      |                              ^
a.cc:9:17: error: 'total' was not declared in this scope
    9 |                 total = total + a;
      |                 ^~~~~
a.cc:10:23: error: 'max' was not declared in this scope
   10 |                 if(a>=max)
      |                       ^~~
a.cc:14:23: error: 'min' was not declared in this scope; did you mean 'main'?
   14 |                 if(a<=min)
      |                       ^~~
      |                       main
a.cc:19:30: error: 'min' was not declared in this scope; did you mean 'main'?
   19 |         printf("%d %d %d\n", min, max, total);
      |                              ^~~
      |                              main
a.cc:19:35: error: 'max' was not declared in this scope
   19 |         printf("%d %d %d\n", min, max, total);
      |                                   ^~~
a.cc:19:40: error: 'total' was not declared in this scope
   19 |         printf("%d %d %d\n", min, max, total);
      |                                        ^~~~~
Language: C++

#include <stdio.h>
int main(void)
{
	unsignedint n,a,max=-1000000,min=1000000,total=0;
	scanf("%lf", &n);
	for(int i=1;i<=n;i++)
	{
		scanf("%lf", &a);
		total = total + a;
		if(a>=max)
		{
			max = a;
		}
		if(a<=min)
		{
			min = a;
		}
	}
	printf("%lf %lf %lf\n", min, max, total);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'unsignedint' was not declared in this scope; did you mean 'unsigned'?
    4 |         unsignedint n,a,max=-1000000,min=1000000,total=0;
      |         ^~~~~~~~~~~
      |         unsigned
a.cc:5:23: error: 'n' was not declared in this scope
    5 |         scanf("%lf", &n);
      |                       ^
a.cc:8:31: error: 'a' was not declared in this scope
    8 |                 scanf("%lf", &a);
      |                               ^
a.cc:9:17: error: 'total' was not declared in this scope
    9 |                 total = total + a;
      |                 ^~~~~
a.cc:10:23: error: 'max' was not declared in this scope
   10 |                 if(a>=max)
      |                       ^~~
a.cc:14:23: error: 'min' was not declared in this scope; did you mean 'main'?
   14 |                 if(a<=min)
      |                       ^~~
      |                       main
a.cc:19:33: error: 'min' was not declared in this scope; did you mean 'main'?
   19 |         printf("%lf %lf %lf\n", min, max, total);
      |                                 ^~~
      |                                 main
a.cc:19:38: error: 'max' was not declared in this scope
   19 |         printf("%lf %lf %lf\n", min, max, total);
      |                                      ^~~
a.cc:19:43: error: 'total' was not declared in this scope
   19 |         printf("%lf %lf %lf\n", min, max, total);
      |                                           ^~~~~
Language: C++

#include <iostream>
#include <numeric>
using namespace std;


int main()
{
    long long n;
    cin >> n;
    int a[10000];
    for (int i = 0; i < n; ++i)
    {
        cin >> a[i];
    }

    cout << *min_element(a, a + n) << " "
         << *max_element(a, a + n) << " "
         << accumulate(a, a + n, 0) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: 'min_element' was not declared in this scope
   16 |     cout << *min_element(a, a + n) << " "
      |              ^~~~~~~~~~~
a.cc:17:14: error: 'max_element' was not declared in this scope
   17 |          << *max_element(a, a + n) << " "
      |              ^~~~~~~~~~~
Language: C++

#include <iostream>
#include <numeric>
using namespace std;


int main()
{
    long long n;
    cin >> n;
    int a[10000];
    for (int i = 0; i < n; ++i)
    {
        cin >> a[i];
    }

    cout << *min_element(a, a + n) << " "
         << *max_element(a, a + n) << " "
         << accumulate(a, a + n, 0) << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: 'min_element' was not declared in this scope
   16 |     cout << *min_element(a, a + n) << " "
      |              ^~~~~~~~~~~
a.cc:17:14: error: 'max_element' was not declared in this scope
   17 |          << *max_element(a, a + n) << " "
      |              ^~~~~~~~~~~
Language: C++

#include <iostream>
#include <numeric>

using namespace std;


int main()
{
    long long n;
    cin >> n;
    int a[10000];
    for (int i = 0; i < n; ++i)
    {
        cin >> a[i];
    }

    cout << *std::min_element(a, a + n) << " "
         << *std::max_element(a, a + n) << " "
         << accumulate(a, a + n, 0) << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: 'min_element' is not a member of 'std'; did you mean 'tuple_element'?
   17 |     cout << *std::min_element(a, a + n) << " "
      |                   ^~~~~~~~~~~
      |                   tuple_element
a.cc:18:19: error: 'max_element' is not a member of 'std'; did you mean 'tuple_element'?
   18 |          << *std::max_element(a, a + n) << " "
      |                   ^~~~~~~~~~~
      |                   tuple_element
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#define REP(i,m) for(long long i=0; i<m; i++)
#define FOR(i,n,m) for(long long i=n; i<m; i++)
using namespace std;

int main() {
	int n;
	cin >> n;
	ll mx = -1000000, mn = 1000000, sum = 0;
	REP(i, n){
		int x;
		cin >> x;
		mn = min(x, mn);
		mx = max(x, mx);
		sum += x;
	}
	cout << mn << " " << mx << " " << sum << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'll' was not declared in this scope
   11 |         ll mx = -1000000, mn = 1000000, sum = 0;
      |         ^~
a.cc:15:17: error: 'mn' was not declared in this scope; did you mean 'n'?
   15 |                 mn = min(x, mn);
      |                 ^~
      |                 n
a.cc:16:17: error: 'mx' was not declared in this scope; did you mean 'x'?
   16 |                 mx = max(x, mx);
      |                 ^~
      |                 x
a.cc:17:17: error: 'sum' was not declared in this scope
   17 |                 sum += x;
      |                 ^~~
a.cc:19:17: error: 'mn' was not declared in this scope; did you mean 'n'?
   19 |         cout << mn << " " << mx << " " << sum << endl;
      |                 ^~
      |                 n
a.cc:19:30: error: 'mx' was not declared in this scope
   19 |         cout << mn << " " << mx << " " << sum << endl;
      |                              ^~
a.cc:19:43: error: 'sum' was not declared in this scope
   19 |         cout << mn << " " << mx << " " << sum << endl;
      |                                           ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#define REP(i,m) for(long long i=0; i<m; i++)
#define FOR(i,n,m) for(long long i=n; i<m; i++)
using namespace std;

int main() {
	int n;
	cin >> n;
	int mx = -1000000, mn = 1000000
	long long int sum = 0;
	REP(i, n){
		int x;
		cin >> x;
		mn = min(x, mn);
		mx = max(x, mx);
		sum += x;
	}
	cout << mn << " " << mx << " " << sum << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: expected ',' or ';' before 'long'
   12 |         long long int sum = 0;
      |         ^~~~
a.cc:18:17: error: 'sum' was not declared in this scope
   18 |                 sum += x;
      |                 ^~~
a.cc:20:43: error: 'sum' was not declared in this scope
   20 |         cout << mn << " " << mx << " " << sum << endl;
      |                                           ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <iomanip>
#include <string>
           
using namespace std;
           
int main() {
int n;
cin >> n;
int min1 = 10000000
int max1 = -10000000;
long sum = 0;
for(int i=0; i<n; ++i) {
int a;
cin >> a;
min1 = (min1 < a) ? min1 : a;
max1 = (max1 > a) ? max1 : a;
sum += (long)a;
}
cout << min1 << max1 << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:1: error: expected ',' or ';' before 'int'
   13 | int max1 = -10000000;
      | ^~~
a.cc:19:1: error: 'max1' was not declared in this scope
   19 | max1 = (max1 > a) ? max1 : a;
      | ^~~~
a.cc:22:17: error: 'max1' was not declared in this scope
   22 | cout << min1 << max1 << sum << endl;
      |                 ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int n,a[10000];
    long long sum = 0;
    int minmax;
    scanf("%d",&n);
    for(int i = 0;i<n;i++){
    scanf("%d",&a[i]);
        sum+=a[i];
        if(i==0 || a[i] < min) min = a[i];
        if(i==0 || a[i] > max) max = a[i];
    }
    printf("%d %d %lld\n",min,max,sum);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<'
   11 |         if(i==0 || a[i] < min) min = a[i];
      |                    ~~~~~^~~~~
a.cc:11:41: error: overloaded function with no contextual type information
   11 |         if(i==0 || a[i] < min) min = a[i];
      |                                         ^
a.cc:12:25: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>'
   12 |         if(i==0 || a[i] > max) max = a[i];
      |                    ~~~~~^~~~~
a.cc:12:41: error: overloaded function with no contextual type information
   12 |         if(i==0 || a[i] > max) max = a[i];
      |                                         ^
a.cc:14:11: error: overloaded function with no contextual type information
   14 |     printf("%d %d %lld\n",min,max,sum);
      |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;


int main(void){
	int n,a[];
	cin>>n;
	for(int i=0;i<n;i++)cin>>a[i];
	int sum=0;
	int min=a[0];
	int max=a[0];
	for(int i=0;i<n;i++){
		sum+=a[i];
		if(min>a[i])min=a[i];
		if(max<a[i])max=a[i];
	}
	cout<<min<<" "<<max<<" "<<sum<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: storage size of 'a' isn't known
    7 |         int n,a[];
      |               ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;

int main(void){
	int n,a,min=0,max=0,sum=0;
	cin>>n;
	for(int i=0;i<n;i++){
                cin>>a;
		sum+=a;
		if(min>a)min=a[i];
		if(max<a)max=a[i];
	}
	cout<<min<<" "<<max<<" "<<sum<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:31: error: invalid types 'int[int]' for array subscript
   11 |                 if(min>a)min=a[i];
      |                               ^
a.cc:12:31: error: invalid types 'int[int]' for array subscript
   12 |                 if(max<a)max=a[i];
      |                               ^
Language: C++

 Because of planned network maintenance, you will be unable to connect to AOJ during 2018/02/10 10:00-11:00. Sorry for the inconvenience.


Compiler output:
a.cc:1:2: error: 'Because' does not name a type
    1 |  Because of planned network maintenance, you will be unable to connect to AOJ during 2018/02/10 10:00-11:00. Sorry for the inconvenience.
      |  ^~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
    int num, i, min=1000000, max=-1000000, sum=0;
    int *a;

    cin >> num;
    a = new int[num];
    for(i=0;i<num;i++){
        cin >> int[i];
        if(min>int[i]) {
            min = int[i];  
        }
        if(max<int[i]){
            max = int[i];
        }
        sum = int[i]+sum;
    }
    cout << min << " " << max << " " << sum << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: expected primary-expression before 'int'
   11 |         cin >> int[i];
      |                ^~~
a.cc:12:16: error: expected primary-expression before 'int'
   12 |         if(min>int[i]) {
      |                ^~~
a.cc:12:16: error: expected ')' before 'int'
   12 |         if(min>int[i]) {
      |           ~    ^~~
      |                )
a.cc:13:19: error: expected primary-expression before 'int'
   13 |             min = int[i];
      |                   ^~~
a.cc:15:16: error: expected primary-expression before 'int'
   15 |         if(max<int[i]){
      |                ^~~
a.cc:15:16: error: expected ')' before 'int'
   15 |         if(max<int[i]){
      |           ~    ^~~
      |                )
a.cc:16:19: error: expected primary-expression before 'int'
   16 |             max = int[i];
      |                   ^~~
a.cc:18:15: error: expected primary-expression before 'int'
   18 |         sum = int[i]+sum;
      |               ^~~
Language: C++

#include <iostream>
#include <iterator>
#include <vector>
#include <algorithm>
using namespace std;
double sum(vector<double> tmpvec)
{
    double tmptotal = 0;
    //Junsang****for (vector<double>::iterator i = tmpvec.begin(); i != tmpvec.end(); i++)
    //Junsang****{
        //Junsang****tmptotal+=*i;
    //Junsang****}
    for (auto elem : tmpvec)
    {
        tmptotal+=elem;
    }
    return tmptotal;
}
double main(double argc, char* argv[])
{
    double tmp, n;
    vector<double> vec;

    cin >> n;
    for (double i = 0; i < n; i++)
    {
        cin >> tmp;
        vec.push_back(tmp);
    }
    sort(vec.begin(), vec.end());
    cout << vec.front() << " " << vec.back() << " " << sum(vec) << endl;

    return 0;
}



Compiler output:
a.cc:19:1: error: '::main' must return 'int'
   19 | double main(double argc, char* argv[])
      | ^~~~~~
a.cc:19:8: warning: first argument of 'int main(double, char**)' should be 'int' [-Wmain]
   19 | double main(double argc, char* argv[])
      |        ^~~~
Language: C++

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        try (Scanner scan = new Scanner(System.in)) {
            scan.nextLine();
            String[] line = scan.nextLine().split(" ");

            int min = Integer.parseInt(line[0]);
            int max = Integer.parseInt(line[0]);
            int sum = 0;
            int num = 0;

            for (int i = 0; i < line.length; i++) {
                num = Integer.parseInt(line[i]);

                if (num < min) min = num;
                if (num > max) max = num;

                sum += num;
            }

            System.out.println(min + " " + max + " " + sum);
        }

    }

}



Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
int max (int x,int y){
    if (x>y) {
        return x;
    }
    else
        return y;
}
int min (int s,int t){
    if (s<t) {
        return s;
    }
    else
        return t;
}
using namespace std;
int main(){
    int a;
    cin >> a;
    int num,sum,b,c;
    b= -1000000;
    c=1000000;
    sum = 0;
    for (int i=0; i<a; i++) {
       
        cin >> num;
        sum += num;
        
        
        b = max(b,num);
        c = min(c,num);
        
    }
    cout << c << " " << b << " " << sum <<endl;
    
}
    
    

    
    
}


Compiler output:
a.cc:44:1: error: expected declaration before '}' token
   44 | }
      | ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int x[10000];
    int num;
    cin>>num;
    for(int i=0;i<num;i++)c{
        cin>>x[i];
    }

    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: 'c' was not declared in this scope
    8 |     for(int i=0;i<num;i++)c{
      |                           ^
Language: C++

#include<iostream>

using namespace std;
int main(){
    int x[10000];
    int num;
    cin>>num;
    for(int i=0;i<num;i++)c{
        cin>>x[i];
    }

    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: 'c' was not declared in this scope
    8 |     for(int i=0;i<num;i++)c{
      |                           ^
Language: C++

#include<iostream>

using namespace std;
int main(){
    long x[10000];
    int num;
    cin>>num;
    for(int i=0;i<num;i++)c{
        cin>>x[i];
    }

    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: 'c' was not declared in this scope
    8 |     for(int i=0;i<num;i++)c{
      |                           ^
Language: C++

#include<iostream>
#include<algolithm>
using namespace std;
int main(){
    int x[10000];
    int num;
    cin>>num;
    for(int i=0;i<num;i++){
        cin>>x[i];
    }
    

    
}


Compiler output:
a.cc:2:9: fatal error: algolithm: No such file or directory
    2 | #include<algolithm>
      |         ^~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int x[10000];
    int num;
    cin>>num;
    for(int i=0;i<num;i++){
        cin>>x[i];
    }
    cout<<max(x)<<endl;
      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: no matching function for call to 'max(int [10000])'
   11 |     cout<<max(x)<<endl;
      |           ~~~^~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:11:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int*'
   11 |     cout<<max(x)<<endl;
      |           ~~~^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int x[10000];
    int num;
    cin>>num;
    for(int i=0;i<num;i++){
        cin>>x[i];
    }
    cout<<max(x,x+num)<<endl;
      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: no matching function for call to 'max(int [10000], int*)'
   11 |     cout<<max(x,x+num)<<endl;
      |           ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:11:14: note:   deduced conflicting types for parameter 'const _Tp' ('int [10000]' and 'int*')
   11 |     cout<<max(x,x+num)<<endl;
      |           ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:11:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int*'
   11 |     cout<<max(x,x+num)<<endl;
      |           ~~~^~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int x[10000];
    int num;
    cin>>num;
    for(int i=0;i<num;i++){
        cin>>x[i];
    }
    cout<<accumulate(x,x+num)<<endl;
      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: 'accumulate' was not declared in this scope
   11 |     cout<<accumulate(x,x+num)<<endl;
      |           ^~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
    int x[10000];
    int num;
    cin>>num;
    for(int i=0;i<num;i++){
        cin>>x[i];
    }
    cout<<accumulate(x,x+num)<<endl;
      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'accumulate' was not declared in this scope
   12 |     cout<<accumulate(x,x+num)<<endl;
      |           ^~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
     long x[10000];
    int num;
    cin>>num;
    for(int i=0;i<num;i++){
        cin>>x[i];
    }
    cout<<accumulate(x,x+num)<<endl;
      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'accumulate' was not declared in this scope
   12 |     cout<<accumulate(x,x+num)<<endl;
      |           ^~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
     long x[10000],a;
    int num;
    cin>>num;
    for(int i=0;i<num;i++){
        cin>>x[i];
    }
    a=accumulate(x,x+num)
    cout<<a<<endl;
      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: 'accumulate' was not declared in this scope
   12 |     a=accumulate(x,x+num)
      |       ^~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
     long x[10000],a;
    int num;
    cin>>num;
    for(int i=0;i<num;i++){
        cin>>x[i];
    }
    a=accumulate(x,x+num);
    cout<<a<<endl;
      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: 'accumulate' was not declared in this scope
   12 |     a=accumulate(x,x+num);
      |       ^~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
     long x[10000],a;
    int num;
    cin>>num;
    for(int i=0;i<num;i++){
        cin>>x[i];
    }
    a=accumulate(x,x+num);

      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: 'accumulate' was not declared in this scope
   12 |     a=accumulate(x,x+num);
      |       ^~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<math.h>
#include <numeric>
using namespace std;
int main(){
     long x[10000],a;
    int num;
    cin>>num;
    for(int i=0;i<num;i++){
        cin>>x[i];
    }
    a=accumulate(x,x+num);
    cout<<a<<endl;
      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: no matching function for call to 'accumulate(long int [10000], long int*)'
   13 |     a=accumulate(x,x+num);
      |       ~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/numeric:62,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_numeric.h:134:5: note: candidate: 'template<class _InputIterator, class _Tp> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp)'
  134 |     accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
      |     ^~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:134:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_numeric.h:161:5: note: candidate: 'template<class _InputIterator, class _Tp, class _BinaryOperation> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp, _BinaryOperation)'
  161 |     accumulate(_InputIterator __first, _InputIterator __last, _Tp __init,
      |     ^~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:161:5: note:   candidate expects 4 arguments, 2 provided
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    vector<int> x;
    int num;
    cin>>num;
    for(int i=0;i<num;i++){
        cin>>x[i];

      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    vector<int> x data(10000);
    int num;
    cin>>num;
    for (int i=0;i<num;i++){
        cin>>x;
    }


      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: expected initializer before 'data'
    6 |     vector<int> x data(10000);
      |                   ^~~~
a.cc:10:14: error: 'x' was not declared in this scope
   10 |         cin>>x;
      |              ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    vector<int> x data(10000);
    int num;
    cin>>num;
    for (int i=0;i<num;i++){
        cin>>x[i];
    }


      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: expected initializer before 'data'
    6 |     vector<int> x data(10000);
      |                   ^~~~
a.cc:10:14: error: 'x' was not declared in this scope
   10 |         cin>>x[i];
      |              ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    vector<int> x vec(100);
    int num;
    cin>>num;
    for (int i=0;i<num;i++){
        cin>>x[i];
    }


      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: expected initializer before 'vec'
    6 |     vector<int> x vec(100);
      |                   ^~~
a.cc:10:14: error: 'x' was not declared in this scope
   10 |         cin>>x[i];
      |              ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    vector<int> x vec(100);
    int num;
    cin>>num;
    for (int i=0;i<num;i++){
       
    }


      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: expected initializer before 'vec'
    6 |     vector<int> x vec(100);
      |                   ^~~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    vector<int> x;
    int num,tmp;
    cin>>num;
    for (int i=0;i<num;i++){
       cin>>tmp;
　　data.push_back(tmp);
    }


      
}


Compiler output:
a.cc:11:1: error: extended character 　 is not valid in an identifier
   11 | 　　data.push_back(tmp);
      | ^
a.cc:11:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:11:1: error: '\U00003000\U00003000data' was not declared in this scope
   11 | 　　data.push_back(tmp);
      | ^~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    vector<int> x;
    int num,tmp;
    cin>>num;
    for (int i=0;i<num;i++){
       cin>>tmp;
　　x.push_back(tmp);
    }


      
}


Compiler output:
a.cc:11:1: error: extended character 　 is not valid in an identifier
   11 | 　　x.push_back(tmp);
      | ^
a.cc:11:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:11:1: error: '\U00003000\U00003000x' was not declared in this scope
   11 | 　　x.push_back(tmp);
      | ^~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    vector<int> x;
    long num,tmp;
    cin>>num;
    for (int i=0;i<num;i++){
       cin>>tmp;
　　x.push_back(tmp);
    }


      
}


Compiler output:
a.cc:11:1: error: extended character 　 is not valid in an identifier
   11 | 　　x.push_back(tmp);
      | ^
a.cc:11:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:11:1: error: '\U00003000\U00003000x' was not declared in this scope
   11 | 　　x.push_back(tmp);
      | ^~~~~
Language: C++

#include <iostream>
#include <vector>
 
int main()
{
    std::vector<int> vec{ 1, 2, 3, 4, 5 };
 
    for (int i = 0; i < vec.size(); i++)
    {
        std::cout << vec[i] <<endl;;
    }
 
    std::cin.get();
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |         std::cout << vec[i] <<endl;;
      |                               ^~~~
      |                               std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~