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

#include <bits/stdc++.h>
using namespace std;
int main(){
string n;
  cin>>n;
  char c =n
  for(int i=0;i<n.size();i++){
  if(c.at(i)=='9){
  c.at(i)=1;
  
  }
    if(c.at(i)==1){
    c.at(i)==9;
    
    }
  
  }
cout<<c<<endl;
}


Compiler output:
a.cc:8:15: warning: missing terminating ' character
    8 |   if(c.at(i)=='9){
      |               ^
a.cc:8:15: error: missing terminating ' character
    8 |   if(c.at(i)=='9){
      |               ^~~~
a.cc: In function 'int main()':
a.cc:6:11: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char' in initialization
    6 |   char c =n
      |           ^
      |           |
      |           std::string {aka std::__cxx11::basic_string<char>}
a.cc:7:15: error: 'i' was not declared in this scope
    7 |   for(int i=0;i<n.size();i++){
      |               ^
a.cc:12:10: error: request for member 'at' in 'c', which is of non-class type 'char'
   12 |     if(c.at(i)==1){
      |          ^~
a.cc:13:7: error: request for member 'at' in 'c', which is of non-class type 'char'
   13 |     c.at(i)==9;
      |       ^~
a.cc: At global scope:
a.cc:18:1: error: 'cout' does not name a type
   18 | cout<<c<<endl;
      | ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
string n;
  cin>>n;
 for(int i=0;i<3;i++){
 
   if(n.at(i)=="1"){
   n.at(i)="9";
   
   }
   if(n.at(i)=="9"){
   n.at(i)="1";
   }
 }
  
  cout<<n<<endl;
  
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |    if(n.at(i)=="1"){
      |       ~~~~~~~^~~~~
a.cc:9:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 |    n.at(i)="9";
      |            ^~~
      |            |
      |            const char*
a.cc:12:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |    if(n.at(i)=="9"){
      |       ~~~~~~~^~~~~
a.cc:13:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   13 |    n.at(i)="1";
      |            ^~~
      |            |
      |            const char*
Language: C++

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

int main(){
    int n;
    cin >> n;
    for(int i=0;i<3;i++){
        if(n.at(i)==1){
            n.at(i)=9;
        }
        else if(n.at(i)==9){
            n.at(i)=1;
        }
    }
    cout << n << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: request for member 'at' in 'n', which is of non-class type 'int'
   11 |         if(n.at(i)==1){
      |              ^~
a.cc:12:15: error: request for member 'at' in 'n', which is of non-class type 'int'
   12 |             n.at(i)=9;
      |               ^~
a.cc:14:19: error: request for member 'at' in 'n', which is of non-class type 'int'
   14 |         else if(n.at(i)==9){
      |                   ^~
a.cc:15:15: error: request for member 'at' in 'n', which is of non-class type 'int'
   15 |             n.at(i)=1;
      |               ^~
Language: C++

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

int main() {
	string s;
	cin >> s;
	rep(i, s.size) {
		if (s[i] == '1') {
			s[i] = '9';
		}
		else if (s[i] == '9') {
			s[i] = '1';
		}
	}
	cout << s << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   13 |         rep(i, s.size) {
      |                  ^
a.cc:6:39: note: in definition of macro 'rep'
    6 | #define rep(i,n) for (int i = 0; i < (n); ++i)
      |                                       ^
Language: C++

#include<iostream>
using namespace std;

int main{
int n;cin>>n;
  cout<<1100-n<<endl;
  
  return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
int n;
  cin>>n;
     vector<int> A(2);
A[2]=n/100;
  A[1]=n/10%10;
  A[0]=n%100%10;
for (int i = 0; i < 3; i++) {
 if(A[i]==1){
   A[i]=9
 }
  else{
    A[i]=1
  }
  
}

  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: expected ';' before '}' token
   13 |    A[i]=9
      |          ^
      |          ;
   14 |  }
      |  ~        
a.cc:16:11: error: expected ';' before '}' token
   16 |     A[i]=1
      |           ^
      |           ;
   17 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
int n;
  cin >> n;
  
for (int i = 0; i < 3; i++) {
 if(n.at(i)==1){
   n.at(i)=9;
 }
  else{
    n.at(i)=1;
  }
}
 
  cout <<n<<endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: request for member 'at' in 'n', which is of non-class type 'int'
    9 |  if(n.at(i)==1){
      |       ^~
a.cc:10:6: error: request for member 'at' in 'n', which is of non-class type 'int'
   10 |    n.at(i)=9;
      |      ^~
a.cc:13:7: error: request for member 'at' in 'n', which is of non-class type 'int'
   13 |     n.at(i)=1;
      |       ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
int n;
  cin >> n;
  
for (int i = 0; i < 3; i++) {
 if(n.at(i)==1){
   n.at(i)=9
 }
  else{
    n.at(i)=1
  }
}

  cout <<n<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: request for member 'at' in 'n', which is of non-class type 'int'
    9 |  if(n.at(i)==1){
      |       ^~
a.cc:10:6: error: request for member 'at' in 'n', which is of non-class type 'int'
   10 |    n.at(i)=9
      |      ^~
a.cc:13:7: error: request for member 'at' in 'n', which is of non-class type 'int'
   13 |     n.at(i)=1
      |       ^~
Language: C++

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

int main(){
  string s;
  cin>>s;
  for(char c:n){
    if(c=='1'){
      cout<<9;
    }
    else if(c=='9'){
      cout<<1;
    }
  }
  cout<<s<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'n' was not declared in this scope
    7 |   for(char c:n){
      |              ^
Language: C++

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

int main(){
  char s;
  cin>>s;
  for(int i=0;i<s.size();i++){
    if(s[i]==1){
      s[i]="9";
    }
    else if(s[i]==9){
      s[i]="1";
    }
  }
  cout<<s<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: request for member 'size' in 's', which is of non-class type 'char'
    7 |   for(int i=0;i<s.size();i++){
      |                   ^~~~
a.cc:8:9: error: invalid types 'char[int]' for array subscript
    8 |     if(s[i]==1){
      |         ^
a.cc:9:8: error: invalid types 'char[int]' for array subscript
    9 |       s[i]="9";
      |        ^
a.cc:11:14: error: invalid types 'char[int]' for array subscript
   11 |     else if(s[i]==9){
      |              ^
a.cc:12:8: error: invalid types 'char[int]' for array subscript
   12 |       s[i]="1";
      |        ^
Language: C++

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

int main(){
  string s;
  cin>>s;
  for(int i=0;i<s.size();i++){
    if(s[i]==1){
      s[i]="9";
    }
    else if(s[i]==9){
      s[i]="1";
    }
  }
  cout<<s<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 |       s[i]="9";
      |            ^~~
      |            |
      |            const char*
a.cc:12:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   12 |       s[i]="1";
      |            ^~~
      |            |
      |            const char*
Language: C++

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

int main(){
  string s;
  cin>>s;
  for(int i=0;i<s.size();i++){
    if(s[i]==1){
      "1"="9";
    }
    else if(s[i]==9){
      "9"="1";
    }
  }
  cout<<s<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: assignment of read-only location '"1"'
    9 |       "1"="9";
      |       ~~~^~~~
a.cc:12:10: error: assignment of read-only location '"9"'
   12 |       "9"="1";
      |       ~~~^~~~
Language: C++

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

int main(){
  string s;
  cin>>s;
  for(int i=0;i<s.size();i++){
    if(s[i]==1){
      "1"=="9";
    }
    else if(s[i]==9){
      "9"=="1";
    }
  }
  cout<<s<,endl;
}


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

#include <stdio.h>
int main(){
    char s[4];
    scanf("%s", &s);
    for(int i = 0; i < 3; i++) {
        if (s[i] == '1')
            s[i] = '9';
        }else if(s[i] == '9'){
            s[i] = '1';
    }
    printf("%s", s);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:10: error: 'else' without a previous 'if'
    8 |         }else if(s[i] == '9'){
      |          ^~~~
main.c:8:20: error: 'i' undeclared (first use in this function)
    8 |         }else if(s[i] == '9'){
      |                    ^
main.c:8:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

// 失敗するからこそ そこから立ち向かって行く強さがあってそんな強さが本当の強さだと私は思うから
// ぜったいあきらめない
#if defined(DAIJOBU)
#include "/home/ichigo/includes.hpp"
#include "PP.hpp"
#define deb(x...) cerr << "[" << #x << "] = " << x << "\n";
#else
#include <bits/stdc++.h>
#define deb(x...)
#endif
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define ford(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)

using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpi;
typedef vector<vi> vvi;
typedef long long lint;
typedef vector<lint> vlint;
typedef vector<vlint> vvlint;
typedef pair<lint, lint> plint;
typedef double ld;

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

int main() {
    ios::sync_with_stdio(false);
	cin.tie(0);
	
	string s;
	cin >> s;
	forn(i, s.size())if(s[i] == '1'){s[i] == '9';else if(s[i] == '9')s[i] = '1';}
	cout << s << '\n';
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:45:54: error: expected '}' before 'else'
   45 |         forn(i, s.size())if(s[i] == '1'){s[i] == '9';else if(s[i] == '9')s[i] = '1';}
      |                                         ~            ^~~~
a.cc: At global scope:
a.cc:46:9: error: 'cout' does not name a type
   46 |         cout << s << '\n';
      |         ^~~~
a.cc:47:9: error: expected unqualified-id before 'return'
   47 |         return 0;
      |         ^~~~~~
a.cc:48:1: error: expected declaration before '}' token
   48 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll= long long;
using vi= vector<int>;
using vvi= vector<vi>;
using vd= vector<double>;
using vvd= vector<vd>;
using vc= vector<char>;
using vs= vector<string>;
using vb= vector<bool>;
using vl= vector<ll>;
#define rep(i,x,n) for(int i=x; i<n; i++)
#define all(x) x.begin(), x.end()

int main(){
  char a;
  rep(i,0,3){
    cin >> a;
    if(a=="1"){
      cout << "9";
    }else{
      cout << "1";
    }
  }
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |     if(a=="1"){
      |        ~^~~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 1e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main()
{

string n ; 
cin >> n;

for (char c:n) {
    if (c==1){
        cout << 9;
    }
        else {
            cout 1;
        }
    
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:17: error: expected ';' before numeric constant
   20 |             cout 1;
      |                 ^~
      |                 ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main(){
  int N;
  cin>>N;
  for(int i=0;i<3;i++){
    if(N.at(i)==1)N.at(i)=9;
    else if(N.at(i)==9)N.at(i)=1;
  }
  cout<<N<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: request for member 'at' in 'N', which is of non-class type 'int'
    8 |     if(N.at(i)==1)N.at(i)=9;
      |          ^~
a.cc:8:21: error: request for member 'at' in 'N', which is of non-class type 'int'
    8 |     if(N.at(i)==1)N.at(i)=9;
      |                     ^~
a.cc:9:15: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |     else if(N.at(i)==9)N.at(i)=1;
      |               ^~
a.cc:9:26: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |     else if(N.at(i)==9)N.at(i)=1;
      |                          ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main(){
  int N;
  cin>>N;
  for(int i=0;i<3;i++){
    if(N.at(i)==1)N.at(i)=9;
    else if(N.at(i)==9)N.at(i)==1;
  }
  cout<<N<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: request for member 'at' in 'N', which is of non-class type 'int'
    8 |     if(N.at(i)==1)N.at(i)=9;
      |          ^~
a.cc:8:21: error: request for member 'at' in 'N', which is of non-class type 'int'
    8 |     if(N.at(i)==1)N.at(i)=9;
      |                     ^~
a.cc:9:15: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |     else if(N.at(i)==9)N.at(i)==1;
      |               ^~
a.cc:9:26: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |     else if(N.at(i)==9)N.at(i)==1;
      |                          ^~
Language: C++

#include <iostream>

using namespace std;

int main(){
    char n;
    cin >> n;
    for(int i = 0; i < 3; i++){
        if(c == '1'){
            cout << 9;
        }
        else{
            cout << 1;
        }
    }
    cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'c' was not declared in this scope
    9 |         if(c == '1'){
      |            ^
Language: C++

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

int main(){

string N;
cin>>N;
int i;

for(i=0;i<3;i++){
if(N.at(i)==1){i=9;}
else if(N.at(i)==9){i=1}}

cout<<N<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: expected ';' before '}' token
   12 | else if(N.at(i)==9){i=1}}
      |                        ^
      |                        ;
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <math.h>
#include <cstdint>
#include <vector>

using namespace std;
typedef long long ll;

ll ans, mx, mn = 1e8, sum, cnt;
int main(){
	string s;
	cin>>s;
	for(int i=0; i<n; i++){
		if(s[i]=='1') cout<<9;
		else if(s[i]=='9') cout<<1;
	}
}


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

#include <bits/stdc++.h>

using namespace std;

int main()
{
  int n;
  scanf("%d",&n);
  vector<int > v;
  while(n!=0)
  {
    if(n%10==1) 
       v.push_back(9);
    
    else if(n%10==9)
        v.push_back(1);
    
    else
       v.push_back(n%10);
  }
  
  int i,s=v.size();
  for(i=s-1;i>=0;--1)
       printf("%d",v[i]);
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:20: error: lvalue required as decrement operand
   23 |   for(i=s-1;i>=0;--1)
      |                    ^
Language: C++

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

int main() {
  string n;
  getline(cin,n);
  for(int i=0;i<3;i++){
    if(n.at(i) == '1'){
      n.at(i) = '9';
    }
    else{
      n.at(i) = '1';
    }
}


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

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

int main() {
    string S;
    cin >>S;
    for(int i=0;i<M;i++){
        if(S.at(i)=='1')S.at(i)='9';
        else S.at(i)='1';
    }
    cout <<S<<endl;
}

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

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

int main()
{
    string s;
    cin >> a;
    int len = a.length();
    for (int i = 0;i < len;i++)
    {
        if (a[i] == '1')
            cout << "9";
        else if (a[i] == '9')
            cout << "1";
        else
            cout << a[i];
    }
    cout << endl;
}

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

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

int main()
{
    string s;
    cin >> s;
    int len = s.length();
    for (int i = 0;i < len;i++)
    {
        if (a[i] == '1')
            cout << "9";
        else if (a[i] == '9')
            cout << "1";
        else
            cout << a[i];
    }
    cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'a' was not declared in this scope
   13 |         if (a[i] == '1')
      |             ^
Language: C++

#include <iostream>
#include <iomanip>
#include <utility>
#include <cmath>
#include <random>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <algorithm>
using namespace std;

#define rep(i,n) for(int i = 0; i<n; ++i)
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
typedef long long ll;

int main(){
    string  n; cin >> n;
    rep(i,3){
        cout << ((n[i] == '1') ? 9 : 1)
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:40: error: expected ';' before '}' token
   23 |         cout << ((n[i] == '1') ? 9 : 1)
      |                                        ^
      |                                        ;
   24 |     }
      |     ~
Language: Java

mport java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();

		System.out.println(1110 - n);
	}
}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
Language: C++

#include<iostream>
int main(){int n;std::cin>>n;std::cout<<1110-n<<endl;}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:49: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    2 | int main(){int n;std::cin>>n;std::cout<<1110-n<<endl;}
      |                                                 ^~~~
      |                                                 std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>int main(){int n;std::cin>>n;std::cout<<1110-n<<endl;}

Compiler output:
a.cc:1:23: warning: extra tokens at end of #include directive
    1 | #include<iostream>int main(){int n;std::cin>>n;std::cout<<1110-n<<endl;}
      |                       ^~~~
a.cc:1:9: fatal error: iostream>in: No such file or directory
    1 | #include<iostream>int main(){int n;std::cin>>n;std::cout<<1110-n<<endl;}
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

int main(){int n;std::cin>>n;std::cout<<1110-n<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:1:23: error: 'cin' is not a member of 'std'
    1 | int main(){int n;std::cin>>n;std::cout<<1110-n<<endl;}
      |                       ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main(){int n;std::cin>>n;std::cout<<1110-n<<endl;}
a.cc:1:35: error: 'cout' is not a member of 'std'
    1 | int main(){int n;std::cin>>n;std::cout<<1110-n<<endl;}
      |                                   ^~~~
a.cc:1:35: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:1:49: error: 'endl' was not declared in this scope
    1 | int main(){int n;std::cin>>n;std::cout<<1110-n<<endl;}
      |                                                 ^~~~
Language: C++

//C
//#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>


#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>

//Hang in there!

using namespace std;


int main() {
	vector<char>data(3);
	for (int i = 0; i < 3; i++) {
		cin >> data[i];
		if (data[i] == '1') {
			cout << 9;
		}
		else if (data[i] == '9') {
			cout << 1;
		}
		else {
			cout << data[i];
		}
	}
	coutj << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:104:9: error: 'coutj' was not declared in this scope
  104 |         coutj << endl;
      |         ^~~~~
Language: C++

#include<iostream>

int main(void){

  std::string s;
  std::cin>>s;
  
  std::map<char,int> m;
  m['1']=9;
    m['9']=1;
  
  for(auto c:s){
  	std::cout << m[c] << std::endl;
  }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'map' is not a member of 'std'
    8 |   std::map<char,int> m;
      |        ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    1 | #include<iostream>
  +++ |+#include <map>
    2 | 
a.cc:8:12: error: expected primary-expression before 'char'
    8 |   std::map<char,int> m;
      |            ^~~~
a.cc:9:3: error: 'm' was not declared in this scope
    9 |   m['1']=9;
      |   ^
Language: C++

#import<iostream>
int a(char x){std::cout<<(x=='1'?9:1);}main(){char c[3];std::cin>>c;for(int i=0;i<n;i++)a(c[i]);}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<iostream>
      |  ^~~~~~
a.cc: In function 'int a(char)':
a.cc:2:39: warning: no return statement in function returning non-void [-Wreturn-type]
    2 | int a(char x){std::cout<<(x=='1'?9:1);}main(){char c[3];std::cin>>c;for(int i=0;i<n;i++)a(c[i]);}
      |                                       ^
a.cc: At global scope:
a.cc:2:40: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | int a(char x){std::cout<<(x=='1'?9:1);}main(){char c[3];std::cin>>c;for(int i=0;i<n;i++)a(c[i]);}
      |                                        ^~~~
a.cc: In function 'int main()':
a.cc:2:83: error: 'n' was not declared in this scope
    2 | int a(char x){std::cout<<(x=='1'?9:1);}main(){char c[3];std::cin>>c;for(int i=0;i<n;i++)a(c[i]);}
      |                                                                                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
char a(x){
if(x=='1')cout<<'9';
else cout<<'1';
}
int main(){
  char c[3]; cin>>c; 
  rep(i,3)a(c[i]);
}

Compiler output:
a.cc:4:8: error: 'x' was not declared in this scope
    4 | char a(x){
      |        ^
a.cc: In function 'int main()':
a.cc:10:12: error: 'a' cannot be used as a function
   10 |   rep(i,3)a(c[i]);
      |           ~^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(void)
{
  char num[3];
  for(int i=0;i<3;i++){
    cin >> num[i];
  }
  
  for(int i=0;i<3;i++){
    if(num[i]=='1'){
      num[i] = '9';
    }
    else{
      num[i] = '1';
    }
    cout << num[i]
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: expected ';' before '}' token
   17 |     cout << num[i]
      |                   ^
      |                   ;
   18 |   }
      |   ~
Language: C++

#include<iostream>
using namespace std;
int main(void)
{
  char num[3];
  for(int i=0,i<3,i++){
    cin >> num[i];
  }
  
  for(int i=0;i<3;i++){
    if(num[i]=='1'){
      num[i] = '9';
    }
    else{
      num[i] = '1';
    }
    cout << num[i]
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected ';' before '<' token
    6 |   for(int i=0,i<3,i++){
      |                ^
      |                ;
a.cc:6:16: error: expected primary-expression before '<' token
a.cc:6:22: error: expected ';' before ')' token
    6 |   for(int i=0,i<3,i++){
      |                      ^
      |                      ;
a.cc:17:19: error: expected ';' before '}' token
   17 |     cout << num[i]
      |                   ^
      |                   ;
   18 |   }
      |   ~
Language: C++

#include<iostream>
using namespace std;
int main(void)
{
  char num[3];
  for(int i=0,i<3,i++){
    cin >> num[i];
  }
  
  for(int i=0;i<3;i++){
    num[i] = num[i]=='1'?'9':'1';
    cout << num[i]
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected ';' before '<' token
    6 |   for(int i=0,i<3,i++){
      |                ^
      |                ;
a.cc:6:16: error: expected primary-expression before '<' token
a.cc:6:22: error: expected ';' before ')' token
    6 |   for(int i=0,i<3,i++){
      |                      ^
      |                      ;
a.cc:12:19: error: expected ';' before '}' token
   12 |     cout << num[i]
      |                   ^
      |                   ;
   13 |   }
      |   ~
Language: C++

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

void chng(int x) {
  if (x==1) x=9;
  if (x==9) x=1;
}

int main() {

  int n;
  cin >> n;
  
  for (int i=0; i<3; i++) {
    chng(vec.at(i));
  }
  
  cout << n << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: 'vec' was not declared in this scope
   15 |     chng(vec.at(i));
      |          ^~~
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		scan.close();

		String str=String.valueOf(n);

		for(int i=0;i<str.length();i++) {
			int x=Character.getNumericValue(str.charAt(i));
			System.out.print((x==1)? "9" : ((x==9)? "1":x));
		}
		System.out.println();

Compiler output:
Main.java:16: error: reached end of file while parsing
		System.out.println();
		                     ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using db = double;
using ld = long double;
template<typename T> using V = vector<T>;
template<typename T> using VV = vector<vector<T>>;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define eb emplace_back
#define all(v) (v).begin(),(v).end()
#define siz(v) (ll)(v).size()
#define rep(i,a,n) for(ll i=a;i<(ll)(n);++i)
#define repr(i,a,n) for(ll i=n-1;(ll)a<=i;--i)
#define lb lower_bound
#define ub upper_bound
#define ENDL '\n'
typedef pair<int,int> Pi;
typedef pair<ll,ll> PL;
const ll mod = 1000000007;
const ll INF = 1000000099;
const ll LINF = (ll)(1e18 +99);
const vector<ll> dx={-1,1,0,0},dy={0,0,-1,1};
template<typename T,typename U> inline bool chmin(T& t, const U& u){if(t>u){t=u;return 1}return 0;}
template<typename T,typename U> inline bool chmax(T& t, const U& u){if(t<u){t=u;return 1;}return 0;}
template<typename T> inline T gcd(T a,T b){return b?gcd(b,a%b):a;}
template<typename T> inline T mpow(T a, T n) {
  T res = 1;
  for(;n;n>>=1) {
    if (n & 1) res = res * a;
    a = a * a;
  }
  return res;
}
 
 
 
signed main(){
  cin.tie(0);ios::sync_with_stdio(false);
  cout<<fixed<<setprecision(20);
  string s;cin>>s;
  rep(i,0,siz(s)){
    if(s[i]=='1')s[i]='9';
    if(s[i]=='9')s[i]='1';
  }
  cout<<s<<ENDL;
}

Compiler output:
a.cc: In function 'bool chmin(T&, const U&)':
a.cc:27:89: error: expected ';' before '}' token
   27 | template<typename T,typename U> inline bool chmin(T& t, const U& u){if(t>u){t=u;return 1}return 0;}
      |                                                                                         ^
      |                                                                                         ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using db = double;
using ld = long double;
template<typename T> using V = vector<T>;
template<typename T> using VV = vector<vector<T>>;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define eb emplace_back
#define all(v) (v).begin(),(v).end()
#define siz(v) (ll)(v).size()
#define rep(i,a,n) for(ll i=a;i<(ll)(n);++i)
#define repr(i,a,n) for(ll i=n-1;(ll)a<=i;--i)
#define lb lower_bound
#define ub upper_bound
#define ENDL '\n'
typedef pair<int,int> Pi;
typedef pair<ll,ll> PL;
const ll mod = 1000000007;
const ll INF = 1000000099;
const ll LINF = (ll)(1e18 +99);
const vector<ll> dx={-1,1,0,0},dy={0,0,-1,1};
template<typename T,typename U> inline bool chmin(T& t, const U& u){if(t>u){t=u;return 1＝;}return 0;}
template<typename T,typename U> inline bool chmax(T& t, const U& u){if(t<u){t=u;return 1;}return 0;}
template<typename T> inline T gcd(T a,T b){return b?gcd(b,a%b):a;}
template<typename T> inline T mpow(T a, T n) {
  T res = 1;
  for(;n;n>>=1) {
    if (n & 1) res = res * a;
    a = a * a;
  }
  return res;
}
 
 
 
signed main(){
  cin.tie(0);ios::sync_with_stdio(false);
  cout<<fixed<<setprecision(20);
  string s;cin>>s;
  rep(i,0,siz(s)){
    if(s[i]=='1')s[i]='9';
    if(s[i]=='9')s[i]='1';
  }
  cout<<s<<ENDL;
}

Compiler output:
a.cc: In function 'bool chmin(T&, const U&)':
a.cc:27:88: error: unable to find numeric literal operator 'operator""\U0000ff1d'
   27 | template<typename T,typename U> inline bool chmin(T& t, const U& u){if(t>u){t=u;return 1＝;}return 0;}
      |                                                                                        ^~~
Language: C++

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

int main() {
  int n;
  cin>>n;
  for(int i=0; i<3, i++){
    if(i=='1')
      i=='9';
    else if(i=='9')
      i=='1';
  }
  cout<<a<<endl;
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: expected ';' before ')' token
    7 |   for(int i=0; i<3, i++){
      |                        ^
      |                        ;
a.cc:13:9: error: 'a' was not declared in this scope
   13 |   cout<<a<<endl;
      |         ^
Language: C++

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

int main() {
  int a;
  cin>>a;
  if(a[1]==9)
    a[1]==1;
  if(a[1]==1)
    a[1]==9;
  if(a[2]==9)
    a[2]==1;
  if(a[2]==1)
    a[2]==9;
  if(a[3]==9)
    a[3]==1;
  if(a[3]==1)
    a[3]==9;
  cout<<a<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: invalid types 'int[int]' for array subscript
    7 |   if(a[1]==9)
      |       ^
a.cc:8:6: error: invalid types 'int[int]' for array subscript
    8 |     a[1]==1;
      |      ^
a.cc:9:7: error: invalid types 'int[int]' for array subscript
    9 |   if(a[1]==1)
      |       ^
a.cc:10:6: error: invalid types 'int[int]' for array subscript
   10 |     a[1]==9;
      |      ^
a.cc:11:7: error: invalid types 'int[int]' for array subscript
   11 |   if(a[2]==9)
      |       ^
a.cc:12:6: error: invalid types 'int[int]' for array subscript
   12 |     a[2]==1;
      |      ^
a.cc:13:7: error: invalid types 'int[int]' for array subscript
   13 |   if(a[2]==1)
      |       ^
a.cc:14:6: error: invalid types 'int[int]' for array subscript
   14 |     a[2]==9;
      |      ^
a.cc:15:7: error: invalid types 'int[int]' for array subscript
   15 |   if(a[3]==9)
      |       ^
a.cc:16:6: error: invalid types 'int[int]' for array subscript
   16 |     a[3]==1;
      |      ^
a.cc:17:7: error: invalid types 'int[int]' for array subscript
   17 |   if(a[3]==1)
      |       ^
a.cc:18:6: error: invalid types 'int[int]' for array subscript
   18 |     a[3]==9;
      |      ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: invalid types 'int[int]' for array subscript
    6 | if(s[i]=='1') s[i]='9';
      |     ^
a.cc:6:16: error: invalid types 'int[int]' for array subscript
    6 | if(s[i]=='1') s[i]='9';
      |                ^
a.cc:7:10: error: invalid types 'int[int]' for array subscript
    7 | else if(s[i]=='9') s[i]='1';
      |          ^
a.cc:7:21: error: invalid types 'int[int]' for array subscript
    7 | else if(s[i]=='9') s[i]='1';
      |                     ^
Language: C++

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

int main(){
    int n,v,ans;
    cin >> n;
    map<int, int> V0,V1;
    pair<int, int> v1top = make_pair(-1, 0),v1sec = make_pair(-1, 0), v0top = make_pair(-1, 0), v0sec = make_pair(-1, 0);

    
    for(int i=0;i<n;i++){
        cin >> v;
        if(i%2){
            V1[v]++;
        }else{
            V0[v]++;
        }
    }

    for(auto iter = V0.begin();iter!=V0.end();iter++){
        if(v0top.second < iter->second){
            v0top.first = iter->first;
            v0top.second = iter->second;
        }else if(v0sec.second < iter->second){
            v0sec.first = iter->first;
            v0sec.second = iter->second;
        }
    }
  
    for(auto iter = V1.begin();iter!=V1.end();iter++){
        if(v1top.second < iter->second){
            v1top.first = iter->first;
            v1top.second = iter->second;
        }else if(v0sec.second < iter->second){
            v1sec.first = iter->first;
            v1sec.second = iter->second;
        }
    }
  
    if(v0top.first==v1top.first){
        if(v0top.second == v1top.second){
            if(v0sec.second < v1sec.second){
            ans = n-v0top.secon-v1sec.second;
            }else{
            ans = n-v0sec.second-v1top.second;
            }
        }else if(v0top.second > v1top.second){
            ans = n-v0top.second-v1sec.second;
        }else{
            ans = n-v0sec.second-v1top.second;
        }
    }else{
        ans = n-v0top.second-v1top.second;
    }
    cout << ans << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:43:27: error: 'struct std::pair<int, int>' has no member named 'secon'; did you mean 'second'?
   43 |             ans = n-v0top.secon-v1sec.second;
      |                           ^~~~~
      |                           second
Language: C++

#include<iostream>
using namespace std;

int main(){
    string s;
    cin >> s;

    for(int i = 0; i < 3; i++){
        if(s.at(i) == '1'){
            s.at(i) = '9'
        }else{
            s.at(i) = '1'
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: expected ';' before '}' token
   10 |             s.at(i) = '9'
      |                          ^
      |                          ;
   11 |         }else{
      |         ~                 
a.cc:12:26: error: expected ';' before '}' token
   12 |             s.at(i) = '1'
      |                          ^
      |                          ;
   13 |         }
      |         ~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    7 |   for(i=0;i<s.length;i++){
      |             ~~^~~~~~
      |                     ()
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: request for member 'length' in 's', which is of non-class type 'int'
    7 |   for(i=0;i<s.length;i++){
      |               ^~~~~~
a.cc:8:9: error: invalid types 'int[int]' for array subscript
    8 |     if(s[i]=='1')
      |         ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
  string n; cin >> n;
  for(int i=0;i<3;i++){
    if(s[i]==1){
      s[i]=9;
    }
    else if(s[i]==9){
      s[i]=1;
    }
  }
  cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 's' was not declared in this scope
    8 |     if(s[i]==1){
      |        ^
a.cc:15:11: error: 's' was not declared in this scope
   15 |   cout << s << endl;
      |           ^
Language: C++

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

int main() {
  string a;
  cin>>a;
  for(int i=0;i<3;i++){
    if(a.at(i)=='1'){
      a.at(i)='9';
    }
    else{
      a.at(i)='1';
    }
    cout<<a<<endl;
}

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

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    String n=new Scanner(System.in).nextInt();
    char[] c=n.toCharArray();
    for(int i=0;i<3;i++){
      switch(c[i]){
        case '1':
          c[i]='9';
          break;
        case '9':
          c[i]='1';
          break;
      }
    }
    System.out.println(String.valueOf(c));
  }
}

Compiler output:
Main.java:5: error: incompatible types: int cannot be converted to String
    String n=new Scanner(System.in).nextInt();
                                           ^
1 error
Language: C++

#include<iostream>
using namespace std;
int main(){
  string n;
  cin >> n;
  for(int i=0; i<3; i++){
    if(n[0]=='1') n[0] = "9";
    else n[0] = "1";
  }
  cout << n << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    7 |     if(n[0]=='1') n[0] = "9";
      |                          ^~~
      |                          |
      |                          const char*
a.cc:8:17: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    8 |     else n[0] = "1";
      |                 ^~~
      |                 |
      |                 const char*
Language: C++

#include<iostream>
using namespace std;
int main(){
  string n;
  cin >> n;
  for(int i=0; i<3; i++){
    if(n[0]=="1") n[0] = "9";
    else n[0] = "1";
  }
  cout << n << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |     if(n[0]=="1") n[0] = "9";
a.cc:7:26: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    7 |     if(n[0]=="1") n[0] = "9";
      |                          ^~~
      |                          |
      |                          const char*
a.cc:8:17: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    8 |     else n[0] = "1";
      |                 ^~~
      |                 |
      |                 const char*
Language: C++

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

int main(void){
  string n;cin >> n;
  rep(i,3){
    if(s[i] == '1')cout << 9;
    else cout << 1;
  }
  cout << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 's' was not declared in this scope
    8 |     if(s[i] == '1')cout << 9;
      |        ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string.h>
#include <iomanip>
#include <map>
#include <cstdlib>
using namespace std;
int main()
{
    string n;
    cin >> n;
    for (char c : n)
    {
        if (c == ’1’)
        {
            cout << 9;
        }
        else
        {
            cout << 1;
        }
    }
    retur

        return 0;
}

Compiler output:
a.cc:15:18: error: extended character ’ is not valid in an identifier
   15 |         if (c == ’1’)
      |                  ^
a.cc:15:18: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:15:18: error: '\U000020191\U00002019' was not declared in this scope
   15 |         if (c == ’1’)
      |                  ^~~
a.cc:24:5: error: 'retur' was not declared in this scope
   24 |     retur
      |     ^~~~~
Language: C++


#include <iostream>
#include <vector>
#include <algorithm>
#include <string.h>
#include <iomanip>
#include <map>
#include <cstdlib>
using namespace std;
int main()
{
    string n;
    cin >> n;
    for (auto c : n)
    {
        if (c == ’1’)
        {
            cout << 9;
        }
        else
        {
            cout << 1;
        }
    }
    retur

        return 0;
}

Compiler output:
a.cc:16:18: error: extended character ’ is not valid in an identifier
   16 |         if (c == ’1’)
      |                  ^
a.cc:16:18: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:16:18: error: '\U000020191\U00002019' was not declared in this scope
   16 |         if (c == ’1’)
      |                  ^~~
a.cc:25:5: error: 'retur' was not declared in this scope
   25 |     retur
      |     ^~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string.h>
#include <iomanip>
#include <map>
#include <cstdlib>
using namespace std;
int main()
{
    string s;
    cin >> s;
    if (s[0] == 1)
    {
        s[0] = 9;
    }
    else if (s[0] == 9)
    {
        s[0] = 1;
    }
    if (s[1] == 1)
    {
        s[] = 9;
    }
    else if (s[1] == 9)
    {
        s[1] = 1;
    }
    if (s[2] == 1)
    {
        s[2] = 9;
    }

    else if (s[2] == 9)
    {
        s[2] = 1;
    }
    cout << s << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:11: error: expected primary-expression before ']' token
   23 |         s[] = 9;
      |           ^
Language: C++

#include <iostream>
main(){char s[3];cin>>s;for(int i=0;i<3;i++)printf("%c",(s[i]^'9')?'9':'1');}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){char s[3];cin>>s;for(int i=0;i<3;i++)printf("%c",(s[i]^'9')?'9':'1');}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:18: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    2 | main(){char s[3];cin>>s;for(int i=0;i<3;i++)printf("%c",(s[i]^'9')?'9':'1');}
      |                  ^~~
      |                  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
      |                  ^~~
Language: C++

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

int main() {
  string N;
  cin >>N;
  for(int i=0;i<3;i++){
    if(N.at(i)==1){
      N.at(i)='9';
    }
    else{
      N.at(i)='1'
    }
  }
  cout <<N <<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: expected ';' before '}' token
   12 |       N.at(i)='1'
      |                  ^
      |                  ;
   13 |     }
      |     ~
Language: C++

using namespace std;

int main(int argc,char* argv[]){
  int n,a,b,c;
  cin >> n;
  a = n%10;
  n /= 10;
  b = n%10;
  c = n/10;
  if(c == 1) n = 900;
  else n = 100;
  if( b == 1) n += 90;
  else n += 10;
  if( a == 1) n += 9;
  else n += 1;
  cout << n << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout << n << endl;
      |   ^~~~
a.cc:16:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:16: error: 'endl' was not declared in this scope
   16 |   cout << n << endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include<iostream>
#include<string>
#include<algorithm>	
#include<cmath>
using namespace std;
int main() {
	int n; cin >> n;
	if(n / 100 == 1){
       cout << 9;
    }
    else{
       cout << 1;
    }
    if(n % 100 / 10 == 1){
       cout << 9;
    }
  	else{
    cout<<1;
  	}
    if(n % 10 == 1){
       cout<<9<<endl;
    }
  	else{
      cout<<1<<endl;
	cin >> n;
}

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