| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 74731 | 邢逸轩 | 听音乐 | C++ | Wrong Answer | 0 | 0 MS | 260 KB | 398 | 2023-05-28 16:57:12 |
#include<bits/stdc++.h> using namespace std; int to[10010],a[10010],n,m,hj,lt; int main(){ cin>>n>>m; for(int i=1;i<=m;i++) cin>>a[i]; for(int i=1;i<=m;i++){ if(!to[a[i]]){ to[a[i]]=1,hj++; }else{ hj++; for(int j=1;j<=m;j++){ if(a[j]==a[i]){ lt=j; break; } } break; } } if(hj==n) cout<<n; else{ cout<<hj-lt; } return 0; }