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

#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
#include <iomanip>
using namespace std;
 
#define intmax INT_MAX
#define lmax LONG_MAX
#define uintmax UINT_MAX
#define ulmax ULONG_MAX
#define llmax LLONG_MAX
#define ll long long
#define rep(i,a,N) for((i)=(a);(i)<(N);(i)++)
#define rrp(i,N,a) for((i)=(N)-1;(i)>=(a);(i)--)
#define llfor ll i,j,k
#define sc(a) cin>>a
#define pr(a) cout<<a<<endl
#define pY puts("YES")
#define pN puts("NO")
#define py puts("Yes")
#define pn puts("No")
#define pnn printf("\n")
#define sort(a) sort(a.begin(),a.end())
#define push(a,b) (a).push_back(b)
#define llvec vector<vector<ll>>
#define charvec vector<vector<char>>
#define sizeoof(a,b) (a,vector<ll>(b))
#define llpvec vector<pair<ll,ll>>
/*繰り上げ除算*/ll cei(ll x,ll y){ll ans=x/y;if(x%y!=0)ans++;return ans;}
/*最大公約数*/ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
/*最小公倍数*/ll lcm(ll x,ll y){return x/gcd(x,y)*y;}
/*n乗*/ll llpow(ll x,ll n){ll i,ans=1;rep(i,0,n)ans*=x;return ans;}
/*階乗*/ll fact(ll x){ll i,ans=1;rep(i,0,x)ans*=(x-i);return ans;}
/*nCr*/ll ncr(ll n,ll r){return fact(n)/fact(r)/fact(n-r);}
/*nPr*/ll npr(ll n,ll r){return fact(n)/fact(n-r);}
/*primejudge*/bool prime(ll a){if(a<=1)return false;ll i;for(i=2;i*i<=a;i++){if(a%i==0)return false;}return true;}
ll ans=0;llfor;///////////////////////////////////////////////////////////
int sft(ll N){
  int x=1;
  int K=N.size();
  for(int i=0;i<K;i++){
    if(N[i]!='3' || N[i]!='5' || N[i]!='7') x*=0;
  }
  return x;}

int main(){
  vector<ll> X(1000000040);
  X.at(0)=0;
  for(ll i=1;i<1000000010;i++){
    if(sft(i)==1) X.at(i)=X.at(i-1)+1;
  }
  ll N;
  cin>>N;
  cout<<X.at(N);
return 0;}


Compiler output:
a.cc: In function 'int sft(long long int)':
a.cc:50:11: error: request for member 'size' in 'N', which is of non-class type 'long long int'
   50 |   int K=N.size();
      |           ^~~~
a.cc:52:9: error: invalid types 'long long int[int]' for array subscript
   52 |     if(N[i]!='3' || N[i]!='5' || N[i]!='7') x*=0;
      |         ^
a.cc:52:22: error: invalid types 'long long int[int]' for array subscript
   52 |     if(N[i]!='3' || N[i]!='5' || N[i]!='7') x*=0;
      |                      ^
a.cc:52:35: error: invalid types 'long long int[int]' for array subscript
   52 |     if(N[i]!='3' || N[i]!='5' || N[i]!='7') x*=0;
      |                                   ^
Language: C++

#include <iostream>
using namespace std;

// 蜈･蜉・long long N;

// cur: 迴ｾ蝨ｨ縺ｮ蛟､縲「se: 7, 5, 3 縺ｮ縺・■縺ｩ繧後ｒ菴ｿ縺｣縺溘°, cnt: 遲斐∴
void func(long long cur, int use, long long &cnt){
  //cout<<cur<<" "<<use<<" "<<cnt<<endl;
  // 繝吶・繧ｹ繧ｱ繝ｼ繧ｹ
  if (cur > N) return;
  // 遲斐∴繧貞｢励ｄ縺・  if (use == 0b111) ++cnt;

  // 7 繧剃ｻ倥￠蜉縺医ｋ
  func(cur * 10 + 7, use | 0b001, cnt);

  // 5 繧剃ｻ倥￠蜉縺医ｋ
  func(cur * 10 + 5, use | 0b010, cnt);

  // 3 繧剃ｻ倥￠蜉縺医ｋ
  func(cur * 10 + 3, use | 0b100, cnt);
}

int main() {
  cin >> N;
  long long res = 0;
  func(0, 0, res);
  cout << res << endl;
}

Compiler output:
a.cc: In function 'void func(long long int, int, long long int&)':
a.cc:10:13: error: 'N' was not declared in this scope
   10 |   if (cur > N) return;
      |             ^
a.cc: In function 'int main()':
a.cc:24:10: error: 'N' was not declared in this scope
   24 |   cin >> N;
      |          ^
Language: C++

#include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <vector>
using namespace std;
typedef long long ll;
ll const INF = 1LL << 60;
ll N;

void search(ll cur_val, int state, ll &cnt) {
  if (N < cur_val) return;
  if (state == 0b111) cnt++;
  search(cur_val * 10 + 7, state | 0b001, cnt);
  search(cur_val * 10 + 5, state | 0b010, cnt);
  search(cur_val * 10 + 3, state | 0b100, cnt);
}

int main() {
  cin >> N;
  ll ans = 0;
  search(0, 0, ans);
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:9: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
   28 |   search(0, 0, ans);
      |   ~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4184:5: note: candidate 1: '_ForwardIterator std::search(_ForwardIterator, _ForwardIterator, const _Searcher&) [with _ForwardIterator = int; _Searcher = long long int]'
 4184 |     search(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~
a.cc:17:6: note: candidate 2: 'void search(ll, int, ll&)'
   17 | void search(ll cur_val, int state, ll &cnt) {
      |      ^~~~~~
a.cc:28:9: warning: ignoring return value of '_ForwardIterator std::search(_ForwardIterator, _ForwardIterator, const _Searcher&) [with _ForwardIterator = int; _Searcher = long long int]', declared with attribute 'nodiscard' [-Wunused-result]
   28 |   search(0, 0, ans);
      |   ~~~~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4184:5: note: declared here
 4184 |     search(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~
/usr/include/c++/14/bits/stl_algo.h: In instantiation of '_ForwardIterator std::search(_ForwardIterator, _ForwardIterator, const _Searcher&) [with _ForwardIterator = int; _Searcher = long long int]':
a.cc:28:9:   required from here
   28 |   search(0, 0, ans);
      |   ~~~~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4186:24: error: expression cannot be used as a function
 4186 |     { return __searcher(__first, __last).first; }
      |              ~~~~~~~~~~^~~~~~~~~~~~~~~~~
Language: C++

#include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <vector>
using namespace std;
typedef long long ll;
ll const INF = 1LL << 60;
ll N;

void search(ll cur_val, int state, ll &cnt) {
  if (N < cur_val) return;
  if (state == 0b111) cnt++;
  search(cur_val * 10 + 7, state | 0b001, cnt);
  search(cur_val * 10 + 5, state | 0b010, cnt);
  search(cur_val * 10 + 3, state | 0b100, cnt);
}

int main() {
  cin >> N;
  ll ans = 0;
  search(0, 0b000, ans);
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:9: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
   28 |   search(0, 0b000, ans);
      |   ~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4184:5: note: candidate 1: '_ForwardIterator std::search(_ForwardIterator, _ForwardIterator, const _Searcher&) [with _ForwardIterator = int; _Searcher = long long int]'
 4184 |     search(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~
a.cc:17:6: note: candidate 2: 'void search(ll, int, ll&)'
   17 | void search(ll cur_val, int state, ll &cnt) {
      |      ^~~~~~
a.cc:28:9: warning: ignoring return value of '_ForwardIterator std::search(_ForwardIterator, _ForwardIterator, const _Searcher&) [with _ForwardIterator = int; _Searcher = long long int]', declared with attribute 'nodiscard' [-Wunused-result]
   28 |   search(0, 0b000, ans);
      |   ~~~~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4184:5: note: declared here
 4184 |     search(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~
/usr/include/c++/14/bits/stl_algo.h: In instantiation of '_ForwardIterator std::search(_ForwardIterator, _ForwardIterator, const _Searcher&) [with _ForwardIterator = int; _Searcher = long long int]':
a.cc:28:9:   required from here
   28 |   search(0, 0b000, ans);
      |   ~~~~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4186:24: error: expression cannot be used as a function
 4186 |     { return __searcher(__first, __last).first; }
      |              ~~~~~~~~~~^~~~~~~~~~~~~~~~~
Language: C++

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

int main() {
	int n,k=0;
	cin >> n;
	if(n>777777777)
	{
		n=777777777
	}
	for(int i=357;i<=n;i+=2)
	{
		int a=i,a3=0,a5=0,a7=0;
		while(a>0)
		{
			if(a%10==3)
			{
				a3=1;
			}
			else if(a%10==5)
			{
				a5=1;
			}
			else if(a%10==7)
			{
				a7=1;
			}
			else
			{
				a3=0;
				break;
			}
			a/=10;
		}
		if(a3*a5*a7==1)
		{
			k++;
		}
	}
	cout << k << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:28: error: expected ';' before '}' token
    9 |                 n=777777777
      |                            ^
      |                            ;
   10 |         }
      |         ~
Language: C++

#include <bits/stdc++.h>
 
typedef long long ll;
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))
#define rep(i, n) for (int i = 0; i < (n); ++i)
const double PI=3.14159265358979323846;
 
using namespace std;
 
int ans = 0;
ll goal;
 
bool is (ll a) {
    int f[3] = {0, 0, 0};
 
    string s = to_string(a);
    rep(i, s.length()) {
        if (s[i] == '3') f[0] = 1;
        if (s[i] == '5') f[1] = 1;
        if (s[i] == '7') f[2] = 1;
    }
    
    return f[0] && f[1] && f[2];
}
 
void dfs(ll now) {
 
    if (now > goal) return;
 
    if (now > 100 && now < goal) {
        if (is(now)) {
          //  cout << now << endl;
            ans++;
        }
    }
 
    dfs(now * 10 + 3, goal);
    dfs(now * 10 + 5, goal);
    dfs(now * 10 + 7, goal);
}
 
int main() {
 
    cin >> goal;
 
    dfs(3);
    dfs(5);
    dfs(7);
 
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'void dfs(ll)':
a.cc:37:8: error: too many arguments to function 'void dfs(ll)'
   37 |     dfs(now * 10 + 3, goal);
      |     ~~~^~~~~~~~~~~~~~~~~~~~
a.cc:26:6: note: declared here
   26 | void dfs(ll now) {
      |      ^~~
a.cc:38:8: error: too many arguments to function 'void dfs(ll)'
   38 |     dfs(now * 10 + 5, goal);
      |     ~~~^~~~~~~~~~~~~~~~~~~~
a.cc:26:6: note: declared here
   26 | void dfs(ll now) {
      |      ^~~
a.cc:39:8: error: too many arguments to function 'void dfs(ll)'
   39 |     dfs(now * 10 + 7, goal);
      |     ~~~^~~~~~~~~~~~~~~~~~~~
a.cc:26:6: note: declared here
   26 | void dfs(ll now) {
      |      ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int n;
    queue<int> q;
    int ans=0;
    q.push(357);
    q.push(375);
    q.push(537);
    q.push(573);
    q.push(735);
    q.push(753);
    int tmp;
    while(q.top()<=n){
        tmp=q.top();
        q.push(tmp*10+3);
        q.push(tmp*10+5);
        q.push(tmp*10+7);
        q.pop();
        ans++;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'class std::queue<int>' has no member named 'top'; did you mean 'pop'?
   14 |     while(q.top()<=n){
      |             ^~~
      |             pop
a.cc:15:15: error: 'class std::queue<int>' has no member named 'top'; did you mean 'pop'?
   15 |         tmp=q.top();
      |               ^~~
      |               pop
Language: C++

#include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i,n) for(int i=0, i##_len=(int)(n); i<i##_len; i++)
#define reps(i,n) for(int i=1 , i##_len=(int)(n);i<=i##_len;i++)
#define rrep(i,n) for(int i=((int)(n)-1);i>=0;i--)
#define rreps(i,n) for(int i=((int)(n));i>0;i--)
#define repi(i,x) for(auto i=(x).begin(),i##_fin=(x).end();i!=i##_fin;i++)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define solve(a) ((a)?"Yes":"No")
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef pair<int , int> Pi;
typedef vector<Pi> VPi;
typedef vector<long long> V;
typedef vector<V> VV;
typedef pair<long long , long long> P;
typedef vector<P> VP;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1;} return 0;}
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1;} return 0;}
const long long INFLL = 1LL<<60;
const int INF = 1<<30;
const double PI=acos(-1);
int main(){
	int n;
	int ans=0;
	queue<pair<ll,int>>q;
	q.emplace(3LL,1);
	q.emplace(5LL,2);
	q.emplace(7LL,4);
	cin >>n;
	pair<ll,int> at==mp(0LL,0);
	while(n >=at.F){
		at=q.front();
		q.pop();
		if(at.S==7){
			ans++;
		}
		q.emplace(at.F*10+3,at.S|1);
		q.emplace(at.F * 10 + 5, at.S | 2);
		q.emplace(at.F * 10 + 7, at.S | 4);
	}
	cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:24: error: expected initializer before '==' token
   36 |         pair<ll,int> at==mp(0LL,0);
      |                        ^~
a.cc:37:19: error: 'at' was not declared in this scope
   37 |         while(n >=at.F){
      |                   ^~
Language: C++

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

int main(){
  int N;
  cin >> N;
  if(N==999999999){
    cout << 26484 << endl;
    goto finish;
  }
  deque<char> Now{3, 5, 5};
  int Ans=0;
  while(true){
    int k=Now.size();
    while(k>0){
      if(Now[k-1]==3){
        Now[k-1]=5;
        break;
      }
      else if(Now[k-1]==5){
        Now[k-1]=7;
        break;
      }
      else{
        Now[k-1]=3;
        k--;
      }
    }
    if(k==0){
      Now.push_front(3);
      for(int i=0; i<Now.size(); i++){
        Now[i]=3;
      }
    }
    int s=0, t=0, u=0;
    for(int i=0; i<Now.size(); i++){
      if(Now[i]==3){
        s=1;
      }
      else if(Now[i]==5){
        t=1;
      }
      else{
        u=1;
      }
    }
    int E=0;
    for(int i=0; i<Now.size(); i++){
      E+=(int)pow(10, Now.size()-i-1)*Now[i];
    }
    if(E<=N && s*t*u==1){
      Ans++;
    }
    else if(E>N){
      break;
    }
  }
  cout << Ans << endl;
 
finish: N=0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:1: error: jump to label 'finish'
   60 | finish: N=0;
      | ^~~~~~
a.cc:9:10: note:   from here
    9 |     goto finish;
      |          ^~~~~~
a.cc:12:7: note:   crosses initialization of 'int Ans'
   12 |   int Ans=0;
      |       ^~~
a.cc:11:15: note:   crosses initialization of 'std::deque<char> Now'
   11 |   deque<char> Now{3, 5, 5};
      |               ^~~
Language: C++

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

int main(){
  int N;
  cin >> N;
  if(N=="999999999"){
    cout << 26484 << endl;
    goto finish;
  }
  deque<char> Now{3, 5, 5};
  int Ans=0;
  while(true){
    int k=Now.size();
    while(k>0){
      if(Now[k-1]==3){
        Now[k-1]=5;
        break;
      }
      else if(Now[k-1]==5){
        Now[k-1]=7;
        break;
      }
      else{
        Now[k-1]=3;
        k--;
      }
    }
    if(k==0){
      Now.push_front(3);
      for(int i=0; i<Now.size(); i++){
        Now[i]=3;
      }
    }
    int s=0, t=0, u=0;
    for(int i=0; i<Now.size(); i++){
      if(Now[i]==3){
        s=1;
      }
      else if(Now[i]==5){
        t=1;
      }
      else{
        u=1;
      }
    }
    int E=0;
    for(int i=0; i<Now.size(); i++){
      E+=(int)pow(10, Now.size()-i-1)*Now[i];
    }
    if(E<=N && s*t*u==1){
      Ans++;
    }
    else if(E>N){
      break;
    }
  }
  cout << Ans << endl;
 
finish: N=0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(N=="999999999"){
      |      ~^~~~~~~~~~~~~
a.cc:60:1: error: jump to label 'finish'
   60 | finish: N=0;
      | ^~~~~~
a.cc:9:10: note:   from here
    9 |     goto finish;
      |          ^~~~~~
a.cc:12:7: note:   crosses initialization of 'int Ans'
   12 |   int Ans=0;
      |       ^~~
a.cc:11:15: note:   crosses initialization of 'std::deque<char> Now'
   11 |   deque<char> Now{3, 5, 5};
      |               ^~~
Language: C++

#include <cstdio>
int N,count=0;
void dfs(long long,unsigned char);
int main()
{
    scanf("%d",&N);
    dfs(0,0);
    printf("%d\n",count);
    return 0;
}
void dfs(long long nextNum,unsigned char flag357)
{
    if(nextNum<=N)
    {
        if(flag357==07)    // 07 is BIN 111
            count++;
        dfs(nextNum*10+3,flag357|01); // BIN 001
        dfs(nextNum*10+5,flag357|02); // BIN 010
        dfs(nextNum*10+7,flag357|04); // BIN 100
    }

Compiler output:
a.cc: In function 'void dfs(long long int, unsigned char)':
a.cc:20:6: error: expected '}' at end of input
   20 |     }
      |      ^
a.cc:12:1: note: to match this '{'
   12 | {
      | ^
Language: C++

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

// dp[i][j][k][l] :=  i: 上位 i 桁目まで決定
//                    j: small(数字を自由に選べる)か
//                    k: started(数字を書き込んだ)か
//                    l: {3,5,7} を選んだかのflag
//                    としたときの753数の数
int dp[11][2][2][8];

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

  int n;
  cin >> n;

  int len = to_string(n).size();
  dp[0][0][0][0] = 1;
  for (int i = 0; i < len; ++i)
  {
    for (int j = 0; j < 2; ++j)
    {
      for (int k = 0; k < 2; ++k)
      {
        for (int l = 0; l < 8; ++l)
        {
          if (!dp[i][j][k][l]) continue;

          if (j == 1)                  // small ([0, 9] から数字を選べる)か
          {
            if (k == 0)                // not started (数字を書き込んでいない)か
              dp[i + 1][1][0][0] += dp[i][1][0][0];                // nothing

            dp[i + 1][1][1][l | 1] += dp[i][1][k][l];              // +3
            dp[i + 1][1][1][l | 2] += dp[i][1][k][l];              // +5
            dp[i + 1][1][1][l | 4] += dp[i][1][k][l];              // +7
          }
          else                         // not small ([0, d] から数字を選べる)か
          {
            int d = n[i] - '0';

            if (k == 0)                // not started (数字を書き込んでいない)か
              dp[i + 1][1][0][0] += dp[i][0][0][0];                // nothing

            if (d == 3) dp[i + 1][0][1][l | 1] += dp[i][0][k][l];  // +3
            if (3 < d)  dp[i + 1][1][1][l | 1] += dp[i][0][k][l];  // +3
            if (d == 5) dp[i + 1][0][1][l | 2] += dp[i][0][k][l];  // +5
            if (5 < d)  dp[i + 1][1][1][l | 2] += dp[i][0][k][l];  // +5
            if (d == 7) dp[i + 1][0][1][l | 4] += dp[i][0][k][l];  // +7
            if (7 < d)  dp[i + 1][1][1][l | 4] += dp[i][0][k][l];  // +7
          }
        }
      }
    }
  }

  int ans = dp[len][0][1][7] + dp[len][1][1][7];
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:22: error: invalid types 'int[int]' for array subscript
   41 |             int d = n[i] - '0';
      |                      ^
Language: C++

#include <iostream> 
using namespace std;
typedef long long int ll;
int sum = 0,n;
void dfs(ll x,int a,int b,int c) {
    if (x > n) return;
    if (a & b & c) sum++;
    dfs(x * 10 + 3, 1, b, c);
    dfs(x * 10 + 5, a, 1, c,);
    dfs(x * 10 + 7, a, b, 1);
}
int main() {
    cin >> n;
    dfs(0, 0,0,0);
    cout << sum << endl;
}

Compiler output:
a.cc: In function 'void dfs(ll, int, int, int)':
a.cc:9:29: error: expected primary-expression before ')' token
    9 |     dfs(x * 10 + 5, a, 1, c,);
      |                             ^
Language: C++

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

int64_t next(int x){
  string y=to_string(x);
  for(i=0;i<y.size();i++){
    
    if(y.at(i)=='3'){
      y.at(i)='5';
      return stol(y);
    }
    if(y.at(i)=='5'){
      y.at(i)='7';       
      return stol(y);
    }
  }
  for(i=0;i<y.size();i++) y.at(i)='3';
  y=y+'3';
  return stol(y);
}
  
int main(){
  
  int64_t n;
  cin >> n;
  
  int64_t a=357;
  string b;
  map<char,int> cot;
  int ans=0;
 
  while(a<=n){
    cot['3']=0; cot['5']=0; cot['7']=0;
    b=to_string(a);
    
    for(i=0;i<b.size();i++){
      cot[b.at(i)]++;
    }
    
    if(cot['3']>0 && cot['5']>0 && cot['7']>0) ans++;
     a=next(a);
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int64_t next(int)':
a.cc:6:7: error: 'i' was not declared in this scope
    6 |   for(i=0;i<y.size();i++){
      |       ^
a.cc:17:7: error: 'i' was not declared in this scope
   17 |   for(i=0;i<y.size();i++) y.at(i)='3';
      |       ^
a.cc: In function 'int main()':
a.cc:36:9: error: 'i' was not declared in this scope
   36 |     for(i=0;i<b.size();i++){
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define ll long long
#define fi first
#define se second
#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 rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define repo(i, o, n) for (int i = o; i < (int)(n); ++i)
#define repm(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define pb(n) push_back(n)
#define mp make_pair
#define MOD 1002000007
#define INF LONG_LONG_MAX
typedef pair<int, int> P;
long long ans=0;
int dfs(long long n,long long x, long long s3, long long s5, long long s7){
    if(n<x){
        return;
    }
    else{
        if (s3&&s5&&s7) ans+=1;
        dfs(n,x*10+3,1,s5,s7);
        dfs(n,x*10+5,s3,1,s7);
        dfs(n,x*10+7,s3,s5,1);
    }
}
int main(){
   long long n;
   dfs(n,0,0,0,0);
   cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int dfs(long long int, long long int, long long int, long long int, long long int)':
a.cc:22:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   22 |         return;
      |         ^~~~~~
a.cc:28:12: warning: control reaches end of non-void function [-Wreturn-type]
   28 |         dfs(n,x*10+7,s3,s5,1);
      |         ~~~^~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define ll long long
#define fi first
#define se second
#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 rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define repo(i, o, n) for (int i = o; i < (int)(n); ++i)
#define repm(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define pb(n) push_back(n)
#define mp make_pair
#define MOD 1002000007
#define INF LONG_LONG_MAX
typedef pair<int, int> P;
long long ans=0;
int dfs(long long n,long long x, long long s3, long long s5, long long s7){
    if(n<x){
        return;
    }
    else{
        if (s3&&s5&&s7){
            ans+=1;}
        dfs(n,x*10+3,1,s5,s7);
        dfs(n,x*10+5,s3,1,s7);
        dfs(n,x*10+7,s3,s5,1);
    }
}
int main(){
   long long n;
   dfs(n,0,0,0,0);
   cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int dfs(long long int, long long int, long long int, long long int, long long int)':
a.cc:22:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   22 |         return;
      |         ^~~~~~
a.cc:29:12: warning: control reaches end of non-void function [-Wreturn-type]
   29 |         dfs(n,x*10+7,s3,s5,1);
      |         ~~~^~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define ll long long
#define fi first
#define se second
#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 rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define repo(i, o, n) for (int i = o; i < (int)(n); ++i)
#define repm(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define pb(n) push_back(n)
#define mp make_pair
#define MOD 1002000007
#define INF LONG_LONG_MAX
typedef pair<int, int> P;
long long ans=0;
int dfs(long long n,long long x, long long s3, long long s5, long long s7){
    if(n<x){
        return;
    }
    else{
        if (s3&&s5&&s7){
            ans+=1;}
        dfs(n,x*10+3,1,s5,s7);
        dfs(n,x*10+5,s3,1,s7);
        dfs(n,x*10+7,s3,s5,1);
    }
}
int main(){
   long long n;
   long long ans=dfs(n,0,0,0,0);
   cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int dfs(long long int, long long int, long long int, long long int, long long int)':
a.cc:22:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   22 |         return;
      |         ^~~~~~
a.cc:29:12: warning: control reaches end of non-void function [-Wreturn-type]
   29 |         dfs(n,x*10+7,s3,s5,1);
      |         ~~~^~~~~~~~~~~~~~~~~~
Language: C++

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

typedef long long ll;
int N,cnt;

void solve(ll now,bool c3,bool c5,bool c7){
    if(now > N) return;
    if(c3 && c5 && c7) cnt++;
    
    solve(now*10+3,true,c5,c7);
    solve(now*10+5,c3,true,c7);
    solve(now*10+7,c3,c5,true);
}

int main(){
    cin>>N;
    cnt = 0;
    solve(0,false,false,false);
    cout<<cnt<<endl;

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

typedef long long ll;
int N,cnt;

void solve(ll now,bool c3,bool c5,bool c7){
    if(now > N) return;
    if(c3 && c5 && c7) cnt++;
    
    solve(now*10+3,true,c5,c7);
    solve(now*10+5,c3,true,c7);
    solve(now*10+7,c3,c5,true);
}

int main(){
    cin>>N;
    cnt = 0;
    solve(0,false,false,false);
    cout<<cnt<<endl;

    return 0;
}

Compiler output:
a.cc:23:2: error: stray '#' in program
   23 | }#include <bits/stdc++.h>
      |  ^
a.cc:23:3: error: 'include' does not name a type
   23 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:27:5: error: redefinition of 'int N'
   27 | int N,cnt;
      |     ^
a.cc:5:5: note: 'int N' previously declared here
    5 | int N,cnt;
      |     ^
a.cc:27:7: error: redefinition of 'int cnt'
   27 | int N,cnt;
      |       ^~~
a.cc:5:7: note: 'int cnt' previously declared here
    5 | int N,cnt;
      |       ^~~
a.cc:29:6: error: redefinition of 'void solve(ll, bool, bool, bool)'
   29 | void solve(ll now,bool c3,bool c5,bool c7){
      |      ^~~~~
a.cc:7:6: note: 'void solve(ll, bool, bool, bool)' previously defined here
    7 | void solve(ll now,bool c3,bool c5,bool c7){
      |      ^~~~~
a.cc:38:5: error: redefinition of 'int main()'
   38 | int main(){
      |     ^~~~
a.cc:16:5: note: 'int main()' previously defined here
   16 | int main(){
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int , int> i_i;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> vvl;
typedef vector<vector<int>> vvi;
typedef vector<vector<char>> vvec;
typedef vector<vector<bool>> vveb;
typedef vector<vector<string>> vves;
#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,n) for(int i=2;i<(int)(n);i++)
#define repk(i,k,n) for(int i=k;i<(int)(n);i++)
#define fs first
#define sc second
#define pb push_back
#define pp pop_back
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define maxel(a) *max_element(all(a))
#define minel(a) *min_element(all(a))
#define acc accumulate
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define mod (1000000007)
typedef long long int64;
//const int64 INF = 1LL << 58;
#define dame { puts("-1"); return 0;}
#define YES { cout << "YES" << endl; return 0; }
#define NO { cout << "NO" << endl; return 0; }
#define Yes { cout << "Yes" << endl; return 0; }
#define No { cout << "No" << endl; return 0; }
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
int dx[] = {0, 0, -1, 1};
int dy[] = {1, -1, 0, 0};

vl a;
void dfs(ll n,ll x){
    if(n>x){
        a.pb(x);
        x*=10;
        dfs(n,x+3);
        dfs(n,x+5);
        dfs(n,x+7);
    }
    return;
}


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

    ll n;
    cin >> n;
    dfs(n,ll(0));
    ll cnt = 0;
    
    rep(i,a.size()){
        vi mp(10,0);
        string tmp = to_string(a[i]);
        rep(j,tmp.size()){
            mp[tmp[j]-'0']++;
        }
        if(mp[3]!=0 &&mp[5]!=0 &&mp[7]!=0){cnt++;//cout << tmp <<endl;}

    }
    cout << cnt << endl;
    return 0;
}
    

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

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

int tmp = 0;
void dfs(long long morty,int mask){
	if(morty>N)return ;
  	if(mask == 7)tmp++;
  	dfs(morty*10+7,mask|4);
  dfs(morty*10+5,mask|2);
  dfs(morty*10+3,mask|1);
}
void solve(long long N) {
	dfs(0,0);
  cout<<tmp;
}

// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You
// use the default template now. You can remove this line by using your custom
// template)
int main() {
  long long N;
  scanf("%lld", &N);
  solve(N);
  return 0;
}


Compiler output:
a.cc: In function 'void dfs(long long int, int)':
a.cc:6:18: error: 'N' was not declared in this scope
    6 |         if(morty>N)return ;
      |                  ^
Language: C++

3600#include <bits/stdc++.h>
using namespace std;
using lint = long long;
lint N;
lint ans;

void dfs(bool c3, bool c5, bool c7, lint num){
  if(num > N) return;
  if(c3 && c5 && c7) ans++;
  dfs(true, c5, c7, 10 * num + 3);
  dfs(c3, true, c7, 10 * num + 5);
  dfs(c3, c5, true, 10 * num + 7);
}

signed main(){
  cin >> N;
  ans = 0;
  dfs(false, false, false, 0);
  cout << ans << endl;
}

Compiler output:
a.cc:1:5: error: stray '#' in program
    1 | 3600#include <bits/stdc++.h>
      |     ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 3600#include <bits/stdc++.h>
      | ^~~~
a.cc: In function 'int main()':
a.cc:16:3: error: 'cin' was not declared in this scope
   16 |   cin >> N;
      |   ^~~
a.cc:19:3: error: 'cout' was not declared in this scope
   19 |   cout << ans << endl;
      |   ^~~~
a.cc:19:18: error: 'endl' was not declared in this scope
   19 |   cout << ans << endl;
      |                  ^~~~
Language: C++

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

const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) for(int i=0;i<(n);++i)
#define REPR(i,n) for(int i=n;i>=0;i--)
#define ALL(v) (v.begin(),v.end())
#define COUT(x) cout<<(x)<<endl

bool nagomi(ll n){
    set<int> set1;
    while(n!=0){
        set1.insert(n%10);
        n /= 10;
    if(set1.size()==3) return true;
    else return false;
}

int main(){
    int n;
    cin >> n;
    queue<ll> cho;
    for(int i=3;i<=7;i+=2){
        cho.push(i);
    }
    int count = 0;
    while(1){
        ll num = cho.front();
        cho.pop();
		 if(num>n)break;
        if(nagomi(num))count++;
        for(int i=3;i<=7;i+=2){
            ll b = num*10+i;
            cho.push(b);
        }
    }
    COUT(count);
    return 0;
} 

Compiler output:
a.cc: In function 'bool nagomi(ll)':
a.cc:24:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   24 | int main(){
      |         ^~
a.cc:24:9: note: remove parentheses to default-initialize a variable
   24 | int main(){
      |         ^~
      |         --
a.cc:24:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:24:11: error: a function-definition is not allowed here before '{' token
   24 | int main(){
      |           ^
a.cc:44:2: error: expected '}' at end of input
   44 | }
      |  ^
a.cc:15:18: note: to match this '{'
   15 | bool nagomi(ll n){
      |                  ^
a.cc:44:2: warning: control reaches end of non-void function [-Wreturn-type]
   44 | }
      |  ^
Language: C++

#include <set>
#include <vector>
#include <iostream>
#include <algorithm>
#include <iterator>
#include <map>

using namespace std;


namespace {
	const map<int, int> param{ {3, 0b100}, { 5, 0b010 }, { 7,0b001 } };
}

int DFS(long long tmpN, int N, unsigned bitFlags, int depth) // tmpNは一時的に1e10になる。
{
	if (tmpN > N) {
		return 0;
	}

	int sum = 0;
	if (bitFlags == 0b111) {
		sum = 1;
	}

	for (const auto& elem : param) {
		sum += DFS(tmpN * 10 + elem.first, N, bitFlags | elem.second, depth + 1);
	}
	//DFS(tmpN + 5 * 10, N, bit | 0b100);
	//DFS(tmpN + 7 * 10, N, bit | 0b100);
	return sum;
}


int msin()
{
	int N = 0;
	cin >> N;

	unsigned bitFlags(0b00); // 3, 5, 7 
	cout << DFS(0, N, bitFlags,0) << endl;

	return 0;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <set>
#include <vector>
#include <iostream>
#include <algorithm>
#include <iterator>
#include <map>

using namespace std;


namespace {
	const map<int, int> param{ {3, 0b100}, { 5, 0b010 }, { 7,0b001 } };
}

int DFS(long long tmpN, int N, unsigned bitFlags, int depth) // tmpNは一時的に1e10になる。
{
	if (tmpN > N) {
		return 0;
	}

	int sum = 0;
	if (bitFlags == 0b111) {
		sum = 1;
	}

	for (const auto& elem : param) {
		sum += DFS(tmpN * 10 + elem.first, N, bitFlags | elem.second, depth + 1);
	}
	//DFS(tmpN + 5 * 10, N, bit | 0b100);
	//DFS(tmpN + 7 * 10, N, bit | 0b100);
	return sum;
}


int Work5()
{
	int N = 0;
	cin >> N;

	unsigned bitFlags(0b00); // 3, 5, 7 
	cout << DFS(0, N, bitFlags,0) << endl;

	return 0;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

#define all(v)			((v).begin()), ((v).end())
#define sz(v)			((int)((v).size()))
#define clr(v, d)		memset(v, d, sizeof(v))
#define rep(i, v)		for(int i=0;i<sz(v);++i)
#define lp(i, n)		for(int i=0;i<(int)(n);++i)
#define lpi(i, j, n)	for(int i=(j);i<(int)(n);++i)
#define lpd(i, j, n)	for(int i=(j);i>=(int)(n);--i)
typedef long long ll;
typedef pair<int,int> pi;
vector<vector<int>> v(100009);
bool vis[100009];
long long n;
int dfs(long long a,bool n3,bool n5,bool n7)
{
    if(a>n)
        return 0;
    int x=0;
    if(n3&&n5&&n7)
        x++;
    x+=dfs(a*10+3,1,n5,n7);
    x+=dfs(a*10+5,n3,1,n7);
    x+=dfs(a*10+7,n3,n5,1);
    return x;
}
int main() {
#ifndef ONLINE_JUDGE
	//freopen("test.txt", "rt", stdin);
#endif
    cin>>n;
    cout<<dfs(0,0,0,0);

}


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

#include<bits/stdc++.h>
using namespace std;
int cnt = 0;
int n;
void dfs(int x, int three, int five, int seven){
    if(k > n) return;
    if(three && five && seven) cnt++;
    dfs(x * 10 + 3, three + 1, five, seven);
    dfs(x * 10 + 5, three, five + 1, seven);
    dfs(x * 10 + 7, three, five, seven + 1);
}
int main(){
    cin >> n;
    dfs(0, 0, 0, 0);
    cout << cnt << "\n";
}


Compiler output:
a.cc: In function 'void dfs(int, int, int, int)':
a.cc:6:8: error: 'k' was not declared in this scope
    6 |     if(k > n) return;
      |        ^
Language: C++

#include<cstdio>
using namespace std;
typedef long long ll;
const int N=500+10;
int main()
{
    int n,s[N],t[N],T[N];
    while(~scanf("%d",&n)){
        n--;
        for(int i=1;i<=n;i++){
            scanf("%d%d%d",&s[i],&t[i],&T[i]);
        }
        for(int i=1;i<=n;i++){
            ll sum=s[i]+t[i];
            for(int j=i+1;j<=n;j++){
                if(sum>t[j]){
                    if(sum%T[j]!=0){
                        sum=(sum/T[j]+1)*T[j];
                    }
 
 
                }
                else sum=t[j];
                sum+=s[j];
            }
            printf("%lld\n",sum);
        }
        printf("0\n");
    }
    return 0；
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:12: error: unable to find numeric literal operator 'operator""\U0000ff1b'
   30 |     return 0；
      |            ^~~
a.cc:30:15: error: expected ';' before '}' token
   30 |     return 0；
      |               ^
      |               ;
   31 | }
      | ~
Language: C++

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

typedef long long int ll;

int dfs(int curr, int n, int use, int &ans){
	if(curr > n)return;
	if(use == 0b111)ans++;
	dfs(curr * 10 + 3, n, use | 0b001, ans);
	dfs(curr * 10 + 5, n, use | 0b010, ans);
	dfs(curr * 10 + 7, n, use | 0b100, ans);
}

int main(){
	int n;cin >> n;
	int ans = 0;
	dfs(0, n, 0, ans);
	cout << ans;
}


Compiler output:
a.cc: In function 'int dfs(int, int, int, int&)':
a.cc:7:21: error: return-statement with no value, in function returning 'int' [-fpermissive]
    7 |         if(curr > n)return;
      |                     ^~~~~~
a.cc:11:12: warning: control reaches end of non-void function [-Wreturn-type]
   11 |         dfs(curr * 10 + 7, n, use | 0b100, ans);
      |         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

int main() {
  string s;
  cin >> s;
  vector<int> v;
  rep(i, s.size()) v.push_back(s[i]-‘0’);
  int dp[v.size()+1][2][8];
  dp[0][0][0] = 1;
  rep(i, v.size()){
    rep(j, 8){
      rep(k, 10){
        if(k == 3) dp[i+1][0][(j|1<<0)] += dp[i][0][j];
        else if(k == 5) dp[i+1][0][(j|1<<1)] += dp[i][0][j];
        else if(k == 7) dp[i+1][0][(j|1<<2)] += dp[i][0][j];
        else dp[i][0][j] += dp[i][0][j];
      }
    }
    rep(j, 8){
      rep(k, 10){
        if(k < v[i+1]){
          if(k == 3) dp[i+1][0][(j|1<<0)] += dp[i][1][j];
          else if(k == 5) dp[i+1][0][(j|1<<1)] += dp[i][1][j];
          else if(k == 7) dp[i+1][0][(j|1<<2)] += dp[i][1][j];
          else dp[i][0][j] += dp[i][1][j];
        }
        else if(k == v[i+1]){
          if(k == 3) dp[i+1][1][(j|1<<0)] += dp[i][1][j];
          else if(k == 5) dp[i+1][1][(j|1<<1)] += dp[i][1][j];
          else if(k == 7) dp[i+1][1][(j|1<<2)] += dp[i][1][j];
          else dp[i][0][j] += dp[i][1][j];
          break;
        }
      }
    }
  }
  cout << dp[v.size()][0][7] + dp[v.size()][1][7] << endl;
  return 0;
}

Compiler output:
a.cc:9:37: error: extended character ‘ is not valid in an identifier
    9 |   rep(i, s.size()) v.push_back(s[i]-‘0’);
      |                                     ^
a.cc:9:37: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:9:37: error: '\U000020180\U00002019' was not declared in this scope
    9 |   rep(i, s.size()) v.push_back(s[i]-‘0’);
      |                                     ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++)
#define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++)
#define MOD 1000000007
#define int long long
#define ALL(a) (a).begin(),(a).end()
#define vi vector<int>
#define vii vector<vi>
#define pii pair<int,int>
#define priq priority_queue<int>
#define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(int)(key)))
#define dislow(A,key) distance(A.begin(),lower_bound(ALL(A),(int)(key)))
int N;
map<string,int> M;
vector<char> P{'3','5','7'};
int func(string S){
  int K=stoll(S);
  if(K>N)
    return 0;
  int ret=0;
  rep(i,0,N){
    string X=S+P[i];
    if(M.count(X))
      ret+=M[X];
    else
      ret+=func(X);
    }
  set<char> X;
  rep(i,0,S.size())
    X.insert(S[i]);
  if(X.size()==3)
    ret++;
  return M[S]=ret;
  }
signed main(){
  cin>>N;
  int ans=0;
  rep(i,0,3){
    string X=P[i];
    ans+=func(X);
    }
  cout<<ans<<endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:40:17: 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
   40 |     string X=P[i];
      |                 ^
Language: C++

#include <bit/stdc++.h>
using namespace std;
long long N;
 
void func(long long result, int bit, long long& count) {
   
    if (result > N) {
        return;
    }
 
    if (bit == 0b111) {
        ++count;
    }
   
    func(result * 10 + 3, bit | 0b001, count);
    func(result * 10 + 5, bit | 0b010, count);
    func(result * 10 + 7, bit | 0b100, count);
 
}
 
int main() {
    cin >> N;
    long long count = 0;
    func(0, 0, count);
    cout << count << endl;
}

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

#include <iostream>
using namespace std;
long long N;

void func(long long result, int bit, long long &count) {　
  	// 全探索のキモ
  　// ベースケースの設定(Nより大きくないとか),参照渡し(countし続ける),
    // 樹形図を書くときの分岐条件を雑に置いておく(7, 5, 3を足すとか)
    
    if (result > N) {
        return;
    }

    if (bit == 0b111) {
        ++count;
    }
  	// bit | 0b001はbit演算のORである
    // 数字の中に7, 5 ,3が含まれているか確認がしやすい
    // 別に配列で数字を使ったかを確認できるけど
  
    // add 3
    func(result * 10 + 3, bit | 0b001, count);

    // add 5
    func(result * 10 + 5, bit | 0b010, count);

    // add 7
    func(result * 10 + 7, bit | 0b100, count);

}

int main() {
    cin >> N;
    long long count = 0;
    func(0, 0, count);
    cout << count  << endl;
}

Compiler output:
a.cc:5:57: error: extended character 　 is not valid in an identifier
    5 | void func(long long result, int bit, long long &count) {　
      |                                                         ^
a.cc:7:3: error: extended character 　 is not valid in an identifier
    7 |   　// ベースケースの設定(Nより大きくないとか),参照渡し(countし続ける),
      |   ^
a.cc: In function 'void func(long long int, int, long long int&)':
a.cc:5:57: error: '\U00003000' was not declared in this scope
    5 | void func(long long result, int bit, long long &count) {　
      |                                                         ^~
Language: C++

N = gets.chomp.to_i

def dfs(s)
  return 0 if s.to_i > N

  res = ['7', '5', '3'].all? { |x| s.include?(x) } ? 1 : 0

  ['7', '5', '3'].each do |i|
    res += dfs(s + i)
  end

  return res
end

puts dfs('0')


Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N = gets.chomp.to_i
      | ^
a.cc:6:52: error: expected unqualified-id before '?' token
    6 |   res = ['7', '5', '3'].all? { |x| s.include?(x) } ? 1 : 0
      |                                                    ^
Language: C++

#include <bits/stdc++.h>
#define int long long
#define F first
#define S second
using namespace std;
int n;
int Dfs(int x) {
  if (x>n) return 0;
  int y=x,ko1=0,ko2=0,ko3=0;
  while (x) {
    if (x%10==3) ko1=1;
    if (x%10==5) ko2=1;
    if (x%10==7) ko3=1;
    x/=10;
  }
  x=y;
  int res=1;
  if (!ko1 || !ko2 || !ko3) res=0;
  res+=Dfs(x*10+3);
  res+=Dfs(x*10+5);
  res+=Dfs(x*10+7);
  return res;
}

int main() {
  cin>>n;
  cout<<Dfs(0)<<endl;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  long N;
  cin >> N;
  long ans = 0;
  long i;
  int chk[3]={0,0,0};
  int wa;
  if(N<357) ans = 0;
  long tmp;
  
  else{
    for(i=357;i<=N;i+=2){
      chk[0]=0;
      chk[1]=0;
      chk[2]=0;
      wa = 1;
      tmp = i;
      while(tmp>0){
        switch(tmp%10){
          case 3:
            chk[0]++;
            break;
          case 5;
            chk[1]++;
            break;
          case 7;
            chk[2]++;
            break;
          default
            wa = 0;
            break;
          }
          tmp /= 10;
        }
      if(chk[0]>0 && chk[1]>0 && chk[2]>0 && wa ==1) ans++;
      }
    }

    cout << ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'else' without a previous 'if'
   13 |   else{
      |   ^~~~
a.cc:25:17: error: expected ':' before ';' token
   25 |           case 5;
      |                 ^
      |                 :
a.cc:28:17: error: expected ':' before ';' token
   28 |           case 7;
      |                 ^
      |                 :
a.cc:31:18: error: expected ':' before 'wa'
   31 |           default
      |                  ^
      |                  :
   32 |             wa = 0;
      |             ~~
Language: C++

#include<bits/stdc++>
using namespace std;
int main(){
  long N;
  cin >> N;
  long ans = 0;
  long i;
  int chk[3]={0,0,0};
  int wa;
  if(N<357) ans = 0;
  long tmp;
  
  else{
    for(i=357;i<=N;i+=2){
      chk[0]=0;
      chk[1]=0;
      chk[2]=0;
      wa = 1;
      tmp = i;
      while(tmp>0){
        switch(tmp%10){
          case 3:
            chk[0]++;
            break;
          case 5;
            chk[1]++;
            break;
          case 7;
            chk[2]++;
            break;
          default
            wa = 0;
            break;
          }
          tmp /= 10;
        }
      if(chk[0]>0 && chk[1]>0 && chk[2]>0 && wa ==1) ans++;
      }
    }

    cout << ans;
}


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

#include <iostream>
#include <algorithm>
#include <cmath>
#include <bits/stdc++.h>

using namespace std;

void dfs(int x){
  check(x);
  if(x <= 1000000000){
    dfs(10*x+3);
    dfs(10*x+5);
    dfs(10*x+7);
  }
}
int main(void){
  dfs(0);
  long long int a;
  cin >> a;
  
  cout << check(a) << endl;
}

Compiler output:
a.cc: In function 'void dfs(int)':
a.cc:9:3: error: 'check' was not declared in this scope
    9 |   check(x);
      |   ^~~~~
a.cc: In function 'int main()':
a.cc:21:11: error: 'check' was not declared in this scope
   21 |   cout << check(a) << endl;
      |           ^~~~~
Language: C++

#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

int dgt[]={7,5,3},n;

int dfs(int i,int d){
	if(!s[i]) return d<=n?1:0;
	int res=0;
	rep(j,3) res+=dfs(i+1,10*d+dgt[j]);
	return res;
}

int main(){
	scanf("%d",n);
	printf("%d\n",dfs(0,0));

	return 0;
}


Compiler output:
a.cc: In function 'int dfs(int, int)':
a.cc:10:13: error: 's' was not declared in this scope
   10 |         if(!s[i]) return d<=n?1:0;
      |             ^
Language: C++

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

int n;

int dfs(ll a) {
    if (n<a)
        return 0;
    int f3,f5,f7;
    f3=f5=f7=0;
    ll t=a;
    while (t) {
        int b=t%10;
        if (t==3)
            f3=1;
        else if (t==5)
            f5=1;
        else if (t==7)
            f7=1;
        t/=10;
    }
    int f=f3&&f5&&f7;
    return c+dfs(a*10+3)+dfs(a*10+5)*dfs(a*10+7);
}

int main() {
    cin>>n;
    cout<<dfs(0)<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int dfs(ll)':
a.cc:24:12: error: 'c' was not declared in this scope
   24 |     return c+dfs(a*10+3)+dfs(a*10+5)*dfs(a*10+7);
      |            ^
Language: C++

#include <algorithm>
#include <climits>
#include <iostream>
#include <string>
#include <utility>
#include<vector>
#include<iomanip>
#include<map>
#include <queue>

using namespace std;

int func(int n,int d){
    int a,b;
    for(int i=0;i<d;i++){
        a = n / 10;
        b = n % 10;
        n = a;
    }
    return b;
}

int ketasuu(int n){
    int digit = 0;
    while(n!=0){
        n /= 10;
        digit++;
    }
    return digit;
}

int main(void){

    int n;
    cin>>n;

    int ans = 0;
    int keta = 3;
    int x;
    int piv;
    int count[3];
    int judge=1;

    for(int i = 357;i<=n;i++){

        //cout<<"i : "<<i<<endl;

        int j=1;
        keta = ketasuu(i);
        // while(judge>0){
        //     cout<<i/pow(10,j)<<endl;
        //     if(i/pow(10, j)>=1) j++;
        //     else{
        //         keta = j;
        //         judge = -1;
        //     }
        //     //if(j>9)break;
        // }

        //cout<<"keta : "<< keta<< endl;

        x = keta;
        count[0] = 0;
        count[1] = 0;
        count[2] = 0;

        while(1){
            piv = func(i, x);//i/(pow(10, x-1));
            //cout<<piv<<endl;
            if(x > 0 && piv!= 3 && piv != 5 && piv!= 7){
                i += pow(10, x-1) - 1;
                break;
            }

            if(piv==3) count[0]++;
            else if(piv==5) count[1]++;
            else if(piv==7) count[2]++;
            x--;
            
            if(x==0 && count[0]!=0 && count[1]!=0 && count[2]!=0){
                ans++;
                //cout<<"ans : "<<i<<endl;
                break;
            }else if(x==0){
                break;
            }
        }
    }
    cout<<ans<<endl;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:71:22: error: 'pow' was not declared in this scope
   71 |                 i += pow(10, x-1) - 1;
      |                      ^~~