Submission #812403

# Submission time Handle Problem Language Result Execution time Memory
812403 2023-08-07T08:38:42 Z vjudge1 Financial Report (JOI21_financial) C++17
Compilation error
0 ms 0 KB

#include <bits/stdc++.h>



using namespace std;

#define TL ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define rall(s) s.rbegin(),s.rend()
#define all(s) s.begin(),s.end()
#define pb push_back
#define fi first
#define se second
#define ll long long
#define ld long double
#define YES cout<<"YES\n"
#define Yes cout<<"Yes\n"
#define yes cout<<"yes\n"
#define NO cout<<"NO\n"
#define No cout<<"No\n"
#define no cout<<"no\n"


const int N = 400 + 9 , mod = 1e9 + 7;
ll  d[N] = {} , a[N] = {}, dp[5009][5009] ,  b[N] , c[5009][5009] = {} , tree[2 * N];




void solve(){
    ll q , i , j , m ,n, z ,s = 0 , f , l , r , k , x , y , mn  = 1e18 , mx = 0;
    cin>>n>>k;
    for(i = 1; i <= n; i++){
        cin>>a[i];
        st.insert(a[i]);
    }

    for(auto it : st)
        mp[it] = ++s , v.pb(it);
    for(i = 1; i <= n; i++)
        a[i] = mp[a[i]];
    cout<<1<<"\n";
}

int main(){

     TL;
     /*
     #ifndef ONLINE_JUDGE
     freopen("input.txt", "r", stdin);
     freopen("output.txt", "w", stdout);
     #endif
     */
int t = 1;
//cin>>t;

while(t--)
     {
     solve();
     }

}
// Author : حسن

Compilation message

Main.cpp: In function 'void solve()':
Main.cpp:36:9: error: 'st' was not declared in this scope; did you mean 's'?
   36 |         st.insert(a[i]);
      |         ^~
      |         s
Main.cpp:39:19: error: 'st' was not declared in this scope; did you mean 'it'?
   39 |     for(auto it : st)
      |                   ^~
      |                   it
Main.cpp:40:9: error: 'mp' was not declared in this scope; did you mean 'mx'?
   40 |         mp[it] = ++s , v.pb(it);
      |         ^~
      |         mx
Main.cpp:40:24: error: 'v' was not declared in this scope
   40 |         mp[it] = ++s , v.pb(it);
      |                        ^
Main.cpp:42:16: error: 'mp' was not declared in this scope; did you mean 'mx'?
   42 |         a[i] = mp[a[i]];
      |                ^~
      |                mx
Main.cpp:32:8: warning: unused variable 'q' [-Wunused-variable]
   32 |     ll q , i , j , m ,n, z ,s = 0 , f , l , r , k , x , y , mn  = 1e18 , mx = 0;
      |        ^
Main.cpp:32:16: warning: unused variable 'j' [-Wunused-variable]
   32 |     ll q , i , j , m ,n, z ,s = 0 , f , l , r , k , x , y , mn  = 1e18 , mx = 0;
      |                ^
Main.cpp:32:20: warning: unused variable 'm' [-Wunused-variable]
   32 |     ll q , i , j , m ,n, z ,s = 0 , f , l , r , k , x , y , mn  = 1e18 , mx = 0;
      |                    ^
Main.cpp:32:26: warning: unused variable 'z' [-Wunused-variable]
   32 |     ll q , i , j , m ,n, z ,s = 0 , f , l , r , k , x , y , mn  = 1e18 , mx = 0;
      |                          ^
Main.cpp:32:37: warning: unused variable 'f' [-Wunused-variable]
   32 |     ll q , i , j , m ,n, z ,s = 0 , f , l , r , k , x , y , mn  = 1e18 , mx = 0;
      |                                     ^
Main.cpp:32:41: warning: unused variable 'l' [-Wunused-variable]
   32 |     ll q , i , j , m ,n, z ,s = 0 , f , l , r , k , x , y , mn  = 1e18 , mx = 0;
      |                                         ^
Main.cpp:32:45: warning: unused variable 'r' [-Wunused-variable]
   32 |     ll q , i , j , m ,n, z ,s = 0 , f , l , r , k , x , y , mn  = 1e18 , mx = 0;
      |                                             ^
Main.cpp:32:53: warning: unused variable 'x' [-Wunused-variable]
   32 |     ll q , i , j , m ,n, z ,s = 0 , f , l , r , k , x , y , mn  = 1e18 , mx = 0;
      |                                                     ^
Main.cpp:32:57: warning: unused variable 'y' [-Wunused-variable]
   32 |     ll q , i , j , m ,n, z ,s = 0 , f , l , r , k , x , y , mn  = 1e18 , mx = 0;
      |                                                         ^
Main.cpp:32:61: warning: unused variable 'mn' [-Wunused-variable]
   32 |     ll q , i , j , m ,n, z ,s = 0 , f , l , r , k , x , y , mn  = 1e18 , mx = 0;
      |                                                             ^~
Main.cpp:32:74: warning: unused variable 'mx' [-Wunused-variable]
   32 |     ll q , i , j , m ,n, z ,s = 0 , f , l , r , k , x , y , mn  = 1e18 , mx = 0;
      |                                                                          ^~