Submission #832582

#TimeUsernameProblemLanguageResultExecution timeMemory
832582LiudasInspections (NOI23_inspections)C++17
11 / 100
2072 ms11148 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...