# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
85839 | kraljlavova1 | Mate (COCI18_mate) | C++11 | 1600 ms | 70328 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
typedef long long int llint;
const int MOD=1e9+7,MAXQ=500010,MAXS=2010;
string s,xy[MAXQ];
llint sol[MAXS][26][26];
int q,len,l[MAXQ];
map<string,vector<int> >mp;
int bio[MAXS];
llint povrh[MAXS][MAXS];
void pov(){
povrh[0][0]=1;
for(int i=1;i<MAXS;i++){
for(int j=0;j<MAXS;j++){
if(j==0){
povrh[i][j]=1;
continue;
}
povrh[i][j]=povrh[i-1][j]+povrh[i-1][j-1];
povrh[i][j]%=MOD;
}
}
}
int main(){
pov();
cin>>s;
cin>>q;
len=s.length();
for(int i=0;i<q;i++){
cin>>l[i]>>xy[i];
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |