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

#include<cstdio>
#include<algorithm>
#include<tuple>

int N;
int A[100002];
int lgd = 0;
int lg, cnt = 0;

int main(){

  scanf("%d", &N);
  ans = N;
  for(int l = 0; l < N; l++){
    scanf("%d", &A[l]);
  }

  std::sort(A);

  lg = A[0];
  for(int l = 1; l < N; l++){
    if(lg == A[l]){
      cnt++;
    }else{
      lg = A[l];

      if(cnt % 2 == 1){
        ans -= (cnt - 1);
      }else{
        lgd++;
      }

    }
  }

  printf("%d", ans - lgd);

}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |   ans = N;
      |   ^~~
      |   abs
a.cc:18:12: error: no matching function for call to 'sort(int [100002])'
   18 |   std::sort(A);
      |   ~~~~~~~~~^~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<string>
#include<stack>
#include<queue>
#include<vector>
#include<algorithm>
#include <iomanip>
typedef long long int ll;
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define REP(i,n) for (int i=0;i<(n);i++)
#define EREP(i,n) for (int i=1;i<=(n);i++)
#define ALL(a) (a).begin(),(a).end()
#define EVEL 1

#ifndef EVEL
#define DEB(X) cout << #X << ":" <<X<<" " ;
#define TF(f) f ? cout<<"true  " : cout<<"false ";
#define END cout<<"\n";
#else
#define DEB(X) {X=X;}
#define TF(f) {f=f;}
#define END {}
#endif
const int MOD = 1000000007;
const int INF = 1000000;
#define NMAX 50
#define MAX 10

    int N,M,A[100010],B;
    string S;
    ll X,ans=0;


    bool f[100010];


int main(){
    ios_base::sync_with_stdio(false);
    cin>>N;
    REP(i,N)cin>>A[i];
    REP(i,N){
      if(!(f[A[i]])){f=true;ans++;}
      else {B++;}
    }
    cout<<ans-(B%2)<<endl;


}
//ABC057 Maximum Average Sets


Compiler output:
a.cc: In function 'int main()':
a.cc:46:23: error: incompatible types in assignment of 'bool' to 'bool [100010]'
   46 |       if(!(f[A[i]])){f=true;ans++;}
      |                      ~^~~~~
Language: C++

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>

using namespace std;

int main(void)
{
  int N;
  scanf("%d", &N);
  vector<int> a;
  vector<int> b;
  priority_queue<int> c;
  a.resize(N);
  for (int i = 0; i < N; i++) {
    scanf("%d", a.data() + i);
  }
  sort(a.begin(), a.end());
  // unique_copy(a.begin(), a.end(),back_inserter(b));
  // for (auto e: b) {
  //   c.push(count(a.begin(), a.end(), e));
  // }
  {
    int l = -1;
    int cnt = 0;
    for (auto e: a) {
      if (e == l) {
        cnt++;
      } else {
        c.push(cnt);
        l = e;
        cnt = 1;
      }
  }
  while (c.size() != 1) {
    int x,y;
    x = c.top();
    c.pop();
    while (x > (y = c.top())) {
      c.pop();
      if (y == 1) {
        c.push(x);
        c.push(y);
        goto eol;
      }
      if (x == y) {
        x = 1;
      } else {
        x -= y - 1;
      }
      c.push(1);
    }
    c.push(x);
  }
 eol:
  
  int x = c.top();
  c.pop();
  x = x & 1 + (((x >> 1) * !(x & 1)) << 1);
  if (x != 1) {
    x -= 2;
  }
  c.push(x);
  int num = 0;
  while (!c.empty()) {
    num += c.top();
    c.pop();
  }

  printf("%d\n", num);
  return 0;
}



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

#include<bits/stdc++.h>
using namespace std;
int N;
int A[100005];
int B[100005];
int main()
{
    scanf("%d", &N);
    int len = 0;
    for(int i=0;i<N:i++)
    {
         scanf("%d", &A[i]);
         B[A[i]]++;
         len = max(len, A[i]);
    }
    int flag = 0;
    int ans = 0;
    for(int i=1;i<=len;i++)
    {
         while(B[i]>2) B[i]-=2;
         if(B[i]==2) flag^=1;
         if(B[i]>0) ans++;
    }
    printf("%d\n", ans-flag);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   10 |     for(int i=0;i<N:i++)
      |                 ^
a.cc:10:20: error: found ':' in nested-name-specifier, expected '::'
   10 |     for(int i=0;i<N:i++)
      |                    ^
      |                    ::
a.cc:10:19: error: 'N' is not a class, namespace, or enumeration
   10 |     for(int i=0;i<N:i++)
      |                   ^
a.cc:17:5: error: expected primary-expression before 'int'
   17 |     int ans = 0;
      |     ^~~
a.cc:16:18: error: expected ')' before 'int'
   16 |     int flag = 0;
      |                  ^
      |                  )
   17 |     int ans = 0;
      |     ~~~           
a.cc:10:8: note: to match this '('
   10 |     for(int i=0;i<N:i++)
      |        ^
a.cc:21:22: error: 'flag' was not declared in this scope
   21 |          if(B[i]==2) flag^=1;
      |                      ^~~~
a.cc:22:21: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |          if(B[i]>0) ans++;
      |                     ^~~
      |                     abs
a.cc:24:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |     printf("%d\n", ans-flag);
      |                    ^~~
      |                    abs
a.cc:24:24: error: 'flag' was not declared in this scope
   24 |     printf("%d\n", ans-flag);
      |                        ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int N;
int A[100005];
int B[100005];
int main()
{
    scanf("%d", &N);
    int len = 0;
    for(int i=0;i<N:i++;i++)
    {
         scanf("%d", &A[i]);
         B[A[i]]++;
         len = max(len, A[i]);
    }
    int flag = 0;
    int ans = 0;
    for(int i=1;i<=len;i++)
    {
         while(B[i]>2) B[i]-=2;
         if(B[i]==2) flag^=1;
         if(B[i]>0) ans++;
    }
    printf("%d\n", ans-flag);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   10 |     for(int i=0;i<N:i++;i++)
      |                 ^
a.cc:10:20: error: found ':' in nested-name-specifier, expected '::'
   10 |     for(int i=0;i<N:i++;i++)
      |                    ^
      |                    ::
a.cc:10:19: error: 'N' is not a class, namespace, or enumeration
   10 |     for(int i=0;i<N:i++;i++)
      |                   ^
a.cc:10:28: error: expected ';' before ')' token
   10 |     for(int i=0;i<N:i++;i++)
      |                            ^
      |                            ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int N;
int A[100005];
int B[100005];
int main()
{
    scanf("%d", &N);
    for(int i=0;i<N:i++;i++)
    {
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
    9 |     for(int i=0;i<N:i++;i++)
      |                 ^
a.cc:9:20: error: found ':' in nested-name-specifier, expected '::'
    9 |     for(int i=0;i<N:i++;i++)
      |                    ^
      |                    ::
a.cc:9:19: error: 'N' is not a class, namespace, or enumeration
    9 |     for(int i=0;i<N:i++;i++)
      |                   ^
a.cc:9:28: error: expected ';' before ')' token
    9 |     for(int i=0;i<N:i++;i++)
      |                            ^
      |                            ;
Language: C++

#include <iostream>
#include <cstring>
#include <stdio.h>

using namespace std;

int a[100005];

int main(){
	int n, i;
	cin>>n;
	for(i = 0; i<n; i++)
		cin>>a[i];
	sort(a, a+n);
	int c = 1, e = 0, dis = 1;
	for(i = 0; i<n-1; i++){
		if(a[i] != a[i+1]){
			dis++;
			if(c%2 == 0)
				e++;
			c = 1;
		}
		else{
			c++;
		}
	}
	if(e%2 == 0)
		cout<<dis<<endl;
	else cout<<dis-1<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   14 |         sort(a, a+n);
      |         ^~~~
      |         short
Language: Java

import java.util.HashSet;

public class Main {
  public static void main(String[] args) {
    HashSet<Integer> cards = new HashSet<Integer>();
    Scanner sc = new Scanner(System.in);
    int num = sc.nextInt();
    for(int i = 0; i < num; i++) {
      cards.add(sc.nextInt());
    }
    int res = cards.size();
    if(res % 2 == 0) res--;
    System.out.println(res);
  }
}

Compiler output:
Main.java:6: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C

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

int main(void){
	int i;
	int N;
	int A[100001];
	int hoge[100001]={0};
	int cnt=0;

	scanf("%d",&N);
	int ans = N;
	for(i=0;i<N;i++){
		scanf("%d",&A[i]);
		hoge[A[i]]++;
	}

	for(i=1;i<N;i++){
		if(hoge[i]>1)cnt+=(hoge[i] - 1);
	}

	if(cnt%2==0){ans -= cnt;}
	else{ans -= cnt-1;}
	
	printf("%d\n",ans);
	return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<algorithm>
#include<set>
using namespace std;
int main(void)         
{
    int n;
    while(cin>>n)
    {
        s.clear();
        for(int i=0;i<n;i++)
        {
            int x;
            cin>>x;
            s.insert(x);
        }
        if(s.size()%2==0)
        cout<<s.size()-1<<endl;
        else
        cout<<s.size()<<endl;
     }
     return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 's' was not declared in this scope
   10 |         s.clear();
      |         ^
Language: C


int main(void){int a[100000],n,f[100001]={0},i,j,ans=0;scanf("%d",&n);for(i=0;i<n;i++){scanf("%d",&a[i]);f[a[i]]=1;}
for(i=0;i<n;i++)ans+=f[i+1];
printf("%lld\n",ans-ans%2?0:1);return 0;}

int main(void){int a[100000],n,f[100001]={0},i,j,ans=0;scanf("%d",&n);for(i=0;i<n;i++){scanf("%d",&a[i]);f[a[i]]=1;}
for(i=0;i<n;i++)ans+=f[i+1];
printf("%lld\n",ans);return 0;}

Compiler output:
main.c: In function 'main':
main.c:2:56: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    2 | int main(void){int a[100000],n,f[100001]={0},i,j,ans=0;scanf("%d",&n);for(i=0;i<n;i++){scanf("%d",&a[i]);f[a[i]]=1;}
      |                                                        ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | 
main.c:2:56: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    2 | int main(void){int a[100000],n,f[100001]={0},i,j,ans=0;scanf("%d",&n);for(i=0;i<n;i++){scanf("%d",&a[i]);f[a[i]]=1;}
      |                                                        ^~~~~
main.c:2:56: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    4 | printf("%lld\n",ans-ans%2?0:1);return 0;}
      | ^~~~~~
main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:4:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: At top level:
main.c:6:5: error: redefinition of 'main'
    6 | int main(void){int a[100000],n,f[100001]={0},i,j,ans=0;scanf("%d",&n);for(i=0;i<n;i++){scanf("%d",&a[i]);f[a[i]]=1;}
      |     ^~~~
main.c:2:5: note: previous definition of 'main' with type 'int(void)'
    2 | int main(void){int a[100000],n,f[100001]={0},i,j,ans=0;scanf("%d",&n);for(i=0;i<n;i++){scanf("%d",&a[i]);f[a[i]]=1;}
      |     ^~~~
main.c: In function 'main':
main.c:6:56: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 | int main(void){int a[100000],n,f[100001]={0},i,j,ans=0;scanf("%d",&n);for(i=0;i<n;i++){scanf("%d",&a[i]);f[a[i]]=1;}
      |                                                        ^~~~~
main.c:6:56: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:8:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    8 | printf("%lld\n",ans);return 0;}
      | ^~~~~~
main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "set"
#include "functional"
#include "algorithm"
#include "math.h"
#include "utility"

using namespace std;
const long long int MOD = 1000000007;

int N;
int box;
int num[100001];
int s, e;
int box;
int ans=0;

int main() {
	cin >> N;
	for (int i = 0; i < N; i++) {
		cin >> box;
		num[box]++;
	}
	s = -1;
	for (int i = 1; i < 100001; i++) {
		if (s == -1) {
			if (num[i] > 1) {
				s = i;
			}
		}
		if (num[i] > 1)e = i;
	}
	if (s == -1) {
		cout << N << endl;
	}
	box = 0;
	while (1) {
		num[s]--;
		num[e]--;
		box += 2;
		for (int i = s; i <= e; i++) {
			s = -1;
			if (num[i] > 1) {
				s = i;
				break;
			}
		}
		if (s == -1) {
			break;
		}
		for (int i = e; i >= s; i--) {
			if (num[i] > 1) {
				e = i;
				break;
			}
		}
	}

	cout << N - box << endl;
	return 0;
}



Compiler output:
a.cc:18:5: error: redefinition of 'int box'
   18 | int box;
      |     ^~~
a.cc:15:5: note: 'int box' previously declared here
   15 | int box;
      |     ^~~
Language: C++

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

int main(){
  int n;
  cin >> n;
  vector<int> v;
  for(int i = 0; i < n; i++){
    int t;
    cin >> t;
    v.push_back(t);
  }
  sort(v.begin(),v.end());

  vector<int> k;
  map<int, int> counter;
  for(int i = 0; i < n; i++){
    if(counter.count(v[i]) != 0){
      counter[v[i]]++;
    }else{
      counter[v[i]] = 1;
      k.push_back(v[i]);
    }
  }

  int kl = k.size();
  while(true){
    int l = -1;
    int r = -1;
    for(int i = 0; i < kl; i++){
      if(counter[k[i]] > 1){
        if(l == -1){
          l = k[i];
        }
        r = k[i];
      }
    }
    if(r == -1){
      break;
    }
    counter[l]--;
    counter[r]--;
  }

  int result = 0;
  for(auto itr = counter.begin(); itr != counter.end(); ++itr){
    if(itr->second > 0){
      result++;
    }
  }

  cout << result << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   15 |   sort(v.begin(),v.end());
      |   ^~~~
      |   short
Language: C++

#include<iostream>
using namespace std;

int n, a, num[100001] = {}, max = 0, two = 0, ans = 0;

int main(){
	cin >> n;

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

		if (num[a] == 3){
			num[a] = 1;
		}

		if (a > max){
			max = a;
		}
	}

	for (int i = 1; i <= max; i++){
		if (num[i] > 0){
			ans++;
		}

		if (num[i] == 2){
			two++;
		}
	}

	ans -= two % 2;

	cout << ans;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: reference to 'max' is ambiguous
   17 |                 if (a > max){
      |                         ^~~
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:303:5: note: candidates are: '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:257:5: note:                 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:4:29: note:                 'int max'
    4 | int n, a, num[100001] = {}, max = 0, two = 0, ans = 0;
      |                             ^~~
a.cc:18:25: error: reference to 'max' is ambiguous
   18 |                         max = a;
      |                         ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidates are: '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:257:5: note:                 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:4:29: note:                 'int max'
    4 | int n, a, num[100001] = {}, max = 0, two = 0, ans = 0;
      |                             ^~~
a.cc:22:30: error: reference to 'max' is ambiguous
   22 |         for (int i = 1; i <= max; i++){
      |                              ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidates are: '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:257:5: note:                 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:4:29: note:                 'int max'
    4 | int n, a, num[100001] = {}, max = 0, two = 0, ans = 0;
      |                             ^~~
Language: C++

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

int main(){
  int n;
  cin >> n;
  int a[n];
  int i = 0, j = n-1, ans = n;
  while(i < n){
    cin >> a[i];
    i++;
  }
  sort(a, a+n);
  i = 0;
  while(i < j){
    while(a[i] != a[i+1] && i < n) i++;
    while(a[j-1] != a[j] && j > 0) j--;
    if(i == n-1 && j == 1) break;
    ans -= 2;
    i++;
    j--;
  }
  cout << ans << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   14 |   sort(a, a+n);
      |   ^~~~
      |   short
Language: C++

    #include <iostream>
    using ll = long long;
    using namespace std;
    int main(){
    	ll x;
    	scanf("%lld", &x);
    	ll ans = 2*x/11;
    	x %= 11;
    	ans += (x+5)/6
    	printf("%lld\n", ans);
    	return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected ';' before 'printf'
    9 |         ans += (x+5)/6
      |                       ^
      |                       ;
   10 |         printf("%lld\n", ans);
      |         ~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for (ll i = 0; i < (n); ++i)

int main() {
  ll x;
  cin >> x;
  if(x<=6){
    cout << 1 << endl;
    return(0);
  }else if(x<=11){
    cout << 2 << endl;
    return(0);
  }

  ll q,r;
  q = x/11;
  r = x%11;
  if(r == 0){
    cout << 2*q << endl;
  else if(r <= 6){
    cout << 2*q+1 << endl;
  }else{
    cout << 2*q+2 << endl;
  }
  return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:3: error: expected '}' before 'else'
   22 |   else if(r <= 6){
      |   ^~~~
a.cc:20:13: note: to match this '{'
   20 |   if(r == 0){
      |             ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  long long x;
  cin >> x;

  if(x < 6) cout << 1 << endl;
  else if(x % 11 > 5) cout << (x / 11)*2 + 2 << endl;
  else cout << (x / 11) *2 + 1 << endl;
  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected '}' at end of input
   10 |   return 0;
      |            ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  long long x;
  cin >> x;

  if(x % 11 > 5) cout << (x / 11)*2 + 2 << endl;
  else if(x % 11 == 1) cout << (x / 11)*2 << endl;
  else cout << (x / 11) *2 + 1 << endl;
  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected '}' at end of input
   10 |   return 0;
      |            ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  long long x;
  cin >> x;

  if(x % 11 > 5) cout << (x / 11)*2 + 2 << endl;
  else id(x % 11 == 1) cout << (x / 11)*2 << endl;
  else cout << (x / 11) *2 + 1 << endl;
  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'id' was not declared in this scope
    8 |   else id(x % 11 == 1) cout << (x / 11)*2 << endl;
      |        ^~
a.cc:9:3: error: 'else' without a previous 'if'
    9 |   else cout << (x / 11) *2 + 1 << endl;
      |   ^~~~
a.cc:10:12: error: expected '}' at end of input
   10 |   return 0;
      |            ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<cmath>
#include<cstring>
#include<set>
#include<climits>
using namespace std;

#define intmax INT_MAX
#define lmax LONG_MAX
#define uintmax UINT_MAX
#define ulmax ULONG_MAX
#define llmax LLONG_MAX
#define ll long long
#define rep(i,a,N) for((i)=(a);(i)<(N);(i)++)
#define rrp(i,N,a) for((i)=(N)-1;(i)>=(a);(i)--)
#define llfor ll i,j
#define sc(a) cin>>a
#define pr(a) cout<<a<<endl
#define pY puts("YES")
#define pN puts("NO")
#define py puts("Yes")
#define pn puts("No")
#define pnn printf("\n")
#define all(a) a.begin(),a.end()
#define push(a,b) (a).push_back(b)
#define llvec vector<vector<ll>>
#define charvec vector<vector<char>>
#define size(a,b) (a,vector<ll>(b))
#define llpvec vector<pair<ll,ll>>
/*pi*/double pi=acos(-1);
/*繰り上げ除算*/ll cei(ll x,ll y){ll ans=x/y;if(x%y!=0)ans++;return ans;}
/*最大公約数*/ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
/*最小公倍数*/ll lcm(ll x,ll y){return x/gcd(x,y)*y;}
/*n乗*/ll llpow(ll x,ll n){ll i,ans=1;rep(i,0,n)ans*=x;return ans;}
/*階乗*/ll fact(ll x){ll i,ans=1;rep(i,0,x)ans*=(x-i);return ans;}
/*nCr*/ll ncr(ll n,ll r){return fact(n)/fact(r)/fact(n-r);}
/*nPr*/ll npr(ll n,ll r){return fact(n)/fact(n-r);}
/*primejudge*/bool prime(ll a){if(a<=1)return false;ll i;for(i=2;i*i<=a;i++){if(a%i==0)return false;}return true;}
/*Fibonacci数列*/ll fib(ll x){ll i,fibo[x+10];fibo[0]=1;fibo[1]=1;fibo[2]=1;rep(i,3,x+1)fibo[i]=fibo[i-1]+fibo[i-2];return fibo[x];}
llfor;ll ans=0;////////////////////////////////////////////////////////////
int main(){
 ll n;
 sc(n);
 ll cnt=0;
 cnt=(n/11)*2;
 n%=11;
 if(n>5)cnt++;
 if(n!=0%%n!=5)cnt++;
 pr(cnt);
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:58:10: error: expected primary-expression before '%' token
   58 |  if(n!=0%%n!=5)cnt++;
      |          ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;
const int INF=1000000007;

int main() {
  ll n;
  cin >> n;
  ll ans = 2*(n/11);
  if(n%11==0) continue;
  else if(n%11<=6) ans++;
  else ans+=2;
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: continue statement not within a loop
   12 |   if(n%11==0) continue;
      |               ^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A;
  cin >> A;
  
  if(A <= 6){
    cout << 1 << endl;
    exit;
  }
  
  for(int YUNI = 0; YUNI < A; YUNI++){
    
  
  }

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
typedef long long int ll;

int main()
{
  ll res = 0;
  res += (n/11)*2;
  n %= 11;
  
  if(n <= 5) res += 1;
  else res += 2;
  
  cout << res << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 |   res += (n/11)*2;
      |           ^
      |           yn
Language: C++

#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int main() {
  long long N;
  cin>>N;
  long long counter=0;
  cout<<1<<endl;
  if(N%11=0)
  cout<<N*2/11<<endl;
  else if(N%11<=6)
  cout<<(N/11)*2+1<<endl;
  else
  cout<<N/11+2<<endl;}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: lvalue required as left operand of assignment
   10 |   if(N%11=0)
      |      ~^~~
Language: C++

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

const int N = pow(10,5);

vector<bool> isp(N+1, true);

void sieve() {
  isp[0] = false;
  isp[1] = false;
  for (int i=2; pow(i,2)<=N; i++) {
    if (isp[i]) for(int j=2; i*j<=N; j++) isp[i*j] = false;
  }
}

int main() {
  long long N,
  cin>>N;
  long long counter=0;
  if(N<=6)
  cout<<1<<endl;
  else if(N%11<=6)
  cout<<(N/11)*2+1<<endl;
  else
  cout<<N/11+2<<endl;}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:6: error: expected initializer before '>>' token
   20 |   cin>>N;
      |      ^~
Language: C++

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

const int N = pow(10,5);

vector<bool> isp(N+1, true);

void sieve() {
  isp[0] = false;
  isp[1] = false;
  for (int i=2; pow(i,2)<=N; i++) {
    if (isp[i]) for(int j=2; i*j<=N; j++) isp[i*j] = false;
  }
}

int main() {
  long long N,
  long long a[N];
  cin>>N;
  long long counter=0;
  if(N<=6)
  cout<<1<<endl;
  else if(N%11<=6)
  cout<<(N/11)*2+1<<endl;
  else
  cout<<N/11+2<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:3: error: expected unqualified-id before 'long'
   20 |   long long a[N];
      |   ^~~~
Language: C++

//#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
const long long INF= 1e+18+1;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll> >vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
const ll MOD=1000000007LL;
string abc="abcdefghijklmnopqrstuvwxyz";
string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int main(){
  ll x;cin>>x;
  ll d=x/11;
  ll x%=11;
  if(x<=0)cout<<2*d<<endl;
  else if(x<=5)cout<<2*d+1<<endl;
  else cout<<2*d+2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:7: error: expected initializer before '%=' token
   18 |   ll x%=11;
      |       ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i,n) for(int i=n; i>-1; --i)
#define ALL(a) (a).begin(),(a).end()
#define INIT(a,n,x); REP(i,(n)){ (a)[i]=(x); }
#define CINA(a,n); REP(i,(n)){ cin >> (a)[i]; }
#define INIT2(a,n,m,x); REP(i,(n)){ REP(j,(m)){(a)[i][j]=(x);} }
#define CINA2(a,n,m); REP(i,(n)){ REP(j,(m)){cin >> (a)[i][j];} }
#define Liny "Yes\n"
#define Linn "No\n"
#define LINY "YES\n"
#define LINN "NO\n"

#define umap unordered_map
//cout << setfill('0') << right << setw(4) << 12; // "0012"
int keta(ll x){ if(x<10){return 1;} else{return keta(x/10) + 1;}}
int keta_wa(ll x){ if(x<10){return x;} else{return keta_wa(x/10) + x%10;} }
int ctoi(char c){ return ( (c>='0' && c<='9')? c - '0': 0 );}
ll sum(ll a[],ll N){ return accumulate(a,a+N,0LL);}
ll gcd(ll a,ll b){if(a<b)swap(a,b); return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){if(a<b){swap(a,b);} return a/gcd(a,b)*b;}


int main(){
  ll x; cin>>x;
  ll amari = x%11;
  ll r;
  if(amari==0){
    r = (X*2)/11;
  }else if(amari<=5){
    r = (x*2)/11 + 1;
  }else{
    r = (x*2)/11 + 2;
  }
  cout << r;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:10: error: 'X' was not declared in this scope
   32 |     r = (X*2)/11;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define intll int long long

int main() {
  intll n;
  cin >> n;
  if(n/11 == 0) 
    cout << n/11 *2 << endl;
  else if(n/11 >=7)
   cout << n/11*2 +2 << endl;
  else
    cout << n.11*2+1 << endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: expected ';' before numeric constant
   16 |     cout << n.11*2+1 << endl;
      |              ^~~
      |              ;
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main() {
  long long x; cin >> x;
  ll ans = (x / 11) * 2;
  x %= 11;
  if (x > 0) ans++;
  if (x > 6) ans++;
  cout << ans << '\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'll' was not declared in this scope
    6 |   ll ans = (x / 11) * 2;
      |   ^~
a.cc:8:14: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |   if (x > 0) ans++;
      |              ^~~
      |              abs
a.cc:9:14: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   if (x > 6) ans++;
      |              ^~~
      |              abs
a.cc:10:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |   cout << ans << '\n';
      |           ^~~
      |           abs
Language: C++

#include<iosteam>
using namespace std;
int main(){
  long long x;
  cin >> x;
  long long ans;
  ans = x*2/11;
  if(ans*11==x) cout << ans << endl;
  if(ans*11<x && ans*11<x-6) cout << ans+1 << endl;
}

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

#include<stdio.h>
int main(){
    long long int x;
    scanf("%lld",&x);
    long long int ans;
    if(x11==0||x%11==6){
        ans=x*2/11;;
    }else{
        ans=(x*2)/11+1;   
    }
    printf("%lld\n",ans);
    return 0;

}


Compiler output:
main.c: In function 'main':
main.c:6:8: error: 'x11' undeclared (first use in this function)
    6 |     if(x11==0||x%11==6){
      |        ^~~
main.c:6:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  long long x;
  scanf("%lld",&x);
  x *= 2;
  x = (x/11) + min(1,x%11);
  printf("%lld",x);
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: no matching function for call to 'min(int, long long int)'
    7 |   x = (x/11) + min(1,x%11);
      |                ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:   template argument deduction/substitution failed:
a.cc:7:19: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
    7 |   x = (x/11) + min(1,x%11);
      |                ~~~^~~~~~~~
/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, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:7:19: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    7 |   x = (x/11) + min(1,x%11);
      |                ~~~^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = unsigned long long;

int main() {
  ll x;
  cin >> x;
  ll result = 0;
  ll div = x / 11;
  ll mod = x % 11;
  result += div * 2;
  if (mod == 0) {
    continue;
  } else if (5 < mod) {
    result += 2;
  } else {
    ++result;
  }
  cout << result << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: continue statement not within a loop
   13 |     continue;
      |     ^~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
    long long x; cin>>x;
    cout<<x/11*2;<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: expected primary-expression before '<<' token
    6 |     cout<<x/11*2;<<endl;
      |                  ^~
Language: C++

#include <iostream>
#include <vector>
#include <cstring>
#include <algorithm> // sort

#define REP(i, n) for (long long i = 0; i < (n); i++) 
typedef long long ll;
static const ll MOD = 1000000007;
static const ll INF = 1000000000000000000LL;
using namespace std;

//arc068_c
//サイコロの6と5を繰り返せば良い
//x / 11 と x / 6
int main(){
  ll X,res;
  cin >> X;

  res = (X / 11) * 2;

  X %= 11;

  if(X != 0)
  {
    if(X > 6)res+=2;
    else res++
  }
  cout << res << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:15: error: expected ';' before '}' token
   26 |     else res++
      |               ^
      |               ;
   27 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  long x;
  long sum=0;
  while(X>0){
    if(sum%2==0)X-=6;
    else X-=5;
    sum++;
  }
  cout << sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'X' was not declared in this scope
    7 |   while(X>0){
      |         ^
Language: C++

#include<iostream>
#include<cstring>
#include<cmath>
#include<queue>
#include<algorithm>
#define LL long long
#define INF 0x3f3f3f3f
using namespace std;
const int N=2e5+100;
int arr[N];
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    LL n;
    while(cin>>n) {
        LL ans=0;
        if(n<7) {
            ans=0;
        } else if(n==7) {
            ans=2;
        } else if(n<=11) {
            ans=1;
        } else {
            ans=n/11*2-;
            if(n%11==0)ans+=0;
            else if(n%11<=6)ans+=1;
            else ans+=2;
        }
        cout<<ans<<endl;

    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:24: error: expected primary-expression before ';' token
   26 |             ans=n/11*2-;
      |                        ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<cstring>
#include<cmath>
#include<ctime>
#include<algorithm>
#include<utility>
#include<stack>
#include<queue>
#include<vector>
#include<set>
#include<map>
#define EPS 1e-9
#define PI acos(-1.0)
#define INF 0x3f3f3f3f
#define LL long long
const int MOD = 1E9+7;
const int N = 1000+5;
const int dx[] = {0,0,-1,1,-1,-1,1,1};
const int dy[] = {-1,1,0,0,-1,1,-1,1};
using namespace std;
int main(){
    LL x;
    scanf("%lld",&x);

    LL res;
    if(x<=6)
        res=1;
    else{
        if(x%11==0)
            res=(x/11)*2;
        else{
            LL before=(x/11)*2;
            x-=before*11;
            if(x<=6)
                res=before+1;
            else
                res=before+2;
        }
    }

    printf("%ll
           d\n",res);

    return 0;
}

Compiler output:
a.cc:44:12: warning: missing terminating " character
   44 |     printf("%ll
      |            ^
a.cc:44:12: error: missing terminating " character
   44 |     printf("%ll
      |            ^~~~
a.cc:45:13: error: stray '\' in program
   45 |            d\n",res);
      |             ^
a.cc:45:15: warning: missing terminating " character
   45 |            d\n",res);
      |               ^
a.cc:45:15: error: missing terminating " character
   45 |            d\n",res);
      |               ^~~~~~~
a.cc: In function 'int main()':
a.cc:45:12: error: 'd' was not declared in this scope
   45 |            d\n",res);
      |            ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
using namespace std;
#define INF 0x7fffffff
#define PI acos(-1.0)
#define MOD 2520
#define E 1e-12
#define ll long long   
using namespace std;
#define N 1500
int a[N];
int main()
{
    ll n;
    scanf("%lld",&n);
    if(n==6)
	{
		cout<<1<<endl;
		return;
	}
	
    if(n<=5)
	{
		cout<<1<<endl;
	}
	else
	{
		ll ans=1;
		n-=5;
		ll x=n/11;
		ll y=n%11;
		ans+=2*x;
		if(y<=6&&y>=1)
		{
			ans++;
		}
		else
		{
			ans+=2;
		}
		cout<<ans<<endl;
		
	}
    
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:21:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   21 |                 return;
      |                 ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  ll x,ans;
  cin >> x;
  ans = x/11;
  ans *= 2;
  x %= 11;
  if(x == 0);
  else if(x <= 5)ans++;
  else ans += 2; 
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'll' was not declared in this scope
    4 |   ll x,ans;
      |   ^~
a.cc:5:10: error: 'x' was not declared in this scope
    5 |   cin >> x;
      |          ^
a.cc:6:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
    6 |   ans = x/11;
      |   ^~~
      |   abs
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){

long long x, cnt = 0;
  cin >> x;
  
  if(x > 11){
    cnt = x / 11;
    x %= 11;
  }
  
  if(x == 0) cout << cnt * 2 << endl;
  else if((x < 7) && (x > 0)) cout << 1 + cnt * 2 << endl;
  else if((x < 11) && (x > 0))cout << 2 + cnt * 2 << endl;
  return 0;
 

Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: expected '}' at end of input
   17 |   return 0;
      |            ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
    long x;
    cin >> x;
    cout << max(1, min((x / 11) * 2 + 2, ((x + 4) / 11) * 2 + 1)) << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: no matching function for call to 'max(int, const long int&)'
    7 |     cout << max(1, min((x / 11) * 2 + 2, ((x + 4) / 11) * 2 + 1)) << endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:7:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long int')
    7 |     cout << max(1, min((x / 11) * 2 + 2, ((x + 4) / 11) * 2 + 1)) << 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:
/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:7:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    7 |     cout << max(1, min((x / 11) * 2 + 2, ((x + 4) / 11) * 2 + 1)) << endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

using lli = long long int;
using Vint = vector<int>;
using Vlli = vector<lli>;
using Wint = vector<Vint>;
using Wlli = vector<Vlli>;
using pii = pair<int, int>;
using pll = pair<lli, lli>;

const int MOD = 1e9 + 7;
const int INFi = 2e9 + 1;
const lli INFl = (lli)(9e18) + 1;
const vector<pii> DXDY = {make_pair(1, 0), make_pair(-1, 0), make_pair(0, 1), make_pair(0, -1)};

#define FOR(i, a, b) for(int (i) = (a); (i) < (b); (i)++)
#define FOReq(i, a, b) for(int (i) = (a); (i) <= (b); (i)++)
#define rFOR(i, a, b) for(int (i) = (b); (i) >= (a); i--)
#define REP(i, n) FOR(i, 0, n)
#define rREP(i, n) rFOR(i, 0, (n-1))
#define vREP(i, vec) for(auto &(i) : (vec))


template <class T> inline int argmin(vector<T> vec){return min_element(vec.begin(), vec.end()) - vec.begin();}
template <class T> inline int argmax(vector<T> vec){return max_element(vec.begin(), vec.end()) - vec.begin();}
template <class T> inline void chmax(T &a, T b){a = max(a, b);}
template <class T> inline void chmin(T &a, T b){a = min(a, b);}


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


int main(void){
  lli x, q, p; cin >> x;
  p = x / 11; q = x % 11;
  if(q == 0) cout << 2 * p << "\n";
  else cout << (2 * p + 1) + (q > 6) << "\n";
  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:39:12: error: expected '}' at end of input
   39 |   return 0;
      |            ^
a.cc:34:15: note: to match this '{'
   34 | int main(void){
      |               ^
Language: C++

#include <cstdio>

using namespace std;

int main() {
  long long x;
  scanf("%lld", &x);
  long long set;
  set = x / 11;
  if (x % 11 >= 7) {
    printf("%lld", set*2 + 2);
  } else if (x % 11 > 0) {
    printf("%lld", set*2 + 1);
  } else {
    printf("%lld", set*2);
  return 0;
}


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

#import<stdio.h> main(){long long x;scanf("%lld",&x);printf("%lld\n",x/11*2+(x%11+5)/6);}


Compiler output:
main.c:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<stdio.h> main(){long long x;scanf("%lld",&x);printf("%lld\n",x/11*2+(x%11+5)/6);}
      |  ^~~~~~
main.c:1:18: warning: extra tokens at end of #import directive
    1 | #import<stdio.h> main(){long long x;scanf("%lld",&x);printf("%lld\n",x/11*2+(x%11+5)/6);}
      |                  ^~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#import<stdio.h>main(){long long x;scanf("%lld",&x);printf("%lld\n",x/11*2+(x%11+5)/6);}


Compiler output:
main.c:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<stdio.h>main(){long long x;scanf("%lld",&x);printf("%lld\n",x/11*2+(x%11+5)/6);}
      |  ^~~~~~
main.c:1:17: warning: extra tokens at end of #import directive
    1 | #import<stdio.h>main(){long long x;scanf("%lld",&x);printf("%lld\n",x/11*2+(x%11+5)/6);}
      |                 ^~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long ll;

const int maxn = 0;
int n;

int main()
{
	ios_base::sync_with_stdio(0); cin.tie(NULL);
	ll x;
	cin >> x;
	double ans = (double)x / 11;
	ans = ans * 2;
	ll lol = ceil(ans);
//	if(x <= 6) cout << 1;
	else cout << lol;	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'else' without a previous 'if'
   18 |         else cout << lol;
      |         ^~~~
Language: C++


#define dump(x)  cout << #x << " = " << (x) << endl;// debug cout

#define FOR(i,a,b) for(int i=(a);i<(b);++i)// for macro
#define REP(i,n) for(int i=0;i<(n);++i)
#define REPR(i,n) for(int i=n;i>=0;i--)

#define ALL(obj) (obj).begin(),(obj).end()// iterator

#define pb(a) push_back(a)//push_back
#define mp make_pair// make_pair


int main(){

    // kokoni kaku

    ll x;
    cin>>x;
    ll quot =ldiv(x,11).quot*2;
    ll rem =ldiv(x,11).rem;
    if(rem!=0)quot+=(rem>6?2:1);
    cout<<quot<<endl;
    
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'll' was not declared in this scope
   18 |     ll x;
      |     ^~
a.cc:19:5: error: 'cin' was not declared in this scope
   19 |     cin>>x;
      |     ^~~
a.cc:19:10: error: 'x' was not declared in this scope
   19 |     cin>>x;
      |          ^
a.cc:20:7: error: expected ';' before 'quot'
   20 |     ll quot =ldiv(x,11).quot*2;
      |       ^~~~~
      |       ;
a.cc:21:7: error: expected ';' before 'rem'
   21 |     ll rem =ldiv(x,11).rem;
      |       ^~~~
      |       ;
a.cc:22:8: error: 'rem' was not declared in this scope
   22 |     if(rem!=0)quot+=(rem>6?2:1);
      |        ^~~
a.cc:22:15: error: 'quot' was not declared in this scope
   22 |     if(rem!=0)quot+=(rem>6?2:1);
      |               ^~~~
a.cc:23:5: error: 'cout' was not declared in this scope
   23 |     cout<<quot<<endl;
      |     ^~~~
a.cc:23:11: error: 'quot' was not declared in this scope
   23 |     cout<<quot<<endl;
      |           ^~~~
a.cc:23:17: error: 'endl' was not declared in this scope
   23 |     cout<<quot<<endl;
      |                 ^~~~
Language: C++

import math

X=int(input())

res=(1 if X <= 5 else math.ceil(X/11*2))

print(res)

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <iostream>
using namespace std;

int main(){
long long x;
cin>>x;

long long p=x/11;
if(p*11==x)p--;
long long ans=p
p*=11;
if(x-p<=6)ans++;
else ans+=2;
cout<<ans;


return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:1: error: expected ',' or ';' before 'p'
   11 | p*=11;
      | ^