19702022-12-12 18:41:001478Késéscpp11Elfogadva 50/50374ms23780 KiB
#include <bits/stdc++.h>  
 
using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef pair<int,int> p32;
typedef pair<ll,ll> p64;
typedef pair<double,double> pdd;
typedef vector<ll> v64;
typedef vector<int> v32;
typedef vector<vector<int> > vv32;
typedef vector<vector<ll> > vv64;
typedef vector<vector<p64> > vvp64;
typedef vector<p64> vp64;
typedef vector<p32> vp32;
ll MOD = 998244353;
double eps = 1e-12;
#define forn(i,e) for(ll i = 0; i < e; i++)
#define forsn(i,s,e) for(ll i = s; i < e; i++)
#define rforn(i,s) for(ll i = s; i >= 0; i--)
#define rforsn(i,s,e) for(ll i = s; i >= e; i--)
#define ln "\n"
#define dbg(x) cout<<#x<<" = "<<x<<ln
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define INF 2e18
#define all(x) (x).begin(), (x).end()
#define sz(x) ((ll)(x).size())
 

int main()
{
    //ifstream cin("be.txt");
    int n; cin>>n;
    vector<int> a(n+1);
    multiset<int> s;
    for(int i=1; i<=n; i++){
        cin>>a[i];
        s.insert(a[i]);
    }
    for(int i=1; i<=n; i++){
        s.erase(s.lower_bound(a[i]));
        if(!s.count(a[i])){
            cout<<i;
            break;
        }
    }
    
 
    return 0;
}
RészfeladatÖsszpontTesztVerdiktIdőMemória
base50/50
1Elfogadva0/03ms1844 KiB
2Elfogadva0/013ms4228 KiB
3Elfogadva5/53ms2668 KiB
4Elfogadva5/53ms2620 KiB
5Elfogadva5/5264ms22576 KiB
6Elfogadva5/5246ms22780 KiB
7Elfogadva4/4186ms22780 KiB
8Elfogadva4/4199ms23080 KiB
9Elfogadva4/4312ms23284 KiB
10Elfogadva4/4254ms23472 KiB
11Elfogadva4/4266ms23396 KiB
12Elfogadva2/2224ms23496 KiB
13Elfogadva2/2226ms23468 KiB
14Elfogadva1/1230ms23464 KiB
15Elfogadva1/1300ms23524 KiB
16Elfogadva1/1268ms23592 KiB
17Elfogadva1/1374ms23628 KiB
18Elfogadva1/1340ms23780 KiB
19Elfogadva1/1344ms23756 KiB