83892024-01-15 13:37:27gonterarmin20G (40 pont)cpp17Time limit exceeded 18/40444ms3752 KiB
#include <iostream>

using namespace std;

int main()
{
    int n,q;
    cin>>n>>q;
    int t[n];
    for (int i=0;i<n;i++) {
        cin>>t[i];
    }
    for (int i=0;i<q;i++) {
        int m,sdb=0;
        cin>>m;
        for (int j=0;j<n && t[j]<=m;j++) {
            sdb++;
        }
        cout<<sdb+1<<endl;
    }
}
SubtaskSumTestVerdictTimeMemory
base18/40
1Accepted0/03ms1880 KiB
2Time limit exceeded0/0377ms2900 KiB
3Accepted2/23ms2068 KiB
4Accepted2/23ms2408 KiB
5Accepted2/24ms2356 KiB
6Accepted2/28ms2600 KiB
7Accepted3/36ms2768 KiB
8Time limit exceeded0/3400ms2484 KiB
9Accepted3/3199ms3620 KiB
10Time limit exceeded0/3444ms2436 KiB
11Time limit exceeded0/4368ms2436 KiB
12Accepted4/4114ms3752 KiB
13Time limit exceeded0/4356ms2848 KiB
14Time limit exceeded0/4361ms2992 KiB
15Time limit exceeded0/4368ms3032 KiB