Submission #66411

#TimeUsernameProblemLanguageResultExecution timeMemory
66411KLPPKlavir (COCI17_klavir)C++14
0 / 160
1071 ms19704 KiB
#include<iostream> #include<vector> #include<queue> #include<algorithm> #include<stdio.h> using namespace std; typedef long long int lld; #define MOD 1000000007 int main(){ int n,m; cin>>n>>m; int arr[m]; for(int i=0;i<m;i++)cin>>arr[i]; int DP[m]; DP[0]=n; int Z[m]; Z[0]=-1; for(int i=1;i<m;i++){ Z[i]=0; for(int j=0;j<i && arr[j]==arr[i];j++){ Z[i]++; } } lld a=m; cout<<a<<endl; for(int i=1;i<m;i++){ a*=Z[i]+m; a%=MOD; cout<<a<<endl; } return 0; }

Compilation message (stderr)

klavir.cpp: In function 'int main()':
klavir.cpp:15:6: warning: variable 'DP' set but not used [-Wunused-but-set-variable]
  int DP[m];
      ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...