| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 118998 | 陈家宝 | T1 表白 | C++ | Accepted | 100 | 144 MS | 244 KB | 540 | 2024-01-03 13:08:15 |
#include<bits/stdc++.h> using namespace std; int maxn=-1,n,m,i,j,ans[11],tmp; inline int read(){ int x=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9'){ if(ch=='-') f=-1; ch=getchar(); } while(ch>='0'&&ch<='9') x=x*10+ch-'0',ch=getchar(); return x*f; } int main(){ n=read(); m=read(); int nm=n*m; ans[1]=nm; for(i=1;i<=nm;i++){ tmp=read(); maxn=max(maxn,tmp); while(tmp>=2){ ans[tmp]++; tmp--; } } cout<< maxn<<endl; for(i=1;i<=maxn;i++) cout<<ans[i]<<endl; return 0; }