| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 41811 | 老师 | 字符串替换 | C++ | Compile Error | 0 | 0 MS | 0 KB | 337 | 2022-06-18 15:03:00 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,s,xi[200]={0},yi[200]={0},ans=0; cin>>n>>s; for(int i=1;i<n;i++) s=(s*345)%19997,xi[97+s%26]++; for(int i=1;i<n;i++) s=(s*345)%19997,yi[97+s%26]++; for(int i=0;i<=199;i++){ ans+=(yi[i]-xi[i]>0?yi[i]-x[i]:0); } cout<<ans<<endl; return 0; }