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

include<bits/stdc++.h>
using namespace std;
/*
2019/05/26
*/
int main(){
  int n,m;
  cin>>n>>m;
  int ans=3*n+m;
  ans/=2;
  cout<<ans<<endl;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin>>n>>m;
      |   ^~~
a.cc:11:3: error: 'cout' was not declared in this scope
   11 |   cout<<ans<<endl;
      |   ^~~~
a.cc:11:14: error: 'endl' was not declared in this scope
   11 |   cout<<ans<<endl;
      |              ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A,P;
  cin>>A>>P;
  
  int sum=A*3+P;
  
  cout<<sum/2<<endl;
}

  

Compiler output:
a.cc:3:1: error: extended character   is not valid in an identifier
    3 |  
      | ^
a.cc:3:1: error: '\U000000a0' does not name a type
    3 |  
      | ^
Language: Java

#import java.util.*;
public class pie
{
  public void main(String args[])
  {
    Scanner Sc=new Scanner(System.in);
    int t=Sc.nextInt();
    int n=Sc.nextInt();
    int a=t*3+n;
    System.out.println(a/2);
  }
}

Compiler output:
Main.java:1: error: illegal character: '#'
#import java.util.*;
^
Main.java:1: error: class, interface, enum, or record expected
#import java.util.*;
        ^
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef vector<int> V;
const long long MOD=1000000007LL;
const long long INFL=1LL << 60;
const int INF=1<<29;


int main() {
    int a,p;
    cin >>A>>P;
    cout<<(3*A+P)/2<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'A' was not declared in this scope
   13 |     cin >>A>>P;
      |           ^
a.cc:13:15: error: expected primary-expression before ';' token
   13 |     cin >>A>>P;
      |               ^
a.cc:14:17: error: expected primary-expression before ')' token
   14 |     cout<<(3*A+P)/2<<endl;
      |                 ^
Language: C++

#include <bitrs/stdc++.h>
using namespace std;
int main()
{
	int a,p;
	cin>>a>>p;
	int s=0;
	s=a*3+p;
	cout<<s/2;
	return 0;
} 

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

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

int main() {
  int A, P,i,a,k;
  cin >> A >> P ;
 	a=3*A;
  i=a+p;
  k=i%2;
  cout<< k << endl;
  // ここにプログラムを追記
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'p' was not declared in this scope
    8 |   i=a+p;
      |       ^
Language: C++

#include <bits/stdc++.h>
#define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define fu(i,r,t) for(int i=r;i<=t;i++)
#define fd(i,r,t) for(int i=r;i>=t;i--)
#define Set set<int>
#define int long long
#define P pair<int,int>
const int maxn = 1005;
const int INF = 1e17 +6;
using namespace std;
int n,m,a[maxn],b[maxn],c[maxn];
set<int>T;
int32_t main() {
    IOS;
    cin>>n>>m;
    cout<<(n*3+m)/2);
    return 0;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:16:20: error: expected ';' before ')' token
   16 |     cout<<(n*3+m)/2);
      |                    ^
      |                    ;
Language: C++

#include <iostream>

using namespace std;

int main() {
  int a, p;
  cin >> a >> p;
  cout << (a * 3 + p) / 2 << endl;/
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:35: error: expected primary-expression before '/' token
    8 |   cout << (a * 3 + p) / 2 << endl;/
      |                                   ^
a.cc:9:3: error: expected primary-expression before 'return'
    9 |   return 0;
      |   ^~~~~~
Language: C++

#include<iostream>
int main(){
	int a,p;
  	cin>>a>>p;
   cout<<(p+(3*a))/2
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |         cin>>a>>p;
      |         ^~~
      |         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:5:4: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |    cout<<(p+(3*a))/2
      |    ^~~~
      |    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<stdio.h>
int main(void) {
    int a,b,result;
    scanf("%d",&a &b);
    result = (a*3+b)/2;
    printf("%d\n",result);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:19: error: invalid operands to binary & (have 'int *' and 'int')
    4 |     scanf("%d",&a &b);
      |                ~~ ^
      |                |
      |                int *
Language: C++

#include<iostream>
using namespac estd;
int main()
{
  int a,b;
  cin >> a >>b;
  cout << (a*3+b)/2 << endl;
  return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespac'
    2 | using namespac estd;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> a >>b;
      |   ^~~
      |   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 << (a*3+b)/2 << 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:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout << (a*3+b)/2 << 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<stdio.h>

int main(){
  int a,p;
  scanf("%d%d",&a,&p);
  printf("%d",(3a+p)/2);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:16: error: invalid suffix "a" on integer constant
    6 |   printf("%d",(3a+p)/2);
      |                ^~
Language: C++

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



int main(void)
{
	int a, p;

	cin >> a >> p;

	p += a * 3;

	cout << floor(p / 2)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: 'floor' was not declared in this scope
   17 |         cout << floor(p / 2)<<endl;
      |                 ^~~~~
Language: Java

import java.util.Scanner;

public class A {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int p = sc.nextInt();

        p += 3 * a;

        System.out.println(p / 2);

        sc.close();
        ;
    }
}

Compiler output:
Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
       ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,P;
  cin >>A>>P;
  int answer=0;
  answer=3*A-P;
  cout <<anser/2<<ensl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'anser' was not declared in this scope; did you mean 'answer'?
    8 |   cout <<anser/2<<ensl;
      |          ^~~~~
      |          answer
a.cc:8:19: error: 'ensl' was not declared in this scope
    8 |   cout <<anser/2<<ensl;
      |                   ^~~~
Language: C++

// g++ -std=c++14 -stdlib=libc++ -O2 ./A.cpp

#include <cstdio>
#include <algorithm>
#include <vector>
#include <string>
#include <iostream>
#include <climits>
#include <cmath>
#include <functional>
#include <map>
// #include <bits/stdc++.h>
using namespace std;

#define size_t int
typedef long long ll;
// #define int long long
typedef vector<int> VI;
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define debug(x) cerr << #x << " = " << (x) << " (line " << __LINE__ << ")" << endl;
#define debug1(i, x) cerr << "(" << (i) <<  ") " << #x << " = " << (x) << " (line " << __LINE__ << ")" << endl;
#define debug2(i, j, x) cerr << "(" << (i) << ", " << (j) <<  ") " << #x << " = " << (x) << " (line " << __LINE__ << ")" << endl;
template <typename T> class vec2d : public vector<vector<T>> {
public:
    vec2d(int H, int W): vector<vector<T>> (H, vector<T>(W)) {
    }
};
template <typename T> istream& operator >> (istream& is, vector<T>& vec){
  for(T& x: vec) is >> x;
  //for(int i=0; i<vec.size(); i++) is >> x[i]; とかでもいいです。
  return is;
}
template <typename T> ostream& operator << (ostream& os, vector<T>& vec){
  REP(i, vec.size()) {
    os << vec[i] << ( i+1 == vec.size() ? "" : " " );
  }
  return os;
a}
struct aaa{
    aaa(){
        cin.tie(0); ios::sync_with_stdio(0);
        // cout<<fixed<<setprecision(20);
    };
}aaaaaaa;

signed main(signed argc, char **argv) {
  int A, P;
  cin >> A >> P;
  cout << (A*3 + P) / 2 << endl;
  return 0;
}


Compiler output:
a.cc: In function 'std::ostream& operator<<(std::ostream&, std::vector<T>&)':
a.cc:41:1: error: 'a' was not declared in this scope
   41 | a}
      | ^
Language: C++

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

int main() {
  int A,P;
  cin >> A >> P:
  int N=A*3+P;
  cout << N/2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected ';' before ':' token
    6 |   cin >> A >> P:
      |                ^
      |                ;
a.cc:8:11: error: 'N' was not declared in this scope
    8 |   cout << N/2 << endl;
      |           ^
Language: C++

#include<bits/tdc++.h>
using namespace std;
int main(){
	int a,p;
	cin>>a>>p;
	int s=a*3+p;
	cout<<s/2; 
	return 0;
}

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

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

int main() {
  int a , p;
  cin >> a >> p :
  int ans = (a*3 + p) /2;
  cout << ans;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected ';' before ':' token
    6 |   cin >> a >> p :
      |                ^~
      |                ;
a.cc:8:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |   cout << ans;
      |           ^~~
      |           abs
Language: Java

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

int main(){
    int a, n;
    cin >> a >> n;

    
    cout << (a*3+n) / 2 << endl;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include<string>
^
Main.java:3: error: illegal character: '#'
#include<cmath>
^
Main.java:4: error: illegal character: '#'
#include<algorithm>
^
Main.java:5: error: illegal character: '#'
#include<vector>
^
Main.java:10: error: not a statement
    cin >> a >> n;
             ^
Main.java:13: error: not a statement
    cout << (a*3+n) / 2 << endl;
                        ^
Main.java:8: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
  (use --enable-preview to enable unnamed classes)
8 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  cin>>a>>b;
 cout<<(3*a+b)/2
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: expected ';' before '}' token
    6 |  cout<<(3*a+b)/2
      |                 ^
      |                 ;
    7 | }
      | ~
Language: C++

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

int main() {

int A;
  int P:
  cin >> A >> P;
  
int ans;
  ans= ((3*A) + P)/2;
  cout << ans <<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: found ':' in nested-name-specifier, expected '::'
    7 |   int P:
      |        ^
      |        ::
a.cc:7:7: error: 'P' has not been declared
    7 |   int P:
      |       ^
a.cc:8:7: error: qualified-id in declaration before '>>' token
    8 |   cin >> A >> P;
      |       ^~
a.cc:11:17: error: 'P' was not declared in this scope
   11 |   ans= ((3*A) + P)/2;
      |                 ^
Language: C

#include<stdio.h>
 
int main(){
   int n,p;
   scanf("%d %d", &n,&p);
   int a ;
  	a = n*3+p;
  	a = a/3


  	printf("%d", a);
	return 0;
 
}

Compiler output:
main.c: In function 'main':
main.c:8:16: error: expected ';' before 'printf'
    8 |         a = a/3
      |                ^
      |                ;
......
   11 |         printf("%d", a);
      |         ~~~~~~
Language: C

#include <stdio.h>

int main(void){
    int a, p;
    scanf("%d %d", &a, &p);
    printf("%d",(3 * a + p) / 2)
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:33: error: expected ';' before 'return'
    6 |     printf("%d",(3 * a + p) / 2)
      |                                 ^
      |                                 ;
    7 |     return 0;
      |     ~~~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>

int main() {
    int n = 0, m = 0;
    scanf("%d %d\n", &n, &m);
    int ans = 0;
    int ans = 3 * n + m;
    printf("%d\n", ans / 2);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:9: error: redefinition of 'ans'
   10 |     int ans = 3 * n + m;
      |         ^~~
main.c:9:9: note: previous definition of 'ans' with type 'int'
    9 |     int ans = 0;
      |         ^~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define ALL(v) (v).begin(), (v).end()

using namespace std;
using ll = long long;

int main(
{
  int a, p; cin >> a >> p;
  cout << (3*a+p)/2 << endl;
}


Compiler output:
a.cc:8:5: error: cannot declare '::main' to be a global variable
    8 | int main(
      |     ^~~~
a.cc:10:3: error: expected primary-expression before 'int'
   10 |   int a, p; cin >> a >> p;
      |   ^~~
a.cc:10:3: error: expected '}' before 'int'
a.cc:9:1: note: to match this '{'
    9 | {
      | ^
a.cc:9:2: error: expected ')' before 'int'
    9 | {
      |  ^
      |  )
   10 |   int a, p; cin >> a >> p;
      |   ~~~
a.cc:8:9: note: to match this '('
    8 | int main(
      |         ^
a.cc:10:10: error: 'p' was not declared in this scope
   10 |   int a, p; cin >> a >> p;
      |          ^
a.cc:10:13: error: 'cin' does not name a type
   10 |   int a, p; cin >> a >> p;
      |             ^~~
a.cc:11:3: error: 'cout' does not name a type
   11 |   cout << (3*a+p)/2 << endl;
      |   ^~~~
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C++

#in#include<bits/stdc++.h>
using namespace std;
int a,p;
int main()
{
	cin>>a>>p;
	cout<<(a*3+p)/3<<endl;
	return 0;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #in; did you mean #if?
    1 | #in#include<bits/stdc++.h>
      |  ^~
      |  if
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>a>>p;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #in#include<bits/stdc++.h>
a.cc:7:9: error: 'cout' was not declared in this scope
    7 |         cout<<(a*3+p)/3<<endl;
      |         ^~~~
a.cc:7:9: 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<<(a*3+p)/3<<endl;
      |                          ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #in#include<bits/stdc++.h>
Language: C++

#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define Rep(i,a,b) for(int i=0;i<b;i++)
#define REP(i,a,b) for(int i=0;i<=b;i++)
#define rev(i,n) for(int i=n-1;i>=0;i--)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int,int>
#define vp vector<pair<int,int>>
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define MEMSET(a) memset(a,0,sizeof(a))
#define inf (1ll<<60)
#define Yes(f) cout <<(f?"Yes":"No")<<endl//fが真の場合Yesを出力、偽の場合Noを出力
#define yes(f) cout <<(f?"yes":"no")<<endl
#define YES(f) cout <<(f?"YES":"NO")<<endl
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v),greater<int>())

using namespace std;

const int mod=1e9+7;

signed main(){
    int a,p;
    cin >> a >> p;
    int p+=a*3;
    cout << p/2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:10: error: expected initializer before '+=' token
   32 |     int p+=a*3;
      |          ^~
Language: C++

#include<iostream>
#define ll long long int
int main(){
	ll a, p;
  	cin>>a>>p;
  	cout<<(3*a + p)/2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin>>a>>p;
      |         ^~~
      |         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:6:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         cout<<(3*a + p)/2;
      |         ^~~~
      |         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 <cstdio>
#include <string>
#include <vector>
#include <numeric>

using namespace std;
// #define int long long
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)

int inputValue(){
    int a;
    cin >> a;
    return a;
};

void inputArray(int * p, int a){
    rep(i, a){
        cin >> p[i];
    }
};

int main(int argc, const char * argv[]) {

    // source code
    // char s[4];
    int A, P;
    cin >> A >> P;

    P += A * 3;

    cout << P / 2 <<endl;


    return 0;
}


Compiler output:
a.cc: In function 'int inputValue()':
a.cc:13:5: error: 'cin' was not declared in this scope
   13 |     cin >> a;
      |     ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #include <numeric>
  +++ |+#include <iostream>
    5 | 
a.cc: In function 'void inputArray(int*, int)':
a.cc:19:9: error: 'cin' was not declared in this scope
   19 |         cin >> p[i];
      |         ^~~
a.cc:19:9: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc: In function 'int main(int, const char**)':
a.cc:28:5: error: 'cin' was not declared in this scope
   28 |     cin >> A >> P;
      |     ^~~
a.cc:28:5: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:32:5: error: 'cout' was not declared in this scope
   32 |     cout << P / 2 <<endl;
      |     ^~~~
a.cc:32:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:32:21: error: 'endl' was not declared in this scope
   32 |     cout << P / 2 <<endl;
      |                     ^~~~
a.cc:5:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    4 | #include <numeric>
  +++ |+#include <ostream>
    5 |
Language: Java

import java.util.*;
import java.lang.*;
public class F {
    public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int apple = sc.nextInt();
    int piece_apple = sc.nextInt();
    int applePie;
    applePie = (apple * 3 + piece_apple)/2;
        System.out.println(applePie);













    }
}



Compiler output:
Main.java:3: error: class F is public, should be declared in a file named F.java
public class F {
       ^
1 error
Language: C++

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

#define ll long long
#define INF 99999999
#define rep(i,n) for(int i=0,temp=(int)(n);i<temp;++i) 
#define repi(i,start,end) for(int i=start,temp=(int)(end);i<end;++i)
#define rfor(v,x) for(const auto& x : v) //xは値を表す
#define all(x) (x).begin(),(x).end()
#define SORT(v, n) sort(v, v+n)
#define vsort(v) sort(v.begin(), v.end())
#define vfsort(v,lambda) sort(v.begin(),v.end(),lambda)
#define vint vector<int>
#define vvint vector<vector<int>>
#define vin(v) rep(i,v.size()) {cin >> v[i];}

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int ctoi(char c) {return c-'0';}
//(lambda (x y) (< x y)) => [](int x, int y) -> int { return x<y; }


int main(void){
  int a,p;cin >> a >> p;
  int kakera = a*3+p;
  cout << kakera/2 << endl

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:27: error: expected ';' before 'return'
   27 |   cout << kakera/2 << endl
      |                           ^
      |                           ;
   28 | 
   29 |   return 0;
      |   ~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    int A,P,ans;
    cin >> A >> P;
    A *= 3;
    ans = (A+P)/2
    cout << ans <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: expected ';' before 'cout'
    7 |     ans = (A+P)/2
      |                  ^
      |                  ;
    8 |     cout << ans <<endl;
      |     ~~~~
Language: Java

import java.util.Scanner;
import java.util.InputMismatchException;

class Main {
   public static void main(String args[]) {
      int x=0 ,y=0;
      int[][] z;
      Scanner scanner = new Scanner(System.in);
      x = scanner.nextInt();
      y = scanner.nextInt();
      scanner.close();
      int sum = 3*x+y;
      System.out.println((int)(sum/2);

   }
}


Compiler output:
Main.java:13: error: ')' or ',' expected
      System.out.println((int)(sum/2);
                                     ^
1 error
Language: C++

#include<iostream>
using namespace std;

int main() {
  int A,B;
  cin >> A >> B;
  cout << ( 3 * A + B) / 2 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:7:36: error: expected '}' at end of input
    7 |   cout << ( 3 * A + B) / 2 << endl;
      |                                    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <cmath>
#include <string>
#include <climits>
#include <iomanip>
#include <algorithm>
#include <queue>
#include <map>
#include <tuple>

int main() {
	int a, p; std::cin >> a >> p;
	std::cout << (a * 3 + p) / 2 << std::endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: 'cin' is not a member of 'std'
   11 |         int a, p; std::cin >> a >> p;
      |                        ^~~
a.cc:8:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    7 | #include <map>
  +++ |+#include <iostream>
    8 | #include <tuple>
a.cc:12:14: error: 'cout' is not a member of 'std'
   12 |         std::cout << (a * 3 + p) / 2 << std::endl;
      |              ^~~~
a.cc:12:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C

#include <stdio.h>

int main(){
    int i, j, k, l, m, n;
    int A, p;
    
    scanf("%d", &A);
    scanf("%d", &P);
    
    printf("%d\n", (A*3+P)/2);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:18: error: 'P' undeclared (first use in this function)
    8 |     scanf("%d", &P);
      |                  ^
main.c:8:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(){
    int i, j, k, l, m, n;
    int A, p;
    
    scanf("%d", &A);
    scanf("%d", &P);
    
    printf("%d\n", A*3+P/2);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:18: error: 'P' undeclared (first use in this function)
    8 |     scanf("%d", &P);
      |                  ^
main.c:8:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<utility>
using namespace std;

int main(){

    int a,b;
    
    cin >> a >> b ;
    int sum = a*3 + b;

    cout << sum/2 <<endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin >> a >> b ;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<utility>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << sum/2 <<endl;
      |     ^~~~
a.cc:11:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:21: error: 'endl' was not declared in this scope
   11 |     cout << sum/2 <<endl;
      |                     ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<utility>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<list>
#include<set>
using namespace std;
int gcd(int a, int b) {
	int c = a % b;
	while (c != 0) {
		a = b;
		b = c;
		c = a % b;
	}
	return b;
}
struct UnionFind {
	vector<int> par; // par[i]:iの親の番号　(例) par[3] = 2 : 3の親が2

	UnionFind(int N) : par(N) { //最初は全てが根であるとして初期化
		for (int i = 0; i < N; i++) par[i] = i;
	}

	int root(int x) { // データxが属する木の根を再帰で得る：root(x) = {xの木の根}
		if (par[x] == x) return x;
		return par[x] = root(par[x]);
	}

	void unite(int x, int y) { // xとyの木を併合
		int rx = root(x); //xの根をrx
		int ry = root(y); //yの根をry
		if (rx == ry) return; //xとyの根が同じ(=同じ木にある)時はそのまま
		par[rx] = ry; //xとyの根が同じでない(=同じ木にない)時：xの根rxをyの根ryにつける
	}

	bool same(int x, int y) { // 2つのデータx, yが属する木が同じならtrueを返す
		int rx = root(x);
		int ry = root(y);
		return rx == ry;
	}
};
typedef long long ll;

const ll M = 1000000007;

vector<ll> fac(300001); //n!(mod M)
vector<ll> ifac(300001); //k!^{M-2} (mod M)

ll mpow(ll x, ll n) {
	ll ans = 1;
	while (n != 0) {
		if (n & 1) ans = ans * x % M;
		x = x * x % M;
		n = n >> 1;
	}
	return ans;
}
ll comb(ll a, ll b) {
	if (a == 0 && b == 0)return 1;
	if (a < b || a < 0)return 0;
	ll tmp = ifac[a - b] * ifac[b] % M;
	return tmp * fac[a] % M;
}
int main() {
	cin >> a >> b;
	cout << (a * 3 + b) / 2 << endl;
}

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

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

int main() {
int a.b;
  cin >> a >. b;
  cout << (a*3+b)/2<< endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: expected initializer before '.' token
    5 | int a.b;
      |      ^
a.cc:6:10: error: 'a' was not declared in this scope
    6 |   cin >> a >. b;
      |          ^
a.cc:6:13: error: expected primary-expression before '.' token
    6 |   cin >> a >. b;
      |             ^
a.cc:7:16: error: 'b' was not declared in this scope
    7 |   cout << (a*3+b)/2<< endl;
      |                ^
Language: C++

#include<iostream>
#include<iomanip>
#include<math.h>
#include<algorithm>
#include<utility>
#include<queue>
#include<string.h>
#include<string>
#include<set>
#include<map>
#include<vector>
using namespace std;
typedef long long LL;
typedef pair<int, int> P;

int A,P;
int main(){
    cin>>A>>P;
    cout<<(3*A+P)/2;
    return 0;
}

Compiler output:
a.cc:16:7: error: 'int P' redeclared as different kind of entity
   16 | int A,P;
      |       ^
a.cc:14:24: note: previous declaration 'typedef struct std::pair<int, int> P'
   14 | typedef pair<int, int> P;
      |                        ^
a.cc: In function 'int main()':
a.cc:18:14: error: expected primary-expression before ';' token
   18 |     cin>>A>>P;
      |              ^
a.cc:19:17: error: expected primary-expression before ')' token
   19 |     cout<<(3*A+P)/2;
      |                 ^
Language: C++

#include <bits/stdc++.h>

#define rep(i, n) for(int i = 0, i##_len = (n); i < i##_len; ++i)
#define repp(i, m, n) for(int i = m, i##_len = (n); i < i##_len; ++i)
#define all(x) (x).begin(), (x).end()
#define clr(ar, val) memset(ar, val, sizeof(ar))
template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
int gcd(int a,int b){return b?gcd(b,a%b):a;}
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair <int,int> P;
typedef long double ld;

int main(void)
{
	ll ans = 0;
	string s;
	ll n,k;	cin>>n>>k;
	ans = (a*3+p)/2;
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:16: error: 'a' was not declared in this scope
   22 |         ans = (a*3+p)/2;
      |                ^
a.cc:22:20: error: 'p' was not declared in this scope
   22 |         ans = (a*3+p)/2;
      |                    ^
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<tuple<string, int,int>> t(n);
 rep(i,n){
   string s;
   int point;
   cin >> s >> point;
   t[i]=make_tuple(s,point,i+1);
 }
 sort(t.begin(),t.end());
 
 rep(i,n){
   string s;
   int point;
   int a;
   tie(s,point,a)=p[i];
   cout << a << endl;
 }
}
   


Compiler output:
a.cc: In function 'int main()':
a.cc:22:19: error: 'p' was not declared in this scope
   22 |    tie(s,point,a)=p[i];
      |                   ^
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,k=0;
 cin >> n;
 vector<tuple<string, int,int>> t(n);
 rep(i,n){
   string s;
   int point;
   cin >> s >> point;
   t[i]=make_tuple(s,point,i+1);
 }
 sort(p.begin(),p.end());
 
 rep(i,n){
   string s;
   int point;
   int a;
   tie(s,point,a)=p[i];
   cout << a << endl;
 }
}
   

Compiler output:
a.cc: In function 'int main()':
a.cc:16:7: error: 'p' was not declared in this scope
   16 |  sort(p.begin(),p.end());
      |       ^
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,k=0;
 cin >> n;
 vector<tuple<string, int, int>> t(n);
 rep(i,n){
   string s;
   int point;
   cin >> s >> point;
   p[i]=make_pair(s,point,i+1);
 }
 sort(p.begin(),p.end());
 
 rep(i,n){
   string s;
   int point,a;
   tie(s,point,a)=t[i];
   cout << a << endl;
 }
}
   

Compiler output:
a.cc: In function 'int main()':
a.cc:14:4: error: 'p' was not declared in this scope
   14 |    p[i]=make_pair(s,point,i+1);
      |    ^
a.cc:14:18: error: no matching function for call to 'make_pair(std::string&, int&, int)'
   14 |    p[i]=make_pair(s,point,i+1);
      |         ~~~~~~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 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_pair.h:1132:5: note: candidate: 'template<class _T1, class _T2> constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&)'
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |     ^~~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1132:5: note:   candidate expects 2 arguments, 3 provided
a.cc:16:7: error: 'p' was not declared in this scope
   16 |  sort(p.begin(),p.end());
      |       ^
Language: C++

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

int main(){
	// sengen
	int n;
	// nyuryoku
	cin >> n;
	string s;
	int p;
	vector<pair<string,pair<int,int>>> v;
	for(int i=0;i<n;i++){
		cin >> p >> s;
		v.push_back((s,(-p,i+1)));
	}
	sort(v.begin(),v.end());
	// keisan
	for(auto x:v){
		cout << x.second.second << endl;
	}
	// syutsuryoku
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: no matching function for call to 'std::vector<std::pair<std::__cxx11::basic_string<char>, std::pair<int, int> > >::push_back(int)'
   15 |                 v.push_back((s,(-p,i+1)));
      |                 ~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<std::__cxx11::basic_string<char>, std::pair<int, int> >; _Alloc = std::allocator<std::pair<std::__cxx11::basic_string<char>, std::pair<int, int> > >; value_type = std::pair<std::__cxx11::basic_string<char>, std::pair<int, int> >]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'int' to 'const std::vector<std::pair<std::__cxx11::basic_string<char>, std::pair<int, int> > >::value_type&' {aka 'const std::pair<std::__cxx11::basic_string<char>, std::pair<int, int> >&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::pair<std::__cxx11::basic_string<char>, std::pair<int, int> >; _Alloc = std::allocator<std::pair<std::__cxx11::basic_string<char>, std::pair<int, int> > >; value_type = std::pair<std::__cxx11::basic_string<char>, std::pair<int, int> >]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'int' to 'std::vector<std::pair<std::__cxx11::basic_string<char>, std::pair<int, int> > >::value_type&&' {aka 'std::pair<std::__cxx11::basic_string<char>, std::pair<int, int> >&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
Language: C++

#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <iomanip>
#include <cmath>
using namespace std;
const int MOD = 1e9+7;
using ll = long long;
using vi = vector<int>;
#define rep(i, n) for (int i = 0; i < n; i++)
#define ALL(x) x.begin(), x.end()
int main() {
    ll h,w,n,i=0,j,p;
    string s;
    pair<pair<string,int>,int> a[1000];
    cin >> n;
    for(i=0;i<n;i++)
    {
        cin >> s >> p;
        a[i]=make_pair(make_pair(s,-p),i+1);
    }
    sort(a,a+n);
    for(i=0;i<n;i++)
    {
        cout << a[i].second << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'cin' was not declared in this scope
   17 |     cin >> n;
      |     ^~~
a.cc:7:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    6 | #include <cmath>
  +++ |+#include <iostream>
    7 | using namespace std;
a.cc:26:9: error: 'cout' was not declared in this scope
   26 |         cout << a[i].second << endl;
      |         ^~~~
a.cc:26:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for (int i=0;i<(n);i++)
#define PI 3.14159265358979323846264338327950L
using namespace std;
using P = pair<int,int>;
using ll = long long;
using namespace std;
char in[120];
pair<pair<string,int>,int> p[110];
int main(){
    int a;
    scanf("%d",&a);
    for(int i=0;i<a;i++){
        int t;
        scanf("%s%d",in,&t);
        string tmp=in;
        p[i]=make_pair(make_pair(in,-t),i);
    }
    std::sort(p,p+a);
    for(int i=0;i<a;i++)printf("%d\n",p[i].second+1);
}
}

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

#include<iostream>
#include<vector>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
using ll = long long;
using P = pair<string, int>;
#include<algorithm>
#include<math.h>
#include<map>
#include<queue>
#include<set>

int main() {
	int n;
	cin >> n;
	vector<pair<P,int>>pai;
	set<string>ss;
	rep(i, n) {
		string s;
		int p;
		cin >> s >> p;
		P pp = make_pair(s, -p);
		pai.emplace_back(make_pair(pp, i));
	}
	sort(pai.begin(), pai.end());
	rep(i, n) {
		cout << pai[i].second +1<< endl;
	}
	return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
pair<pair<string,int>,int> t[110];//なぜint mainよりも前に宣言？
int main(){
  int N;
  cin>>N;
  
  for(int i=0;i<N;i++){
    int score;
    string name;
    cin>>name>>score;
    t[i]=make_pair(make_pair(name,score*(-1)),i+1);
  }
  
  //sort(t.begin(),t.end());　　なぜこれじゃダメ？
  std::sort(t,t+N);
  for(int i=0;i<N;i++){
    cout<<t[i].second<<endl;
  }
}
  

/*ここから駄目だったやつ
tuple<string,int,int> t[110];　　tuple型でやろうとした
 for(int i=0;i<N;i++){
    int score;
    string name;
    cin>>name>>score;
    t[i]=make_tuple(name,score*(-1),i+1);
  }
  std::sort(t,t+N);
  for(int i=0;i<N;i++){
    cout<<t[i].third<<endl;　tupleはこういう風に参照できない？
  }
}

Compiler output:
a.cc:23:1: error: unterminated comment
   23 | /*ここから駄目だったやつ
      | ^
Language: Java

import java.util.*;

public class Main{

    void solve(){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        Restaurant[] r = new Restaurant[n];
        for(int i = 0; i < n; i++){
            r[i] = new Restaurant(scan.next(), scan.nextInt(), i + 1);
        }
        Arrays.sort(r);
        for(int i = 0; i < n; i++) System.out.println(r[i].index);
    }

    public class Restaurant implements Comparable<Restaurant>{

        String place;
        int score;
        int index;

        public Restaurant(String place, int score, int index){
            this.place = place;v
            this.score = score;
            this.index = index;
        }


        @Override
        public int compareTo(Restaurant r) {
            if(!r.place.equals(this.place)) return this.place.compareTo(r.place);
            return Integer.compare(r.score, this.score);
        }

        @Override
        public String toString(){
            return this.place + " " + this.score + " " + this.index;
        }
    }


    public static void main(String[] args){
        new Main().solve();
    }
}


Compiler output:
Main.java:23: error: not a statement
            this.place = place;v
                               ^
Main.java:23: error: ';' expected
            this.place = place;v
                                ^
2 errors
Language: C++

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

//read_kaisetsu
int main() {
    int n;cin>>n;
    pair<pair<string,int>,int> p[101];
    rep(i,n){
        string s;
        int q;
        cin>>s>>q;
        p[i] = make_pair(make_pair(s,-q,i));
    }
    sort(p, p+n);
    rep(i,n)cout<<p[i].second + 1<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:35: error: no matching function for call to 'make_pair(std::string&, int, int&)'
   14 |         p[i] = make_pair(make_pair(s,-q,i));
      |                          ~~~~~~~~~^~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 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_pair.h:1132:5: note: candidate: 'template<class _T1, class _T2> constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&)'
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |     ^~~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1132:5: note:   candidate expects 2 arguments, 3 provided
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin N;
  vector<tuple<string,int,int>> A;
  for(int i=1;i<N+1;i++){
    strins S;
    int P;
    cin >> S >> P;
    p*=-1;
    A.push_back(tie(S,P,i));
  }
  sort(A.begin(),A.end());
  for(int i=0;i<N;i++){
    cout << get<2>(A.at(i)) <<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: expected ';' before 'N'
    5 |   cin N;
      |      ^~
      |      ;
a.cc:8:5: error: 'strins' was not declared in this scope; did you mean 'stdin'?
    8 |     strins S;
      |     ^~~~~~
      |     stdin
a.cc:10:12: error: 'S' was not declared in this scope
   10 |     cin >> S >> P;
      |            ^
a.cc:11:5: error: 'p' was not declared in this scope
   11 |     p*=-1;
      |     ^
Language: C++

#include <bits/stdc++.h>
#define PI 3.1415926535897932
#define _GLIBCXX_DEBUG
using namespace std;
int main() {
  
  int N;
  cin>>N;
  
  pair<pair<string,int>,int> P[N];
  for(int i=0;i<N;i++){
    cin>>P[i].first.first>>P[i].first.second;
    P[i].first.second*=-1;
    P[i].second=i+1;
  }
  sort(P.begin(),P.end());
  
  for(int i=0;i<N;i++){
    cout<<P[i].second<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: request for member 'begin' in 'P', which is of non-class type 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [N]'
   16 |   sort(P.begin(),P.end());
      |          ^~~~~
a.cc:16:20: error: request for member 'end' in 'P', which is of non-class type 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [N]'
   16 |   sort(P.begin(),P.end());
      |                    ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<tuple<string, int, int>> Guide(N);
  for (int i = 0; i < N; i++) {
    int s, p;
    cin >> s >> p;
    Guide.at(i) = make_tuple(s, -p, i);
  }
  sort(Guide.begin(), Guide.end());
  for (int i = 0; i < N; i++;) {
    cout << get<2>(Guide) << endl;
  }
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:13:29: error: expected ')' before ';' token
   13 |   for (int i = 0; i < N; i++;) {
      |       ~                     ^
      |                             )
a.cc:13:30: error: expected primary-expression before ')' token
   13 |   for (int i = 0; i < N; i++;) {
      |                              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<tuple<string, int, int>> Guide(N);
  for (int i = 0; i < N, i++) {
    int s, p;
    cin >> s >> p;
    Guide.at(i) = make_tuple(s, -p, i);
  }
  sort(Guide.begin(), Guide.end());
  for (int i = 0; i < N; i+;) {
    cout << get<2>(Guide) << endl;
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: expected ';' before ')' token
    7 |   for (int i = 0; i < N, i++) {
      |                             ^
      |                             ;
a.cc:13:28: error: expected primary-expression before ';' token
   13 |   for (int i = 0; i < N; i+;) {
      |                            ^
a.cc:13:28: error: expected ')' before ';' token
   13 |   for (int i = 0; i < N; i+;) {
      |       ~                    ^
      |                            )
a.cc:13:29: error: expected primary-expression before ')' token
   13 |   for (int i = 0; i < N; i+;) {
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <cstdlib>
char in[120];
pair<pair<string, int>, int> p[110];
int main(){
    int a;
    scanf("%s%d", in, &t);
    for(int i =0; i<a; i++){
        int t;
        scanf("%s%d", in, &t);
        string tmp = in;
        p[i] = make_pair(make_pair(in, -t), i);
    }
    sort(p, p +a);
    for(int i =0; i<a; i++){
        printf("%d\n", p[i].second +1);
    }
}

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

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

using pa = pair<string, int>;

int main() {
  int N;
  cin >> N;
  vector<pair<pa,int>> a(N);
  for (int i = 0; i < N; ++i) {
    cin >> a[i].first.frist >> a[i].first.second;
    a[i].first.second *= -1;
    a[i].second = i;
  }
  sort(a.begin(), a.end());
  for (int i = 0; i < N; ++i) {
    cout << a[i].second + 1 << endl;
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: 'struct std::pair<std::__cxx11::basic_string<char>, int>' has no member named 'frist'; did you mean 'first'?
   11 |     cin >> a[i].first.frist >> a[i].first.second;
      |                       ^~~~~
      |                       first
Language: C++

# include <bits/stdc++.h>
# define rep(i,n) for (int i = 0; i < (n); ++i)
# define FI first
# define SE second
using namespace std;
using P = pair<string, int>;

int main() {
  int n; cin >> n;
  vector<P> towns(n);
  map<int, int> mp;
  rep (i, n) {
    int s, p; cin >> s >> p;
    towns[i].FI = s;
    towns[i].SE = p;
    mp[p] = i;
  }
  
  sort(towns.begin(), towns().end(), [](P a, P b) {
    if(a.FI != b.FI){
        return a.FI < b.FI;
    } else {
        return a.SE > b.SE;
    }
  });
  
  rep (i, n) {
  	cout << mp[towns[i].SE] << endl;
  }
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:28: error: no match for call to '(std::vector<std::pair<std::__cxx11::basic_string<char>, int> >) ()'
   19 |   sort(towns.begin(), towns().end(), [](P a, P b) {
      |                       ~~~~~^~
Language: C++

# include <bits/stdc++.h>
# define rep(i,n) for (int i = 0; i < (n); ++i)
# define FI first
# define SE second
using namespace std;
using P = pair<string, int>

int main() {
  int n; cin >> n;
  vector<P> towns(n);
  map<int, int> mp;
  rep (i, n) {
    int s, p; cin >> s >> p;
    towns[i].FI = s;
    towns[i].SE = p;
    mp[p] = i;
  }
  
  sort(towns.begin(), towns().end(), [](P a, P b) {
    if(a.FI != b.FI){
        return a.FI < b.FI;
    } else {
        return a.SE > b.SE;
    }
  });
  
  rep (i, n) {
  	cout << mp[towns[i].SE] << endl;
  }
  
  return 0;
}

Compiler output:
a.cc:6:11: error: two or more data types in declaration of 'type name'
    6 | using P = pair<string, int>
      |           ^~~~~~~~~~~~~~~~~