Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
133213 鲁博睿 19老李吃水果 C++ Wrong Answer 1 MS 268 KB 340 2025-10-17 20:25:16

Tests(0/5):


Code:

#include <bits/stdc++.h> using namespace std; int g[100000]; int main(){ int l,m; cin>>l>>m; int t=0; for(int i=1;i<= m;i++){ int n,e; cin >> n >> e; for(int j=n;j<=e;j++) if(g[j]==0){ t++; g[j]=1; } } cout<<l+1-t; return 0; }


Run Info:

------Input------
5 6 1 2 4 2 2 4 5 1 1 1 2 1 5 1 1 1 2 1 5 1 1 1 2 1 5 1 1 1 2 1
------Answer-----
Y N N N N
------Your output-----
2