# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
66411 | KLPP | Klavir (COCI17_klavir) | C++14 | 1071 ms | 19704 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<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)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |