Language: C++

//  Created by conan1024hao in 2019.
//  Copyright © 2019 conan1024hao. All rights reserved.
//  専用ライブラリです、自由にコピーして構いません。
//  感谢看我的代码！Wechat:conan1024hao QQ:810396815
#pragma GCC optimize ("O3")
#include <iostream>
#include <iomanip>
#include <istream>
#include <ostream>
#include <sstream>
#include <iterator>
#include <vector>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <utility>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <ctime>
#include <cctype>
#include <cstdlib>
#define INF 10e16
#define MOD 1000000007
#define rep(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define mmax(x,y)(x>y?x:y)
#define mmin(x,y)(x<y?x:y)
#define chmax(x,y) x=mmax(x,y)
#define chmin(x,y) x=mmin(x,y)
#define all(x) (x).begin(),(x).end()
#define siz(x) (ll)(x).size()
#define PI acos(-1.0)
using namespace std;
using Int=int_fast64_t;
typedef long long int ll;
typedef pair<ll,ll>P;
long long GCD(long long a, long long b) { return b ? GCD(b, a%b) : a; }
long long LCM(long long a, long long b)  {return a/GCD(a,b)*b;}
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
ll cmp(pair<ll,string>a,pair<ll,string> b){
        if(a.fi!=b.fi)
        return a.fi<b.fi;
        else
        return a.se<b.se;
}

//---------------------------------------------------------------------------

//---------------------------------------------------------------------------
int main(){//問題をちゃんと見ろ!!!!!!!!!!!!!!!!!      llか??????????
    cin.tie(0);
    ios::sync_with_stdio(false);
    //-------------------------------
    string s;cin>>s;
    int i0=0,i1=1,i2=2,i3=3;
    int a=s[0]-'0',b=s[1]-'0',c=s[2]-'0',d=s[3]-'0';
    for(int bit=0;bit < (1<<i3); bit++)　//(1<<n)-1是全部都用的状态
    {
        int sum=a;
        if(bit & (1<<i0))　//i∈bitかどうか
            sum+=b;
        else
            sum-=b;
        if(bit & (1<<i1))　//i∈bitかどうか
            sum+=c;
        else
            sum-=c;
        if(bit & (1<<i2))　//i∈bitかどうか
            sum+=d;
        else
            sum-=d;
        if(sum==7){
            cout<<a;
            if(bit & (1<<i0))
                cout<<'+';
            else
                cout<<'-';
            cout<<b;
            if(bit & (1<<i1))
                cout<<'+';
            else
                cout<<'-';
            cout<<c;
            if(bit & (1<<i2))
                cout<<'+';
            else
                cout<<'-';
            cout<<d<<'='<<sum<<endl;
            return 0;
        }
    }
    

    
    //-------------------------------
    return 0;
}
//---------------------------------------------------------------------------


Compiler output:
a.cc:68:40: error: extended character 　 is not valid in an identifier
   68 |     for(int bit=0;bit < (1<<i3); bit++)　//(1<<n)-1是全部都用的状态
      |                                        ^
a.cc:71:26: error: extended character 　 is not valid in an identifier
   71 |         if(bit & (1<<i0))　//i∈bitかどうか
      |                          ^
a.cc:75:26: error: extended character 　 is not valid in an identifier
   75 |         if(bit & (1<<i1))　//i∈bitかどうか
      |                          ^
a.cc:79:26: error: extended character 　 is not valid in an identifier
   79 |         if(bit & (1<<i2))　//i∈bitかどうか
      |                          ^
a.cc:44:11: error: 'int_fast64_t' does not name a type
   44 | using Int=int_fast64_t;
      |           ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:68:40: error: '\U00003000' was not declared in this scope
   68 |     for(int bit=0;bit < (1<<i3); bit++)　//(1<<n)-1是全部都用的状态
      |                                        ^~