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

#include<iostream>
using namespece std;

int mainU(){
  int a, b, t;
  cin >> a >> b >> t;
  cout << t/a*b;
  return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespece'
    2 | using namespece std;
      |       ^~~~~~~~~
a.cc: In function 'int mainU()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> a >> b >> t;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout << t/a*b;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define ll long long
#define endl '\n'
using namespace std;
int dy[4] = {1, 0, -1, 0}, dx[4] = {0, 1, 0, -1};
typedef pair<ll, ll> P;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a, b, t;
    cin >> a >> b >> t;
    cout << t / a * b << endl;
    return 0;
}#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define ll long long
#define endl '\n'
using namespace std;
int dy[4] = {1, 0, -1, 0}, dx[4] = {0, 1, 0, -1};
typedef pair<ll, ll> P;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a, b, t;
    cin >> a >> b >> t;
    cout << t / a * b << endl;
    return 0;
}

Compiler output:
a.cc:16:2: error: stray '#' in program
   16 | }#include <bits/stdc++.h>
      |  ^
a.cc:16:3: error: 'include' does not name a type
   16 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:21:5: error: redefinition of 'int dy [4]'
   21 | int dy[4] = {1, 0, -1, 0}, dx[4] = {0, 1, 0, -1};
      |     ^~
a.cc:6:5: note: 'int dy [4]' previously defined here
    6 | int dy[4] = {1, 0, -1, 0}, dx[4] = {0, 1, 0, -1};
      |     ^~
a.cc:21:28: error: redefinition of 'int dx [4]'
   21 | int dy[4] = {1, 0, -1, 0}, dx[4] = {0, 1, 0, -1};
      |                            ^~
a.cc:6:28: note: 'int dx [4]' previously defined here
    6 | int dy[4] = {1, 0, -1, 0}, dx[4] = {0, 1, 0, -1};
      |                            ^~
a.cc:24:5: error: redefinition of 'int main()'
   24 | int main() {
      |     ^~~~
a.cc:9:5: note: 'int main()' previously defined here
    9 | int main() {
      |     ^~~~
Language: C++

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

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

int a, b, t;

int main()
{
    int i, j;
    scanf("%d%d%d", &a, &b, &c);
    printf("%d", t/a*b);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:30: error: 'c' was not declared in this scope
   13 |     scanf("%d%d%d", &a, &b, &c);
      |                              ^
Language: C++

#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <utility>
#include <math.h>
#include <stdexcept>
#include <algorithm>
#include <vector>
#include <cstring>
#include <cassert>
#include <string.h>

using namespace std;
#define  rep(i,n) for(int i=0;i<n;i++)
#define  rrep(i,n) for(int i=n;i>0;i--)
#define  REP(i,a,b) for(int i=a;i<b;i++)
typedef long long int lld;
typedef vector<lld> vl;
typedef vector<int> vi;
typedef vector<string> vs;



//int arr[N]
////sort(arr,arr +N)

//vector <int> hoge
////sort(hoge.begin(),hoge.end());
///min_element(hoge.begin(),hoge.end();　最小値　　　最大値はmax_element();

int main() {

	int a,b;
ans;
	cin>>a>>b>>c;
 
ans=  (c/a)*b;


cout<<ans ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:1: error: 'ans' was not declared in this scope; did you mean 'abs'?
   34 | ans;
      | ^~~
      | abs
a.cc:35:20: error: 'c' was not declared in this scope
   35 |         cin>>a>>b>>c;
      |                    ^
Language: C++

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

int main() {
    int A, B, C;
    int sum = 0;
    cin >> A >> B >> T;

    for (int i = 1; i <= (T+0.5); i++) {
        sum += A * i;
    }

    cout << sum << endl;    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: 'T' was not declared in this scope
    9 |     cin >> A >> B >> T;
      |                      ^
Language: C++

#include<stdio.h>

int main(){
  int A=0,B=0,T=0;
  scanf("%d%d%d",&A,&B,&T)
  int ans=T*B/A;
  printf("%d",ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:27: error: expected ';' before 'int'
    5 |   scanf("%d%d%d",&A,&B,&T)
      |                           ^
      |                           ;
    6 |   int ans=T*B/A;
      |   ~~~                      
a.cc:7:15: error: 'ans' was not declared in this scope
    7 |   printf("%d",ans);
      |               ^~~
Language: C++


using namespace std;
 
int main() {
  int A, B, T;
  cin >> A >> B >> T;
  cout << (T / A) * B << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> A >> B >> T;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | 
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout << (T / A) * B << endl;
      |   ^~~~
a.cc:7:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:26: error: 'endl' was not declared in this scope
    7 |   cout << (T / A) * B << endl;
      |                          ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 |
Language: C++

#include <iostream>
#include <algorithm>
int main() {
  int A, B, T, ans;
  cin >> A >> B >> T;
  ans = B * (T / A);
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> A >> B >> T;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout << ans << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout << ans << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main(){
  int a,b,t;
  cin >> a >> b >> t;
  
  cout << t  / b *a<<endls;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: 'endls' was not declared in this scope
    8 |   cout << t  / b *a<<endls;
      |                      ^~~~~
Language: C++

#include <iostream>
#include <iomanip>
// std::cout << std::setprecision(2) << 3.141; // "3.1"
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <map>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef pair<double, ll> pdlg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef tuple<double, double, double> tddd;

static const int giga = pow(10,9);
// double pi = 3.141592653589793238463;

int main(void){
  int a,b;
  double t;
  cin >> a >> b >> t;

  cout << ((t + 0.5))/a)*b << endl;



  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:24: error: expected ';' before ')' token
   28 |   cout << ((t + 0.5))/a)*b << endl;
      |                        ^
      |                        ;
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
#include <numeric>
#include <string>
#include <functional>

using namespace std;
 
int main() {
  int a,b,c;
  cin >> a >> b >> t;
  
  int pre = (t+0.5)/a * b;
  cout << pre << endl;
  return;
  
  vector<int> v(n);

  for (int i=0;i<n;i++){
    cin >> v[i];
  }
  
  std::sort(v.begin(),v.end());
  
  vector<int> vc(n-k+1);
  for(int i=0;i<n-k+1;i++){
    vc[i] = v[i+k-1] - v[i];
  }
  
  int min = *std::min_element(vc.begin(), vc.end());
  cout << min << endl;

  std::cout << "sum = " << std::accumulate(vec.begin(), vec.end(), 0) << std::endl;
  std::cout << "avg = " << std::accumulate(vec.begin(), vec.end(), 0) / vec.size() << std::endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: 't' was not declared in this scope
   15 |   cin >> a >> b >> t;
      |                    ^
a.cc:19:3: error: return-statement with no value, in function returning 'int' [-fpermissive]
   19 |   return;
      |   ^~~~~~
a.cc:21:17: error: 'n' was not declared in this scope
   21 |   vector<int> v(n);
      |                 ^
a.cc:29:20: error: 'k' was not declared in this scope
   29 |   vector<int> vc(n-k+1);
      |                    ^
a.cc:37:44: error: 'vec' was not declared in this scope; did you mean 'vc'?
   37 |   std::cout << "sum = " << std::accumulate(vec.begin(), vec.end(), 0) << std::endl;
      |                                            ^~~
      |                                            vc
Language: C++

# [input]
# n = int(input())
# (string) s = input()
# a, b, c = map(int, input().split())
# h = list(map(int, input().split()))


a, b, t = map(int, input().split())
ans = 0
for i in range(t + 1):
    if i % a == 0 and i != 0:
        ans = ans + b
print(ans)

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #[
    1 | # [input]
      |   ^
a.cc:2:3: error: invalid preprocessing directive #n
    2 | # n = int(input())
      |   ^
a.cc:3:3: error: invalid preprocessing directive #(
    3 | # (string) s = input()
      |   ^
a.cc:4:3: error: invalid preprocessing directive #a
    4 | # a, b, c = map(int, input().split())
      |   ^
a.cc:5:3: error: invalid preprocessing directive #h
    5 | # h = list(map(int, input().split()))
      |   ^
a.cc:8:1: error: 'a' does not name a type
    8 | a, b, t = map(int, input().split())
      | ^
Language: C++

#include<stdio.h>

int main(){
  int a,b,c;
  cin >> a >> b >> c;
  cout << (c/a)*b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> a >> b >> c;
      |   ^~~
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout << (c/a)*b << endl;
      |   ^~~~
a.cc:6:22: error: 'endl' was not declared in this scope
    6 |   cout << (c/a)*b << endl;
      |                      ^~~~
Language: C++

#include <stdio.h>

int main(void)
{
	int a, b, t;

	scanf("%d %d %d", &a, &b, &t);

	printf("%d\n", (t / a) * b);

	system("pause");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'system' was not declared in this scope
   11 |         system("pause");
      |         ^~~~~~
Language: C++


#include<iostream>
#include<utility>
#include<string>
#include<vector>
#include<algorithm>
#include<deque>
#include<queue>
#include<set>
#include<map>
#include<functional>

using namespace std;
#define LL long long
#define ALF "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define LLBIG 1999999999999999999LL
#define INTBIG 1111111111
#define MOD 1000000007
#define PI pair<int,int>
#define VI vector<int>
#define VVI vector<vector<int>>

int main() {
	int a, b, c;
	cin >> a >> b >> t;
	cout << t / a * b << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:26: error: 't' was not declared in this scope
   25 |         cin >> a >> b >> t;
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define ss second
#define ff first
#define pb push_back
#define mp make_pair

int main() {
    int a,b,t;
    cin>>a>>b>>t;
    cout(t/a)*b;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
   12 |     cout(t/a)*b;
      |     ~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(long long i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
 
int main(){
  int a,b,t;
  cin >>a >> b >> c;
  cout << (t/a)*b;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: 'c' was not declared in this scope
   15 |   cin >>a >> b >> c;
      |                   ^
Language: C++

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

int main(){
  int N;cin>>N;
  int V[N],C[N],A[N];
  for(int i=0;i<N;i++) cin>>V[i];
  for(int i=0;i<N;i++) cin>>C[i];
  for(int i=0;i<N;i++) A[i]=V[i]-C[i];
  sort(A.begin(),A.end());
  reverse(A.begin(),A.end());
  int ans=0;
  for(int i=0;i<N;i++){
    if(A[i]>0) ans+=A[i];
    else break;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: request for member 'begin' in 'A', which is of non-class type 'int [N]'
   10 |   sort(A.begin(),A.end());
      |          ^~~~~
a.cc:10:20: error: request for member 'end' in 'A', which is of non-class type 'int [N]'
   10 |   sort(A.begin(),A.end());
      |                    ^~~
a.cc:11:13: error: request for member 'begin' in 'A', which is of non-class type 'int [N]'
   11 |   reverse(A.begin(),A.end());
      |             ^~~~~
a.cc:11:23: error: request for member 'end' in 'A', which is of non-class type 'int [N]'
   11 |   reverse(A.begin(),A.end());
      |                       ^~~
Language: C++

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

int main()
{
  int n, ans = 0;
  cin >> n;
  vector<int> v(n), c(n)
  for(int i=0; i<n; i++)
    cin >> v[i];
  for(int i=0; i<n; i++)
    cin >> c[i];
  
  for(int i=0; i<n; i++)
    ans += max(v[i] - c[i], 0);
  
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'for'
   10 |   for(int i=0; i<n; i++)
      |   ^~~
a.cc:10:16: error: 'i' was not declared in this scope
   10 |   for(int i=0; i<n; i++)
      |                ^
Language: C++

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

int main() {
  int n; cin >> n;
  vector<P> p(n);
  rep(i,n)
    cin >> p[i].first >> p[i].second;
  int ans = 0;
  
  rep(i,n){
    if(p[i].first > p[i].second)  
      ans += p[i].first - p[i].second;
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'P' was not declared in this scope
    9 |   vector<P> p(n);
      |          ^
a.cc:9:11: error: template argument 1 is invalid
    9 |   vector<P> p(n);
      |           ^
a.cc:9:11: error: template argument 2 is invalid
a.cc:11:13: error: invalid types 'int[ll {aka long long int}]' for array subscript
   11 |     cin >> p[i].first >> p[i].second;
      |             ^
a.cc:11:27: error: invalid types 'int[ll {aka long long int}]' for array subscript
   11 |     cin >> p[i].first >> p[i].second;
      |                           ^
a.cc:15:9: error: invalid types 'int[ll {aka long long int}]' for array subscript
   15 |     if(p[i].first > p[i].second)
      |         ^
a.cc:15:22: error: invalid types 'int[ll {aka long long int}]' for array subscript
   15 |     if(p[i].first > p[i].second)
      |                      ^
a.cc:16:15: error: invalid types 'int[ll {aka long long int}]' for array subscript
   16 |       ans += p[i].first - p[i].second;
      |               ^
a.cc:16:28: error: invalid types 'int[ll {aka long long int}]' for array subscript
   16 |       ans += p[i].first - p[i].second;
      |                            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,ans=0;
  cin>>n;
  int v[n],c[n];
  for(int i=0;i<n;i++){
    cin>>v[i]>>c[i];
    if(v[i]>c[i]){
      ans = ans + (v[i]-c[i]);
      }
    cout<<ans<<endl;
    }

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N=0;
  cin>>N;
  vector<int>V(N);
  for(int i=0;i<N;i++){
    cin>>V.at(i);
  }
  vector<int>C(N);
  for(int i=0;i<N;i++){
    cin>>C.at(i);
  }
  int ans=0;
  for(int i=0;i<N;i++){
    if(V.at(i)>C.at(i)){
      ans+=V.at(i)>C.at(i);
    }
  }
  cout<<ans<,endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: expected primary-expression before ',' token
   20 |   cout<<ans<,endl;
      |             ^
Language: C++

int main(){
  int n; cin >> n;
  int a[n], b[n];
  for(int i = 0; i < n; ++i){
    cin >> a[i];
  }
  for(int i = 0; i < n; ++i){
    cin >> b[i];
  }
  int ans = 0;
  for(int i = 0; i < n;++i){
     ans += (a[i] >= b[i] ? a[i] - b[i] : 0);
   }
   cout << ans << '\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:10: error: 'cin' was not declared in this scope
    2 |   int n; cin >> n;
      |          ^~~
a.cc:14:4: error: 'cout' was not declared in this scope
   14 |    cout << ans << '\n';
      |    ^~~~
Language: C++

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

int main(){
  int n; cin >> n;
  int a[n], b[n];
  for(int i = 0; i < n; ++i){
    cin >> a[i];
  }
  for(int i = 0; i < n; ++i){
    cin >> b[i];
  }
  int ans = 0;
  for(int i = 0; i < n;++i)[
     ans += (a[i] >= b[i] ? a[i] - b[i] : 0);
   }
   cout << ans << '\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: expected ',' before '+=' token
   15 |      ans += (a[i] >= b[i] ? a[i] - b[i] : 0);
      |         ^~~
      |         ,
a.cc:15:10: error: expected identifier before '+=' token
   15 |      ans += (a[i] >= b[i] ? a[i] - b[i] : 0);
      |          ^~
a.cc:15:45: error: expected ']' before ';' token
   15 |      ans += (a[i] >= b[i] ? a[i] - b[i] : 0);
      |                                             ^
      |                                             ]
a.cc: In lambda function:
a.cc:15:45: error: expected '{' before ';' token
a.cc: At global scope:
a.cc:17:4: error: 'cout' does not name a type
   17 |    cout << ans << '\n';
      |    ^~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin>>n;
  int v[n],c[n];
  int ans=0;
  for(int i=0;i<n;i++)
  {
    cin>>v[i];
  }
  for(int i=0;i<n;i++)
  {
    cin>>c[i];
  }
  for(int i=0;i<n;i++)
  {
     if(v[i]>c[i]
        {
          ans=ans+(v[i]-c[i]);
        }
  }
        cout<<ans<<endl;
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: expected ')' before '{' token
   19 |      if(v[i]>c[i]
      |        ~         ^
      |                  )
   20 |         {
      |         ~         
a.cc:23:3: error: expected primary-expression before '}' token
   23 |   }
      |   ^
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
#define rep(i, n) for (int i=0; i<n; ++i)
#define all(obj) (obj).begin(),(obj).end()
using namespace std;
typedef long long ll;
long long GCD(long long x, long long y) { return y ? GCD(y, x%y) : x; }

int main(){
    int N;
    cin >> N;
    vector<int> V(N), C(N);
    int ans = -10000;
    rep(i, N) cin >> V[i];
    rep(i, N) cin >> C[i];
    for(int bit=0; bit<(1<<N); ++bit){
        int X=0, Y=0;
        for(int i=0; i<N; ++i){
            if((bit>>i)&1){
                X+=V[i];
                Y+=C[i];
            }
        }
        ans = max(ans, X-Y);
    }
    cout << a
    ns << endl;
    return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:13: error: 'a' was not declared in this scope
   26 |     cout << a
      |             ^
Language: C++

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

int main(){
  int N  ;
  cin >> N ; 
  vector<int> V(N) , C(N) ; 
  int T=0;
  
  for(int i = 0 ; i < N ; i++){
    cin >> V.at(i) ; 
  }
  
  for(int i = 0 ; i < N ; i++){
    cin >> C.at(i) ; 
  }
    
  for(int i = 0 ; i < N ; i++){
    if( V.at(i) - C.at(i) > 0 ){
      T = T + V.at(I) - C.at(i) ;
    }
  }
  
  cout << T <<endl ; 
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:20: error: 'I' was not declared in this scope
   20 |       T = T + V.at(I) - C.at(i) ;
      |                    ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define rep(i,n) for(i=0;i<n;i++)
#define ll long long
#define PI 3.14159265358979323846264338327950L
int main(){
    int n,i;
    scanf("%d",&n);
    int c[n],v[n],ans=0;
    rep(i,n) scanf("%d",&v[n]);
    rep(i,n){
        scanf("%d",&c[n]);
        if(v[n]-c[n]>0){
            cost+=v[n]-c[n];
        }
    }
    printf("%d",ans);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:13: error: 'cost' undeclared (first use in this function); did you mean 'cosl'?
   15 |             cost+=v[n]-c[n];
      |             ^~~~
      |             cosl
main.c:15:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <vector>

#define endl '\n'
#define ull unsigned long long
#define ll long long
#define ul unsigned long
#define ld long double
#define PI 3.14159265359

using namespace std;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
	int t = 1;
	// cin >> t;
	while (t--) {
		int n;
		cin >> n;
		vector<int> v(n), c(n);
		for (auto &i : v) {
			cin >> i;
		}
		for (auto &i : c) {
			cin >> i;
		}
		int m = INT_MIN;
		int s = 0;
		for (int i = 0; i < n; i++) {
			if (v[i] > c[i])
				s += v[i] - c[i];
			m = max(m, s);
		}
		cout << m;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:25: error: 'INT_MIN' was not declared in this scope
   37 |                 int m = INT_MIN;
      |                         ^~~~~~~
a.cc:11:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   10 | #include <vector>
  +++ |+#include <climits>
   11 |
Language: C++

#include <algorithm>
#include <bitset>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <cctype>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#define int long long
#define double long long
using namespace std;
signed main() {
	int N;
	cin >> N;

	vector<int>V(N);
	vector<int>C(N);
	vector<int>A(N);
	int ans = 0;
	for (int i = 0; i < N; i++) {
		for(int j = 0;j<N;j++){
		cin >> V[i]>>C[j];
	}
		for (int i = 0; i < N; i++) {
			A[i]=V[i] - C[i];
		}
		sort(A.begin(), A.end());
		for (int i = 0; i < N; i++) {
			if (A[i] > 0) {
				ans += A[i];
			}
		}
		cout << ans << endl;

}

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

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

int main() {
  int N, ans;
  cin >> N;
  ans=0;
  vector<int> V(N);
  for (int i=0; i<N; i++) {
    cin >> V.at(i);
  }
  vector<int> C(N);
  for (int j=0; j<N; j++) {
    cin >> C.at(j);
  }
  vector<int> D.at(N);
  for (int k=0; k<N; k++) {
    D.at(k)=V.at(k)-C.at(k);
  }
  for (int l=0; l<N; l++) {
    ans=ans+max(D.at(l),0);
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: expected initializer before '.' token
   19 |   vector<int> D.at(N);
      |                ^
a.cc:21:5: error: 'D' was not declared in this scope
   21 |     D.at(k)=V.at(k)-C.at(k);
      |     ^
a.cc:24:17: error: 'D' was not declared in this scope
   24 |     ans=ans+max(D.at(l),0);
      |                 ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n = 0;
  cin >> n;
  int n2 = n;
  vector<int> x, y;
  while(n--) {
    int temp;
    cin >> temp;
    x.push_back(temp);
  }
  while(n2--){
    int temp;
    cin >> temp;
    y.push_back(temp);
  }
  sort(x.begin(),x.end());
  sort(y.begin(), y.end());
  cout << (x[x.size() - 1] +
    x[x.size() - 2])-(y[0] + y[1]);
  
  return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> x, y;
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> x, y;
      |          ^~~
a.cc:11:5: error: 'x' was not declared in this scope
   11 |     x.push_back(temp);
      |     ^
a.cc:16:5: error: 'y' was not declared in this scope
   16 |     y.push_back(temp);
      |     ^
a.cc:18:8: error: 'x' was not declared in this scope
   18 |   sort(x.begin(),x.end());
      |        ^
a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |   sort(x.begin(),x.end());
      |   ^~~~
      |   short
a.cc:19:8: error: 'y' was not declared in this scope
   19 |   sort(y.begin(), y.end());
      |        ^
a.cc:23:12: error: expected '}' at end of input
   23 |   return 0;
      |            ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostresm>
using namespace std;
int main(){
  int n = 0;
  cin >> n;
  int n2 = n;
  vector<int> x, y;
  while(n--) {
    int temp;
    cin >> temp;
    x.push_back(temp);
  }
  while(n2--){
    int temp;
    cin >> temp;
    y.push_back(temp);
  }
  sort(x.begin(),x.end());
  sort(y.begin(), y.end());
  cout << (x[x.size() - 1] +
    x[x.size() - 2])-(y[0] + y[1]);
  
  return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define lvector vector<ll>
#define cvector vector<char>
#define svector vector<string>
#define lque queue<ll>
#define lpque priority_queue<ll>
#define dlpque priority_queue<ll,lvector,greater<ll>>
#define P pair<ll,ll>
#define ALL(a) a.begin(),a.end()
#define RALL(a) a.rbegin(),a.rend()
#define rep(i,n) for(ll i=0; i<n; ++i)
#define print(a) cout << (a) << endl

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll n,ans=0,v,c;cin>>n;
  lvector v(n),c(n);rep(i,n) cin>>v[i];rep(i,n) cin>>c[i];
  rep(i,n) if(v[i]-c[i]>0) ans+=v[i]-c[i];
  print(ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:11: error: conflicting declaration 'std::vector<long long int> v'
   20 |   lvector v(n),c(n);rep(i,n) cin>>v[i];rep(i,n) cin>>c[i];
      |           ^
a.cc:19:14: note: previous declaration as 'long long int v'
   19 |   ll n,ans=0,v,c;cin>>n;
      |              ^
a.cc:20:16: error: conflicting declaration 'std::vector<long long int> c'
   20 |   lvector v(n),c(n);rep(i,n) cin>>v[i];rep(i,n) cin>>c[i];
      |                ^
a.cc:19:16: note: previous declaration as 'long long int c'
   19 |   ll n,ans=0,v,c;cin>>n;
      |                ^
a.cc:20:36: error: invalid types 'long long int[long long int]' for array subscript
   20 |   lvector v(n),c(n);rep(i,n) cin>>v[i];rep(i,n) cin>>c[i];
      |                                    ^
a.cc:20:55: error: invalid types 'long long int[long long int]' for array subscript
   20 |   lvector v(n),c(n);rep(i,n) cin>>v[i];rep(i,n) cin>>c[i];
      |                                                       ^
a.cc:21:16: error: invalid types 'long long int[long long int]' for array subscript
   21 |   rep(i,n) if(v[i]-c[i]>0) ans+=v[i]-c[i];
      |                ^
a.cc:21:21: error: invalid types 'long long int[long long int]' for array subscript
   21 |   rep(i,n) if(v[i]-c[i]>0) ans+=v[i]-c[i];
      |                     ^
a.cc:21:34: error: invalid types 'long long int[long long int]' for array subscript
   21 |   rep(i,n) if(v[i]-c[i]>0) ans+=v[i]-c[i];
      |                                  ^
a.cc:21:39: error: invalid types 'long long int[long long int]' for array subscript
   21 |   rep(i,n) if(v[i]-c[i]>0) ans+=v[i]-c[i];
      |                                       ^
Language: C++

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

int main() {
  int n;
  cin >> n;
  
  vector<int> a(n),b(n);
  rep(i,n) {
  cin >> a.at(i);
  }
  
  rep(i,n) {
  cin >> b.at(i);
  }
  
  int sum =0;
  
  rep(i,n) {
  if(a.at(i) > b.at(i)) {
   sum += (a.at(i) - b.at(i));
  }
     }
     
     cout << sum;
  

Compiler output:
a.cc: In function 'int main()':
a.cc:27:18: error: expected '}' at end of input
   27 |      cout << sum;
      |                  ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C

#include<stdio.h>
 
int main(){
  int n,c=0,v[50],c[50];
  
  scanf("%d",&n);
  
  for(int i=0;i<n;i++){
    scanf("%d",&v[i]);
    scanf("%d",&c[i]);
}
  for(i=0;i<n;i++){
    if(v[i]>c[i]){
      c+=v[i]-c[i];
    }
  }
  
  printf("%d\n",c);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:19: error: conflicting types for 'c'; have 'int[50]'
    4 |   int n,c=0,v[50],c[50];
      |                   ^
main.c:4:9: note: previous definition of 'c' with type 'int'
    4 |   int n,c=0,v[50],c[50];
      |         ^
main.c:12:7: error: 'i' undeclared (first use in this function)
   12 |   for(i=0;i<n;i++){
      |       ^
main.c:12:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(){
  int n,c=0,v[50],c[50];
  
  scanf("%d",&n);
  
  for(int i=0;i<n;i++){
    scanf("%d",&v[i]);
    scanf("%d",&c[i]);
}
  for(i=0;i<n;i++)
    if(v[i]>c[i])
      c+=v[i]-c[i];
  
  printf("%d\n",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:19: error: conflicting types for 'c'; have 'int[50]'
    4 |   int n,c=0,v[50],c[50];
      |                   ^
main.c:4:9: note: previous definition of 'c' with type 'int'
    4 |   int n,c=0,v[50],c[50];
      |         ^
main.c:12:7: error: 'i' undeclared (first use in this function)
   12 |   for(i=0;i<n;i++)
      |       ^
main.c:12:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:17: error: 'count' undeclared (first use in this function)
   16 |   printf("%d\n",count);
      |                 ^~~~~
Language: C++

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

int main() {
int n;
vector<int> V(n);
vector<int> C(n);
int ans;
rep(i,n){
  int d = V(i)-C(i);
  if(d > 0) ans += d;
}
cout << ans << endl;

}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: no match for call to '(std::vector<int>) (int&)'
   12 |   int d = V(i)-C(i);
      |           ~^~~
a.cc:12:17: error: no match for call to '(std::vector<int>) (int&)'
   12 |   int d = V(i)-C(i);
      |                ~^~~
Language: C++

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long; 
using pii =  pair<int, int>;
using pll =  pair<long long, long long>;
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define all(x) (x).begin(),(x).end()
constexpr char ln =  '\n';
constexpr long long MOD = 1000000007LL;
//constexpr long long MOD = 998244353LL;
template<class T, class U> inline bool chmax(T &a, U b) { if (a < b) { a = b; return true;} return false; }
template<class T, class U> inline bool chmin(T &a, U b) { if (a > b) { a = b; return true;} return false; }
const ll INF = (ll)1e18 + 1;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

int main() {
    ios::sync_with_stdio(false); cin.tie(nullptr);
    int v[n],c[n];
    rep(i,n) cin >> v[i];
    rep(i,n) cin >> c[i];
    
    int ans = 0;
    
    rep(i,n) if(v[i]>c[i]) ans += v[i]-c[i];
    
    cout << ans << ln;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:11: error: 'n' was not declared in this scope; did you mean 'yn'?
   20 |     int v[n],c[n];
      |           ^
      |           yn
a.cc:21:21: error: 'v' was not declared in this scope
   21 |     rep(i,n) cin >> v[i];
      |                     ^
a.cc:22:21: error: 'c' was not declared in this scope
   22 |     rep(i,n) cin >> c[i];
      |                     ^
a.cc:26:17: error: 'v' was not declared in this scope
   26 |     rep(i,n) if(v[i]>c[i]) ans += v[i]-c[i];
      |                 ^
a.cc:26:22: error: 'c' was not declared in this scope
   26 |     rep(i,n) if(v[i]>c[i]) ans += v[i]-c[i];
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<int> value(n);
  vector<int> cost(n);
  
  int max=0;
  for(int i=0 ;i<n;i++){
    if(value(i)>cost(i)){
      max += value.at(i)-cost.at(i);
    }
  }
  cout << max << endl;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: no match for call to '(std::vector<int>) (int&)'
   11 |     if(value(i)>cost(i)){
      |        ~~~~~^~~
a.cc:11:21: error: no match for call to '(std::vector<int>) (int&)'
   11 |     if(value(i)>cost(i)){
      |                 ~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<int> value(n);
  vector<int> cost(n);
  
  int max=0;
  for(int i=0 ;i<n;i++){
    if(value(i)>cost(i)){
      max += value(i)-cost(i);
    }
  }
  cout << max << endl;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: no match for call to '(std::vector<int>) (int&)'
   11 |     if(value(i)>cost(i)){
      |        ~~~~~^~~
a.cc:11:21: error: no match for call to '(std::vector<int>) (int&)'
   11 |     if(value(i)>cost(i)){
      |                 ~~~~^~~
a.cc:12:19: error: no match for call to '(std::vector<int>) (int&)'
   12 |       max += value(i)-cost(i);
      |              ~~~~~^~~
a.cc:12:27: error: no match for call to '(std::vector<int>) (int&)'
   12 |       max += value(i)-cost(i);
      |                       ~~~~^~~
Language: C

#inlcude <stdio.h>

int main()
{
  int n;
  scanf("%d",&n);
  int v[n],c[n];
  int i;
  i = 0;
  while (i < n)
  {
    scanf("%d",&v[i]);
    i++;
  }
  i = 0;
  while (i < n)
  {
    scanf("%d",&c[i]);
    i++;
  }
  i = 0;
  int value;
  int cost;
  cost = 0;
  value = 0;
  while (i < n)
  {
    if (v[i] - c[i] > 0)
    {
      value += v[i] - c[i];
    }
    i++;
  }
  printf("%d",value);
}


Compiler output:
main.c:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude <stdio.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |   scanf("%d",&n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #inlcude <stdio.h>
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%d",&n);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:34:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   34 |   printf("%d",value);
      |   ^~~~~~
main.c:34:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:34:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:34:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>
int main(){
  int n;
  scanf("%d",&n);
  int v[n],c[n]
  for(int i = 0;i < n;i ++){
    scanf("%d",&v[i]);
    scanf("%d",&c[i]);
  }
  int sum= 0;
  for(int i = 0;i < n;i++){
    if(v[i]>c[i]){
      sum += v[i]-c[i];
    }
  }
  printf("%d",sum);
}


Compiler output:
main.c: In function 'main':
main.c:6:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
    6 |   for(int i = 0;i < n;i ++){
      |   ^~~
main.c:6:17: error: 'i' undeclared (first use in this function)
    6 |   for(int i = 0;i < n;i ++){
      |                 ^
main.c:6:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:27: error: expected ';' before ')' token
    6 |   for(int i = 0;i < n;i ++){
      |                           ^
      |                           ;
main.c:6:27: error: expected statement before ')' token
main.c:8:17: error: 'c' undeclared (first use in this function)
    8 |     scanf("%d",&c[i]);
      |                 ^
Language: C

#include<stdio.h>
 
int main() {
   int n;
   scanf("%d", &n);
  
   int v[n];
   int c[n];
  
   for(int i = 0; i < n; i++) {
      scanf("%d",&n[i]);
   }
   for(int i = 0; i < n; i++) {
      scanf("%d",&c[i]);
   }
  
  int ans = 0;
  for(int i = 0; i < n; i++){
    if(v[i] - c[i] > 0){
      ans += v[i] - c[i];
    }
  }
  
  printf("%d", ans);
}

Compiler output:
main.c: In function 'main':
main.c:11:20: error: subscripted value is neither array nor pointer nor vector
   11 |       scanf("%d",&n[i]);
      |                    ^
Language: C

#include<stdio.h>
int main(){
  int n,c[20],v[20];
  scanf("%d",&n);
  for(int i = 0;i < n;i ++){
    scanf("%d",&v[i]);
    scanf("%d",&c[i]);
  }
  int sumX = 0,sumY =0;
  for(int i = 0;i < n;i++){
    if(c[i] < v[i]){
      sumX += v[i]
      sumY += c[i];
    }
  }
  printf("%d",sumX-sumY);
}


Compiler output:
main.c: In function 'main':
main.c:12:19: error: expected ';' before 'sumY'
   12 |       sumX += v[i]
      |                   ^
      |                   ;
   13 |       sumY += c[i];
      |       ~~~~
Language: C

#include<stdio.h>
int main(){
  int n,c[20],v[20];
  int sum = 0;
  scanf("%d",&n);
  for(int i = 0;i < n;i ++){
    scanf("%d",&v[i]);
    scanf("%d",&c[i]);
    if(c[i] < v[i]){
      sum += v[i]-c[i];
    }
    printf("%d"sum);
  }


Compiler output:
main.c: In function 'main':
main.c:12:16: error: expected ')' before 'sum'
   12 |     printf("%d"sum);
      |           ~    ^~~
      |                )
main.c:13:3: error: expected declaration or statement at end of input
   13 |   }
      |   ^
Language: C++

/**
*    created: 14.05.2020 10:29:06
**/
#include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using namespace std;

signed main() {

    cin.tie(0);
    ios_base::sync_with_stdio(false);

    int n; cin >> n;
    vector<int> v(n);
    vector<int> c(n);
    rep(i,n) cin >> v[i];
    rep(i,n) cin >> c[i];
    int ans = -1000000000000000000;
    for (int bit = 0; bit < (1 << n); bit++) {
        int vsum = 0, csum = 0;
        rep(i,n) {
            if ((bit >> i) & 1) {
                vsum += v[i];
                csum += c[i];
            }
        }
        ans = max(vsum - csum, ans);
    }
    cout << ans << endl;
    retzurn 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:5: error: 'retzurn' was not declared in this scope
   32 |     retzurn 0;
      |     ^~~~~~~
Language: C

#include <stdio.h>
int main(){
  int n,i,a[20],b[20],result;
  
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<n;i++){
    scanf("%d",&b[i]);
  }
  
  result=0;
  for(i=0;i<n;i++){
    if(a[i]>b[i]){
      result+=(a[i]-b[i]);
    }
  }
  
  printf("%d",result);
}
#include <stdio.h>
int main(){
  int n,i,a[20],b[20],result;
  
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<n;i++){
    scanf("%d",&b[i]);
  }
  
  result=0;
  for(i=0;i<n;i++){
    if(a[i]>b[i]){
      result+=(a[i]-b[i]);
    }
  }
  
  printf("%d",result);
}

Compiler output:
main.c:23:5: error: redefinition of 'main'
   23 | int main(){
      |     ^~~~
main.c:2:5: note: previous definition of 'main' with type 'int()'
    2 | int main(){
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
uisng namespace std;
int main(){
  int n,v[n],c[n];
  int c=0;
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>v[n]>>c[n];
  }
  for(int i=0;i<n;i++){
    if(v[i]<=c[i]){
      continue;
    }
    else{
      c+=(v[i]-c[i]);
    }
  }
  cout<<c;
  return 0;
}

Compiler output:
a.cc:2:1: error: 'uisng' does not name a type
    2 | uisng namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:5:7: error: conflicting declaration 'int c'
    5 |   int c=0;
      |       ^
a.cc:4:14: note: previous declaration as 'int c [n]'
    4 |   int n,v[n],c[n];
      |              ^
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>n;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:15:8: error: incompatible types in assignment of 'int' to 'int [n]'
   15 |       c+=(v[i]-c[i]);
      |       ~^~~~~~~~~~~~~
a.cc:18:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |   cout<<c;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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


int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  rep(i,n) cin >> v[i];
  vector<int> c(n);
  rep(i,n) cin >> c(n);
  int ans = 0;
  rep(i,n){
    if (v[i] > c[i]){
      ans += v[i] -c[i];
    }
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: no match for call to '(std::vector<int>) (int&)'
   13 |   rep(i,n) cin >> c(n);
      |                   ~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr long long INFL = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;



int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int N;
    cin >> N;
    int V[N],C[N];
    rep(i,N) cin >> V[i];
    rep(i,N) cin >> C[i];
    int ans=0;
    rep(i,N){
        int x=V[i]-C[i];
        if(x>0) ans+=x;
    }
    cout << x << endl;



}


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

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

int main(){
 int n;
 cin >> n;
 vector<int> v(n),c(n);
 rep(i,n) cin >> v[i];
 rep(i,n) cin >> c[i];
 int ans = 0;
 rep(i,n){
     if(v[i] > c[i]){
         ans += v[i]-c[i];
     }
 }
 cout <<ans<< endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: expected '}' at end of input
   17 |  cout <<ans<< endl;
      |                    ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

int main(){
  int N;
  cin>>N;
  vector<int>V(N);
  vector<int>C(N);
  for(int i=0;i<N;i++){
    cin>>V.at(i);
    cin>>C.at(i);
  }
  int ans=0;
  for(int i=0;i<N;i++){
    ans+=V.at(i)-C.at(i)<<endl;
  }
}

 



Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and '<unresolved overloaded function type>' to binary 'operator<<'
   15 |     ans+=V.at(i)-C.at(i)<<endl;
      |          ~~~~~~~~~~~~~~~^~~~~~
Language: C++

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

int main(){
  int N;
  cin>>N;
  vector<int>V(N);
  vector<int>C(N);
  for(int i=0;i<N;i++){
    cin>>V.at(i);
    cin>>C.at(i);
  }
  int ans=0;
  ans+=V.at(i)-C.at(i)<<endl;
}

 



Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'i' was not declared in this scope
   14 |   ans+=V.at(i)-C.at(i)<<endl;
      |             ^
Language: C++

#include<bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
int main(){
int N;
  cin>>N;
  
  vector<int> A(N); 
  for(int i=0;i<N;i++){
  cin>> A[i];
  
    
  }
   vector<int> B(N);
 
for(int i=0;i<N;i++){
cin>> B[i];
  
  
}
  for(int i=0;i<N;i++){
  int count+=A[i]-B[i];
  }
  int C=max(0,count);
  cout<<C<<endl;



}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: expected initializer before '+=' token
   22 |   int count+=A[i]-B[i];
      |            ^~
a.cc:24:12: error: no matching function for call to 'max(int, <unresolved overloaded function type>)'
   24 |   int C=max(0,count);
      |         ~~~^~~~~~~~~
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: 'constexpr const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = int]'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:36: note:   no known conversion for argument 2 from '<unresolved overloaded function type>' to 'const int&'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |                         ~~~~~~~~~~~^~~
/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:24:12: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   24 |   int C=max(0,count);
      |         ~~~^~~~~~~~~