Submission #832582

# Submission time Handle Problem Language Result Execution time Memory
832582 2023-08-21T11:59:17 Z Liudas Inspections (NOI23_inspections) C++17
11 / 100
2000 ms 11148 KB
#include <iostream>
#include <vector>
#include <set>
using namespace std;
int main(){
    int N, Q, M;
    cin >> N >> M >> Q;
    vector<vector<int>> arr(N);
    int day = 0;
    for(int i = 0; i < M; i ++){
        int a, b;
        cin >> a >> b;
        for(int j = a-1; j < b; j ++){
            arr[j].push_back(day++);
        }
    }
    for(int i = 0; i < Q; i ++){
        int q;
        cin >> q;
        int c = 0;
        for(int j = 0; j < N; j ++){
            if(!arr[j].size())continue;
            int s = arr[j][0];
            for(int k : arr[j]){
                if(k != arr[j][0] && k-s > q){
                    c++;
                }
                s = k;
            }
        }
        cout << c << " ";
    }
    cout << endl;
    
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 300 KB Output is correct
4 Correct 3 ms 296 KB Output is correct
5 Correct 3 ms 340 KB Output is correct
6 Correct 1 ms 300 KB Output is correct
7 Correct 5 ms 468 KB Output is correct
8 Correct 3 ms 340 KB Output is correct
9 Correct 5 ms 340 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 304 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 300 KB Output is correct
4 Correct 3 ms 296 KB Output is correct
5 Correct 3 ms 340 KB Output is correct
6 Correct 1 ms 300 KB Output is correct
7 Correct 5 ms 468 KB Output is correct
8 Correct 3 ms 340 KB Output is correct
9 Correct 5 ms 340 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 304 KB Output is correct
13 Execution timed out 2068 ms 7380 KB Time limit exceeded
14 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 5 ms 340 KB Output is correct
3 Execution timed out 2072 ms 11148 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 300 KB Output is correct
4 Correct 3 ms 296 KB Output is correct
5 Correct 3 ms 340 KB Output is correct
6 Correct 1 ms 300 KB Output is correct
7 Correct 5 ms 468 KB Output is correct
8 Correct 3 ms 340 KB Output is correct
9 Correct 5 ms 340 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 304 KB Output is correct
13 Execution timed out 2068 ms 7380 KB Time limit exceeded
14 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 300 KB Output is correct
4 Correct 3 ms 296 KB Output is correct
5 Correct 3 ms 340 KB Output is correct
6 Correct 1 ms 300 KB Output is correct
7 Correct 5 ms 468 KB Output is correct
8 Correct 3 ms 340 KB Output is correct
9 Correct 5 ms 340 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 304 KB Output is correct
13 Execution timed out 2068 ms 7380 KB Time limit exceeded
14 Halted 0 ms 0 KB -