Language: C++

F#include <bits/stdc++.h>
 
using namespace std;
#define ll long long
#define ld long double
 
#define endl '\n'
#define FAST                      \
    ios_base::sync_with_stdio(0); \
    cin.tie(0);                   \
    cout.tie(0);
const ll mod = 1000000007;
const double PI = 3.141592653589793238463;
const int MAXN = 1e5 + 5;

int main() {
int n,m;
cin>>n>>m;
map<int,set<int>>mm;
for(int i=0;i<m;i++)
{
    int a,b;
    cin>>a>>b;
    mm[a].insert(b);
}
if(n==1 && m==1 && (mm.begin())->first==1 && *((mm.begin())->second.begin())==0)
return cout<<0,0;
else if(n==1 && m==0)
return  cout<<0,0;
for(auto i=mm.begin();i!=mm.end();i++)
{
    set<int>v=i->second;
    if(v.size()>1 || (*v.begin()==0 && i->first==1))
    return cout<<-1,0;
}
int arr[n+1];
memset(arr,0,sizeof arr);
for(auto i=mm.begin();i!=mm.end();i++)
{
    set<int>v=i->second;
arr[i->first]=*v.begin();
    
}
if(arr[1]==0)
arr[1]=1;
for(int i=1;i<=n;i++)
{
  cout<<arr[i];
}
cout<<endl;

    return 0;
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | F#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'F' does not name a type
    1 | F#include <bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:18:1: error: 'cin' was not declared in this scope
   18 | cin>>n>>m;
      | ^~~
a.cc:19:1: error: 'map' was not declared in this scope
   19 | map<int,set<int>>mm;
      | ^~~
a.cc:19:5: error: expected primary-expression before 'int'
   19 | map<int,set<int>>mm;
      |     ^~~
a.cc:24:5: error: 'mm' was not declared in this scope; did you mean 'm'?
   24 |     mm[a].insert(b);
      |     ^~
      |     m
a.cc:26:21: error: 'mm' was not declared in this scope; did you mean 'm'?
   26 | if(n==1 && m==1 && (mm.begin())->first==1 && *((mm.begin())->second.begin())==0)
      |                     ^~
      |                     m
a.cc:27:8: error: 'cout' was not declared in this scope
   27 | return cout<<0,0;
      |        ^~~~
a.cc:29:9: error: 'cout' was not declared in this scope
   29 | return  cout<<0,0;
      |         ^~~~
a.cc:30:12: error: 'mm' was not declared in this scope; did you mean 'm'?
   30 | for(auto i=mm.begin();i!=mm.end();i++)
      |            ^~
      |            m
a.cc:32:5: error: 'set' was not declared in this scope
   32 |     set<int>v=i->second;
      |     ^~~
a.cc:32:9: error: expected primary-expression before 'int'
   32 |     set<int>v=i->second;
      |         ^~~
a.cc:33:8: error: 'v' was not declared in this scope
   33 |     if(v.size()>1 || (*v.begin()==0 && i->first==1))
      |        ^
a.cc:34:12: error: 'cout' was not declared in this scope
   34 |     return cout<<-1,0;
      |            ^~~~
a.cc:37:1: error: 'memset' was not declared in this scope
   37 | memset(arr,0,sizeof arr);
      | ^~~~~~
a.cc:1:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | F#include <bits/stdc++.h>
a.cc:38:12: error: 'mm' was not declared in this scope; did you mean 'm'?
   38 | for(auto i=mm.begin();i!=mm.end();i++)
      |            ^~
      |            m
a.cc:40:5: error: 'set' was not declared in this scope
   40 |     set<int>v=i->second;
      |     ^~~
a.cc:40:9: error: expected primary-expression before 'int'
   40 |     set<int>v=i->second;
      |         ^~~
a.cc:41:16: error: 'v' was not declared in this scope
   41 | arr[i->first]=*v.begin();
      |                ^
a.cc:48:3: error: 'cout' was not declared in this scope
   48 |   cout<<arr[i];
      |   ^~~~
a.cc:50:1: error: 'cout' was not declared in this scope
   50 | cout<<endl;
      | ^~~~