/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Time Exceeded ≥2085ms ≥2.082 MiB
#3 Time Exceeded ≥2087ms ≥2.07 MiB

Code

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
    ll n;cin>>n;
    vector<ll> p(n);
    for(ll i=0;i<n;i++){
        cin>>p[i];
    }
    ll m;cin>>m;
    vector<ll>q(m);
    for(ll i=0;i<m;i++){
        cin>>q[i];
    }
    for(ll i=0;i<m;i++){
        ll k=1;
        for(int j=0;j<m;j++){
            if(q[i]<q[j]) k++;
            else if(q[i]==q[j] && j<i) k++;
        }
        for(int j=0;j<n;j++){
            if(q[i]<p[j]) k++;
            else if (q[i]==p[j]) k++;
        }
        cout<< k <<" ";
    }

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1049 Combined scoreboard
Contest
Brain Booster #3
Language
C++20 (G++ 13.2.0)
Submit At
2024-05-06 16:40:50
Judged At
2024-11-11 03:32:53
Judged By
Score
5
Total Time
≥2087ms
Peak Memory
≥2.082 MiB