| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1335428 | SmuggingSpun | Inspections (NOI23_inspections) | C++20 | 6 ms | 440 KiB |
#include<bits/stdc++.h>
#define taskname "B"
using namespace std;
typedef long long ll;
int n, m, q;
namespace sub1{
void solve(){
vector<int>l(m + 1), r(m + 1);
for(int i = 1; i <= m; i++){
cin >> l[i] >> r[i];
}
for(int _ = 0; _ < q; _++){
ll s;
int ans = 0;
cin >> s;
vector<int>last(n + 1, 0);
for(int i = 1, day = 0; i <= m; i++){
for(int j = l[i]; j <= r[i]; j++){
if(last[j] != 0 && s + last[j] <= day){
ans++;
}
last[j] = ++day;
}
}
cout << ans << " ";
}
}
}
int main(){
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
if(fopen(taskname".inp", "r")){
freopen(taskname".inp", "r", stdin);
}
cin >> n >> m >> q;
if(max({n, m, q}) <= 200){
sub1::solve();
}
}컴파일 시 표준 에러 (stderr) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
