Submission #885734

# Submission time Handle Problem Language Result Execution time Memory
885734 2023-12-10T14:58:36 Z Ninedesu Pilot (NOI19_pilot) C++14
28 / 100
32 ms 4700 KB
#include<bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
using namespace std;

const int N=1e6+1;
int n,q;
int arr[N];
pii qst[N];

int main(){
    ios_base::sync_with_stdio(0),cin.tie(0);
    cin >> n >> q;
    for(int i=1; i<=n; i++){
        cin >> arr[i];
    }
    while(q--){
        int h;
        cin >> h;
        int idx=upper_bound(arr+1,arr+n+1,h)-arr-1;
        cout << ((ll)idx*(idx+1))/2 << '\n';
    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 8 ms 2392 KB Output is correct
2 Correct 7 ms 2396 KB Output is correct
3 Correct 6 ms 2396 KB Output is correct
4 Correct 7 ms 2396 KB Output is correct
5 Correct 6 ms 2404 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 23 ms 3312 KB Output is correct
2 Correct 25 ms 3412 KB Output is correct
3 Correct 25 ms 3408 KB Output is correct
4 Correct 32 ms 3512 KB Output is correct
5 Correct 25 ms 3420 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 28 ms 3408 KB Output is correct
2 Correct 31 ms 4532 KB Output is correct
3 Correct 30 ms 4696 KB Output is correct
4 Correct 29 ms 4700 KB Output is correct
5 Correct 30 ms 4692 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -