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

#include <stdio.h>
#include <string>
using namespace std;
int main(){
	string str;
	cin>>str;
	for (int i=0;i<3;i++) cout<<str[i];
	cout<<endl;
}
 



Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>str;
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <string>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:7:31: error: 'cout' was not declared in this scope
    7 |         for (int i=0;i<3;i++) cout<<str[i];
      |                               ^~~~
a.cc:7:31: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout<<endl;
      |         ^~~~
a.cc:8:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:15: error: 'endl' was not declared in this scope
    8 |         cout<<endl;
      |               ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <string>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = sc.nextLine();
    String name = sc.nextLine();
    for(int i = 0;i < 3;i++){
      System.out.println(name.charAt(i));
    }
  }
}


Compiler output:
Main.java:5: error: incompatible types: String cannot be converted to Scanner
    Scanner sc = sc.nextLine();
                            ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
vector<string> vec = {};
 
 
    for (int i = 0; i < vec.at(); i++) {
        cout << vec.at(i) << endl;
    }
}

Compiler output:
a.cc:7:5: error: expected unqualified-id before 'for'
    7 |     for (int i = 0; i < vec.at(); i++) {
      |     ^~~
a.cc:7:21: error: 'i' does not name a type
    7 |     for (int i = 0; i < vec.at(); i++) {
      |                     ^
a.cc:7:35: error: 'i' does not name a type
    7 |     for (int i = 0; i < vec.at(); i++) {
      |                                   ^
a.cc:10:1: error: expected declaration before '}' token
   10 | }
      | ^
Language: C++

atcoder-tools: The pre-rendered templates are not found.#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<ll,ll> P;
typedef pair<P,ll> PLL;
typedef pair<P,P> PP;
typedef vector<ll> VECLL;
typedef vector<P> VECP;
typedef priority_queue<P,VECP,greater<P> > PQP;
typedef priority_queue<ll, VECLL, greater<ll> > PQll;

#define rep(i,a,n) for(ll i = a;i < n;i++)   
#define rrep(i,a,n) for(ll i = n; i >= a;i--)
#define index_check(i,n) if(i > n-1 || i < 0) continue; 
#define LINF (ll)1e18
#define INF (int)1e9
#define fs first
#define sc second


int main(){
    string s;
    cin >> s;
    rep(i,0,3) cout << s[i];
    cout << endl;
    return 0;
}

Compiler output:
a.cc:1:57: error: stray '#' in program
    1 | atcoder-tools: The pre-rendered templates are not found.#include <bits/stdc++.h>
      |                                                         ^
a.cc:1:1: error: 'atcoder' does not name a type
    1 | atcoder-tools: The pre-rendered templates are not found.#include <bits/stdc++.h>
      | ^~~~~~~
a.cc:5:9: error: 'pair' does not name a type
    5 | typedef pair<ll,ll> P;
      |         ^~~~
a.cc:6:9: error: 'pair' does not name a type
    6 | typedef pair<P,ll> PLL;
      |         ^~~~
a.cc:7:9: error: 'pair' does not name a type
    7 | typedef pair<P,P> PP;
      |         ^~~~
a.cc:8:9: error: 'vector' does not name a type
    8 | typedef vector<ll> VECLL;
      |         ^~~~~~
a.cc:9:9: error: 'vector' does not name a type
    9 | typedef vector<P> VECP;
      |         ^~~~~~
a.cc:10:9: error: 'priority_queue' does not name a type
   10 | typedef priority_queue<P,VECP,greater<P> > PQP;
      |         ^~~~~~~~~~~~~~
a.cc:11:9: error: 'priority_queue' does not name a type
   11 | typedef priority_queue<ll, VECLL, greater<ll> > PQll;
      |         ^~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:23:5: error: 'string' was not declared in this scope
   23 |     string s;
      |     ^~~~~~
a.cc:24:5: error: 'cin' was not declared in this scope
   24 |     cin >> s;
      |     ^~~
a.cc:24:12: error: 's' was not declared in this scope; did you mean 'sc'?
   24 |     cin >> s;
      |            ^
      |            sc
a.cc:25:16: error: 'cout' was not declared in this scope
   25 |     rep(i,0,3) cout << s[i];
      |                ^~~~
a.cc:26:5: error: 'cout' was not declared in this scope
   26 |     cout << endl;
      |     ^~~~
a.cc:26:13: error: 'endl' was not declared in this scope
   26 |     cout << endl;
      |             ^~~~
Language: C

#include<bits/stdc++.h>
using namespace std ;
typedef long long int ll; 
typedef long double ld;
#define PB push_back
#define MP make_pair
#define F first 
#define S second 
#define P push
#define vvi vector<vector<ll> >
#define vi vector<ll>  
#define vpi vector< pair<ll,ll> >  
#define sz(a) (ll)a.size()
const ll N = 1e9 + 7 , N1 =  1e6+4;              
signed main()
{   
string t;
cin>>t;
cout<<t[0]<<t[1]<<t[2];
return 0;
}


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

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define REP(i,a,b) for(int i=int(a);i<(int)b;++i)
#define Graph vector<vecctor<ll>>
#define pairs vector<pair<ll,ll>>
#define pb push_back



using namespace std;
using ll = long long;
const ll INF = 1e18;
const double PI = acos(-1);

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}



int main(void)
{
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    string s;
    cin >> s;
    string ans = s[0];
    ans += a[1];
    ans += a[2];
    cout << ans << endl;
    
    
    



    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:21: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   38 |     string ans = s[0];
      |                     ^
a.cc:39:12: error: 'a' was not declared in this scope
   39 |     ans += a[1];
      |            ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define REP(i,a,b) for(int i=int(a);i<(int)b;++i)
#define Graph vector<vecctor<ll>>
#define pairs vector<pair<ll,ll>>
#define pb push_back



using namespace std;
using ll = long long;
const ll INF = 1e18;
const double PI = acos(-1);

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}



int main(void)
{
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    string s;
    cin >> s;
    string ans = s[0] + s[1] + a[2];
    cout << ans << endl;
    
    
    



    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:32: error: 'a' was not declared in this scope
   38 |     string ans = s[0] + s[1] + a[2];
      |                                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define int ll
#define fr(i,a,b) for(int i=a;i<b;i++)
#define frr(i,a,b) for(int i=b-1;i>=a;i--)
#define mod 1000000007
#define pb push_back
#define son ll t; cin>>t;while(t--)
#define fst ios_base::sync_with_stdio(false); cin.tie(NULL);
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
#define mpr make_pair
#define ff first
#define ss second
#define inf 5e18
#define dex(x,y) fixed<<setprecision(x)<<y
void start()
{
    #ifndef ONLINE_JUDGE 
    freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
    #endif
}

int32_t main()
{
    fst
//    start();
 int n,q;
  cin>>n>>q;
  char s[26];
  fr(i,0,n)
    s[i]=i+'A';
  fr(i,0,n)
  {
    fr(j,0,n-1)
    {
      cout<<"? "<<s[j]<<' '<<s[j+1]<<endl;
      char x;
      cin>>x;
      if(x=='>') swap(s[j],s[j+1]);
    }
  }
  cout<<"! ";
  fr(i,0,n)
    cout<<s[i];
      
    
}
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define int ll
#define fr(i,a,b) for(int i=a;i<b;i++)
#define frr(i,a,b) for(int i=b-1;i>=a;i--)
#define mod 1000000007
#define pb push_back
#define son ll t; cin>>t;while(t--)
#define fst ios_base::sync_with_stdio(false); cin.tie(NULL);
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
#define mpr make_pair
#define ff first
#define ss second
#define inf 5e18
#define dex(x,y) fixed<<setprecision(x)<<y
void start()
{
    #ifndef ONLINE_JUDGE 
    freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
    #endif
}

int32_t main()
{
    fst
//    start();
string s;
  cin>>s;
  cout<<s.substr(0,3)<<endl;
      
    
}


Compiler output:
a.cc:67:6: error: redefinition of 'void start()'
   67 | void start()
      |      ^~~~~
a.cc:18:6: note: 'void start()' previously defined here
   18 | void start()
      |      ^~~~~
a.cc:74:9: error: redefinition of 'int32_t main()'
   74 | int32_t main()
      |         ^~~~
a.cc:25:9: note: 'int32_t main()' previously defined here
   25 | int32_t main()
      |         ^~~~
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;
using P = pair<string,int>;
const double PI = acos(-1);

int main() {
  string s;
  cin >> s;
  cout << s.str(0,3) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'str'
   11 |   cout << s.str(0,3) << endl;
      |             ^~~
Language: Java

import java.util.*;
 
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		
		System.out.println(S.subString(0,3));
    }
}


Compiler output:
Main.java:8: error: cannot find symbol
		System.out.println(S.subString(0,3));
		                    ^
  symbol:   method subString(int,int)
  location: variable S of type String
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
char s[maxn];
int main() {
	scanf("%s",s);
	for (int i = 0; i < 3; i++)
		printf("%c",s[i]);
	puts("");
}

Compiler output:
a.cc:4:8: error: 'maxn' was not declared in this scope
    4 | char s[maxn];
      |        ^~~~
a.cc: In function 'int main()':
a.cc:6:20: error: 's' was not declared in this scope
    6 |         scanf("%s",s);
      |                    ^
Language: C++

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

int main(){
	string s; cin >>s;
    ss= s.subtr(0,3);
  	cout << ss;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'ss' was not declared in this scope; did you mean 's'?
    6 |     ss= s.subtr(0,3);
      |     ^~
      |     s
a.cc:6:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'subtr'; did you mean 'substr'?
    6 |     ss= s.subtr(0,3);
      |           ^~~~~
      |           substr
Language: C

#include<iostrem>
using namespace std;
int main()
{
  char a[20];
  cin>>a;
  char d[3];
  string g=0;
  for(int x=0; x<3; x++){
    d[x]=a[x]
  }
  g=d[0]+d[1]+d[2];
}

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

#include<algorithm>
#include<bitset>
#include<cmath>
#include<complex>
#include<deque>
#include<functional>
#include<iomanip>
#include<iostream>
#include<iterator>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<unordered_map>
#include<unordered_set>
#include<utility>
#include<vector>

using namespace std;
typedef long long ll;

// i: index, n: size, a: start, b: end
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--)

// x: container(array, vector etc..)
#define ALL(x) (x).begin(),(x).end()
#define SIZE(x) ((ll)(x).size())
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))

#define INF 1000000000000 //10^12
#define MOD 10000007 //10^9+7
#define MAXR 100000 //10^5

#define PB push_back
#define MP make_pair
#define F first
#define S second

signed main() {
  string s;
  cin >> s;
  string nickName;
  int maxStartIndex = s.length() - 3;
  srand((unsigned int)time(NULL));
  int startIndex = rand() % maxStartIndex;
  FOR(i, startIndex, startIndex + 2) {
    nickName += s[i];
  }
  cout << nickName << endl;
  return 0;
}


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

#include<bits/stdc++.h>

using namespace std;

int main(){
  string s;
  cin>>s;
  string ans=0;
  for(int i=0; i<s.length()-2; i++){
    if(s[i] != s[i+1] and s[i+1] != s[i+2] and s[i] != s[i+2]){
      ans += s[i];
      ans += s[i+1];
      ans += s[i+2];
   		break;
    }
  }
  `	if(ans.length() != 0)
    	cout<<ans<<endl;
 	else{
      cout<<s[0]<<s[1]<<s[2]<<endl;
    }
	return 0;
}

Compiler output:
a.cc:17:3: error: stray '`' in program
   17 |   `     if(ans.length() != 0)
      |   ^
Language: C

#include <stdio.h>
int main(void){
  char str;
  
  fgets(str,sizeof(str),stdin);
  
  printf("%c%c%c",str[0]);
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:9: error: passing argument 1 of 'fgets' makes pointer from integer without a cast [-Wint-conversion]
    5 |   fgets(str,sizeof(str),stdin);
      |         ^~~
      |         |
      |         char
In file included from main.c:1:
/usr/include/stdio.h:654:38: note: expected 'char * restrict' but argument is of type 'char'
  654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      |                     ~~~~~~~~~~~~~~~~~^~~
main.c:7:22: error: subscripted value is neither array nor pointer nor vector
    7 |   printf("%c%c%c",str[0]);
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main{
	string S; cin >> S;
    cout << S[0] << S[1] << S[2] << '\n';
	return 0;
}


Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:16: error: expected primary-expression before 'S'
    4 |         string S; cin >> S;
      |                ^
a.cc:4:16: error: expected '}' before 'S'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:4:19: error: 'cin' does not name a type
    4 |         string S; cin >> S;
      |                   ^~~
a.cc:5:5: error: 'cout' does not name a type
    5 |     cout << S[0] << S[1] << S[2] << '\n';
      |     ^~~~
a.cc:6:9: error: expected unqualified-id before 'return'
    6 |         return 0;
      |         ^~~~~~
a.cc:7:1: error: expected declaration before '}' token
    7 | }
      | ^
Language: Java

import java.util.*;
public class MyClass {
    public static void main(String args[]) {
      Scanner sc = new Scanner(System.in);
      String st = sc.nextLine();
      String str = st.substring(0,3);
      System.out.println(str);
    }
}

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

#include<stdio.h>
#include<stdlib.h>
int main(){
  int A,V,B,W,T;
  scanf("%d",&A);
  scanf("%d",&V);
  scanf("%d",&B);
  scanf("%d",&W);
  scanf("%d",&T);
  
  char ans[8] = abs(A-B) <= (V-W)*T ? "YES" : "NO";
  
  printf("%s",ans);
  
  return 0;

Compiler output:
main.c: In function 'main':
main.c:11:17: error: invalid initializer
   11 |   char ans[8] = abs(A-B) <= (V-W)*T ? "YES" : "NO";
      |                 ^~~
main.c:15:3: error: expected declaration or statement at end of input
   15 |   return 0;
      |   ^~~~~~
Language: C

#include<stdio.h>
#include<math.h>
int main(){
  int A,V,B,W,T;
  scanf("%d",&A);
  scanf("%d",&V);
  scanf("%d",&B);
  scanf("%d",&W);
  scanf("%d",&T);
  
  char ans[8] = abs(A-B) <= (V-W)*T ? "YES" : "NO";
  
  printf("%s",ans);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:17: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
   11 |   char ans[8] = abs(A-B) <= (V-W)*T ? "YES" : "NO";
      |                 ^~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    2 | #include<math.h>
  +++ |+#include <stdlib.h>
    3 | int main(){
main.c:11:17: error: invalid initializer
   11 |   char ans[8] = abs(A-B) <= (V-W)*T ? "YES" : "NO";
      |                 ^~~
Language: C++

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

int main(){
  string s ;
  cin >> s ;
  int a = s.size();
  
  for(int i=0;i<a-1;i++){
    if(s[i]!=s[i+1]&&s[i+1]!=s[i+2]){
      cout << s[i] << s[i+1] << s[i+2] << endl;
      break;
    }
  }


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

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

int main(){
  string s ;
  cin >> s ;
  int a = s.size();
  
  for(int i=0;i<a-1;i++){
    if(a[i]!=a[i+1]&&a[i+1]!=a[i+2]){
      cout << a[i] << a[i+1] << a[i+2] << endl;
      break;
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: invalid types 'int[int]' for array subscript
   10 |     if(a[i]!=a[i+1]&&a[i+1]!=a[i+2]){
      |         ^
a.cc:10:15: error: invalid types 'int[int]' for array subscript
   10 |     if(a[i]!=a[i+1]&&a[i+1]!=a[i+2]){
      |               ^
a.cc:10:23: error: invalid types 'int[int]' for array subscript
   10 |     if(a[i]!=a[i+1]&&a[i+1]!=a[i+2]){
      |                       ^
a.cc:10:31: error: invalid types 'int[int]' for array subscript
   10 |     if(a[i]!=a[i+1]&&a[i+1]!=a[i+2]){
      |                               ^
a.cc:11:16: error: invalid types 'int[int]' for array subscript
   11 |       cout << a[i] << a[i+1] << a[i+2] << endl;
      |                ^
a.cc:11:24: error: invalid types 'int[int]' for array subscript
   11 |       cout << a[i] << a[i+1] << a[i+2] << endl;
      |                        ^
a.cc:11:34: error: invalid types 'int[int]' for array subscript
   11 |       cout << a[i] << a[i+1] << a[i+2] << endl;
      |                                  ^
a.cc:14:4: error: expected '}' at end of input
   14 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main() {
  int A,B,C,D,E;
  cin >> A >> B >> C >> D >> E;
  if(A < 0 && C < 0){
        A *= -1;
        C *= -1;
  }
 if(A > -1 && C < 0){
        A *= -1;
        C *= -1;
  }
  if(D => B || E * (D - B) < C - A){
    cout << "NO" << endl;
  }
else{
  cout << "YES" << endl;
}
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: expected primary-expression before '>' token
   15 |   if(D => B || E * (D - B) < C - A){
      |         ^
Language: C++

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

int main() {
  int A,B,C,D,E;
  cin >> A >> B >> C >> D >> E;
  if(A < 0 && C < 0){
        A *= -1;
        C *= -1;
  }
 if(A > -1 && C < 0){
        A *= -1;
        C *= -1;
  }
  if(D > B || D = B || E * (D - B) < C - A){
    cout << "NO" << endl;
  }
else{
  cout << "YES" << endl;
}
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: lvalue required as left operand of assignment
   15 |   if(D > B || D = B || E * (D - B) < C - A){
      |      ~~~~~~^~~~
Language: C++

#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("fast-math")

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
 
#define $(x) (int)((x).size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define endl '\n'
#define x first
#define y second
#define int long long
#define double long double
#define pii pair<int, int>
#define pb push_back
#define vec vector
#define beg begin
#define dbg(x) cout << #x << " = " << x << endl;
 
template<class T> ostream& operator<<(ostream &str, vector<T> &a) {
    for (auto &i : a) {
        str << i << " ";
    }
    return str;
}
 
template<class T> istream& operator>>(istream &str, vector<T> &a) {
    for (auto &i : a) {
        str >> i;
    }
    return str;
}
 
template<class T> ostream& operator<<(ostream &str, pair<T, T> &a) {
    str << a.first << " " << a.second;
    return str;
}
 
template<class T> istream& operator>>(istream &str, pair<T, T> &a) {
    str >> a.first >> a.second;
    return str;
}
 
void solve(); signed main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
#endif
    srand(time(0));
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cout.setf(ios::fixed); cout.precision(6);
    solve();    
    return 0;
}
 
const int MOD = 998244353, MAXN = 2e5 + 10, INF = 1e18 + 10, BASE = 37; 

void solve() {
   	string s;
   	cin >> s;
   	cout << s.substr(0, 3) << endl;
}	

Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:7:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = char]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:186:14: note: called from here
  186 |       struct _Alloc_hider : allocator_type // TODO check __is_final
      |              ^~~~~~~~~~~~
Language: Java

import java.util.Scanner;
public class Main {
    public static void main(String[] args){
    Scanner Scan = new Scanner(System.in);
    String S = scan.nextLine();
    System.out.println(S.substring(0, 3));
}
}

Compiler output:
Main.java:5: error: cannot find symbol
    String S = scan.nextLine();
               ^
  symbol:   variable scan
  location: class Main
1 error
Language: Java

import java.util.Scanner;
public class Main {
    public static void main(String[] args){
    Scanner Scan = new scan.nextLine();
    String S = scan.nextLine();
    System.out.println(S.substring(0, 3));
}
}

Compiler output:
Main.java:4: error: package scan does not exist
    Scanner Scan = new scan.nextLine();
                           ^
Main.java:5: error: cannot find symbol
    String S = scan.nextLine();
               ^
  symbol:   variable scan
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
public class Main {
    Scanner Scan = new scan.nextLine();
    String S = scan.nextLine();
    System.out.println(S.substring(0, 3));
}

Compiler output:
Main.java:5: error: <identifier> expected
    System.out.println(S.substring(0, 3));
                      ^
Main.java:5: error: <identifier> expected
    System.out.println(S.substring(0, 3));
                                  ^
2 errors
Language: Java

import java.util.Scanner;
public class Main {
    Scanner Scan = scan.nextLine();
    String S = scan.nextLine();
    System.out.println(S.substring(0, 3));
}

Compiler output:
Main.java:5: error: <identifier> expected
    System.out.println(S.substring(0, 3));
                      ^
Main.java:5: error: <identifier> expected
    System.out.println(S.substring(0, 3));
                                  ^
2 errors
Language: C++

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

int main() {
  string N,N1;
  cin >> N ;
  N1=substr(0,3);
  cout << N1;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: 'substr' was not declared in this scope; did you mean 'strstr'?
    7 |   N1=substr(0,3);
      |      ^~~~~~
      |      strstr
Language: Java

import java.util.Scanner;
class Main{
    public static void main(String[] args) {
       
        Scanner scan = new Scanner(System.in);
        String a = scan.nextLine();
        System.out.plintln(a.substring(0,3));
        
        }
    }

Compiler output:
Main.java:7: error: cannot find symbol
        System.out.plintln(a.substring(0,3));
                  ^
  symbol:   method plintln(String)
  location: variable out of type PrintStream
1 error
Language: Java

import java.util.Scanner;
class Main{
    public static void main(String[] args) {
       
        Scanner scan = new Scanner(System.in);
        String a = scan.nextLine();
        String anc = substring(0,3);
        System.out.plintln(anc);
        
        }
    }

Compiler output:
Main.java:7: error: cannot find symbol
        String anc = substring(0,3);
                     ^
  symbol:   method substring(int,int)
  location: class Main
Main.java:8: error: cannot find symbol
        System.out.plintln(anc);
                  ^
  symbol:   method plintln(String)
  location: variable out of type PrintStream
2 errors
Language: Java

import java.util.Scanner;
class Main{
    public static void main(String[] args) {
       
        Scanner scan = new Scanner(System.in);
        String a = scan.nextLine();
        System.out.plintln(substring(0,3));
        
        }
    }

Compiler output:
Main.java:7: error: cannot find symbol
        System.out.plintln(substring(0,3));
                           ^
  symbol:   method substring(int,int)
  location: class Main
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  cin>>s;
  if(strlen(s)>3)
  {
    for(int i=0;i<3;i++)
    {
      cout<<s[i];
    }
    cout<<endl;
  }
  else
  {
    cout<<s<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    7 |   if(strlen(s)>3)
      |             ^
      |             |
      |             std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: Java

import java.util.Scanner;

public class Test {
public static void main(String[] args) {

  Scanner scanner = new Scanner(System.in);
  String input = scanner.nextLine();
  System.out.println(input.substring(0, 3));
              
}
}

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

import java.util.Scanner;

public class Test {
public static void main(String[] args) {

  Scanner scanner = new Scanner(System.in);
  String input = scanner.nextLine();
  System.out.println(input.substring(0, 3);
              
}
}

Compiler output:
Main.java:8: error: ')' or ',' expected
  System.out.println(input.substring(0, 3);
                                          ^
1 error
Language: Java

import java.util.Scanner;

public static void main(String[] args) {

  Scanner scanner = new Scanner(System.in);
  String input = scanner.nextLine();
  System.out.println(input.substring(0, 3);
              
}
  

Compiler output:
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
Main.java:7: error: ')' or ',' expected
  System.out.println(input.substring(0, 3);
                                          ^
2 errors
Language: C++

#inclue<iostream>

using namespace std;

int main(void)
  
{
  string s;
  int i;
  cin>>s;
  for(i = 0; i < 3; i++)cout<<s[i];
  cout<<endl;
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:8:3: error: 'string' was not declared in this scope
    8 |   string s;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #inclue<iostream>
a.cc:10:3: error: 'cin' was not declared in this scope
   10 |   cin>>s;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclue<iostream>
a.cc:10:8: error: 's' was not declared in this scope
   10 |   cin>>s;
      |        ^
a.cc:11:25: error: 'cout' was not declared in this scope
   11 |   for(i = 0; i < 3; i++)cout<<s[i];
      |                         ^~~~
a.cc:11:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:3: error: 'cout' was not declared in this scope
   12 |   cout<<endl;
      |   ^~~~
a.cc:12:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:9: error: 'endl' was not declared in this scope
   12 |   cout<<endl;
      |         ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inclue<iostream>
Language: C++

#include<bits/stdc++.h>
using nameapace std;
int main()
{
   string s;
  cin>>s;
  for(int i=0;i<3;i++)
     cout<<s[i];
  cout<<endl;
}
  

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nameapace'
    2 | using nameapace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:4: error: 'string' was not declared in this scope
    5 |    string s;
      |    ^~~~~~
a.cc:5:4: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>s;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:8: error: 's' was not declared in this scope
    6 |   cin>>s;
      |        ^
a.cc:8:6: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |      cout<<s[i];
      |      ^~~~
      |      std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   cout<<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:9:9: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   cout<<endl;
      |         ^~~~
      |         std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.*;
import java.io.*;
public class EdA {

	public static void main(String[] args) throws Exception{
		int num = 998244353;

		// TODO Auto-generated method stub
 		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
 		PrintWriter out = new PrintWriter(System.out);
 		String a  = bf.readLine();
 		out.println(a.substring(0, 3));

 		out.close();
 		
 		
 		
 	}
}
 	
 
//StringJoiner sj = new StringJoiner(" "); 
//sj.add(strings)
//sj.toString() gives string of those stuff w spaces or whatever that sequence is

 		
 		
 		
 		
	




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

#include<bits/stdc++.h>
using namespace std;
int main(){
	string s;
  	cin>>s;
  	for(int i=0;i<2i++){
    	cout<<s[i];
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
    6 |         for(int i=0;i<2i++){
      |                       ~~^~
a.cc:6:27: error: expected ';' before ')' token
    6 |         for(int i=0;i<2i++){
      |                           ^
      |                           ;
Language: C++

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

int main() {

  long long A, V, B, W, T;
  
  cin >> A >> V >> B >> W >> T;
  
  if (V > W) {
  	if (V - W) * T >= abs(A -B)) {
    cout << "YES" << endl;
    } else {
    	cout << "NO" << endl;
    }
  } else {
  	cout << "NO" << endl;
  }
  
    return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: invalid type argument of unary '*' (have 'long long int')
   11 |         if (V - W) * T >= abs(A -B)) {
      |                    ^~~
Language: C++

#include<iostream>
using namespace std;
int(main){
  string name;
  cin >> name;
  cout << name.substr(0,3) << endl;
  return 0;
}

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int(main){
      |     ^~~~
a.cc:4:10: error: expected primary-expression before 'name'
    4 |   string name;
      |          ^~~~
a.cc:4:10: error: expected '}' before 'name'
a.cc:3:10: note: to match this '{'
    3 | int(main){
      |          ^
a.cc:5:3: error: 'cin' does not name a type
    5 |   cin >> name;
      |   ^~~
a.cc:6:3: error: 'cout' does not name a type
    6 |   cout << name.substr(0,3) << endl;
      |   ^~~~
a.cc:7:3: error: expected unqualified-id before 'return'
    7 |   return 0;
      |   ^~~~~~
a.cc:8:1: error: expected declaration before '}' token
    8 | }
      | ^
Language: C++

#include(iostream)
using namespace std;
int main(){
  string name;
  cin >> name;
  cout << name.substr(0,3) << endl;
  return 0;
}

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(iostream)
      |         ^
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string name;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #include(iostream)
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> name;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include(iostream)
a.cc:5:10: error: 'name' was not declared in this scope
    5 |   cin >> name;
      |          ^~~~
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout << name.substr(0,3) << endl;
      |   ^~~~
a.cc:6:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:31: error: 'endl' was not declared in this scope
    6 |   cout << name.substr(0,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 | #include(iostream)
Language: C++

#include(iostream)
using namespace std;
int(main){
  string name;
  cin >> name;
  cout << name.substr(0,3) << endl;
  return 0;
}

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(iostream)
      |         ^
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int(main){
      |     ^~~~
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string name;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #include(iostream)
a.cc:4:10: error: expected '}' before 'name'
    4 |   string name;
      |          ^~~~
a.cc:3:10: note: to match this '{'
    3 | int(main){
      |          ^
a.cc:5:3: error: 'cin' does not name a type
    5 |   cin >> name;
      |   ^~~
a.cc:6:3: error: 'cout' does not name a type
    6 |   cout << name.substr(0,3) << endl;
      |   ^~~~
a.cc:7:3: error: expected unqualified-id before 'return'
    7 |   return 0;
      |   ^~~~~~
a.cc:8:1: error: expected declaration before '}' token
    8 | }
      | ^
Language: C

#include <stdio.h>

int main(void){
  char n[20];
  
  scanf("%s", name);
  printf("%c%c%c\n",n[0], n[1], n[2]);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:15: error: 'name' undeclared (first use in this function); did you mean 'rename'?
    6 |   scanf("%s", name);
      |               ^~~~
      |               rename
main.c:6:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <iostream>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <math.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using pint = pair<int,int>;
using vec = vector<int>;
using ll=long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }


int main() {
	int n,k;
    cin>>n>>k;
    vec a(n+1);
    rep1(i,n){
        cin>>a[i];
    }

  int MAXI=600;
	if(k>=MAXI){
		for(int i=1;i<=n;i++){
			cout<<n<<" ";
		}
		return 0;
	}

    for(int l=0; l<k; l++){
     vec b(3*n,0);
     for (int i = 1; i <=n; i++){
         if(a[i]==0){
             b[n+i] ++;
         }else{
            for (int j = 1; j <= a[i]; j++){
                b[n+i] ++;
                b[n+i+j] ++; 
                b[n+i-j] ++;
            }
    }
    }

    rep1(z, n) {cout<<a[z]<<" ";}

}


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

#include <iostream>
#include <string>
#define ll long long
using namespace std;
int main(void){
string s;
  ll A, V, B, W, T;
  cout<<((V>W && abs(A-B)=<(V-W)*T)? "Yes" : "No")<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: expected primary-expression before '<' token
    8 |   cout<<((V>W && abs(A-B)=<(V-W)*T)? "Yes" : "No")<<endl;
      |                           ^
Language: C++

#include <bits/stdc++.h>

#define PI 3.14159265359
#define rep(i,a,n) for(int i=a;i<(int)n;++i)
#define SZ(x) ((int)(x).size())	//size() unsigned -> int
#define descSort(a) sort(a.begin(),a.end(),std::greater<int>())
using namespace std;
typedef long long ll;
const ll INF = 1e9 + 7;
ll gcd(ll x,ll y){
    if(x%y==0)return y;
    return gcd(y,x%y);
}
ll LCM(int a, int b){
    return a*b/gcd(a,b);
}

int main(void)
{
    string s;
    cin>>s;
    string ans=s[0]+s[1]+s[2];
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   22 |     string ans=s[0]+s[1]+s[2];
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
#define PI 3.14159265359
#define INF 1000100100
#define MOD 1000000007
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define P pair<ll,ll>
#define PP pair<P,P>
using namespace std;

int main(){
    string s; cin >> s;
    string ans=s[0]+s[1]+s[2];
    cout << ans << endl;
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   14 |     string ans=s[0]+s[1]+s[2];
Language: C++

#include<bits/std++.h>
using namespace std;
int main(){
 	string a;
  cin >> a;
  cout << a[0] << a[1] << a[2] << endl;
}

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

#include <iostream>
#include <string>
using nameapace std;
int main(void){
string s;
  cin>>s;
  cout<<""+s[0]+s[1]+s[2]<<endl;
  return 0;
}


Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'nameapace'
    3 | using nameapace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'string' was not declared in this scope
    5 | string s;
      | ^~~~~~
a.cc:5:1: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>s;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:8: error: 's' was not declared in this scope
    6 |   cin>>s;
      |        ^
a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout<<""+s[0]+s[1]+s[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:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout<<""+s[0]+s[1]+s[2]<<endl;
      |                            ^~~~
      |                            std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <string>
using nameapace std;
int main(void){
string s;
  cin>>s;
  cout<<s[0]+s[1]+s[2]<<endl;
  return 0;
}


Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'nameapace'
    3 | using nameapace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'string' was not declared in this scope
    5 | string s;
      | ^~~~~~
a.cc:5:1: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>s;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:8: error: 's' was not declared in this scope
    6 |   cin>>s;
      |        ^
a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout<<s[0]+s[1]+s[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:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout<<s[0]+s[1]+s[2]<<endl;
      |                         ^~~~
      |                         std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <string>

int main(void){
string s;
  cin>>s;
  cout<<s[0]+s[1]+s[2]<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'string' was not declared in this scope
    5 | string s;
      | ^~~~~~
a.cc:5:1: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>s;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:8: error: 's' was not declared in this scope
    6 |   cin>>s;
      |        ^
a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout<<s[0]+s[1]+s[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:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout<<s[0]+s[1]+s[2]<<endl;
      |                         ^~~~
      |                         std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~