Submission #85841

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
858412018-11-21 22:10:50kraljlavova1Mate (COCI18_mate)C++11
80 / 100
2077 ms102784 KiB
#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;
map<pair<string,int>,int>bio;
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(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);cout.tie(NULL);
pov();
cin>>s;
cin>>q;
len=s.length();
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

mate.cpp: In function 'int main()':
mate.cpp:43:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for(int k=0;k<mp[a].size();k++){
                ~^~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...