| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1237458 | _snoopy_ | Magneti (COCI21_magneti) | C++20 | 0 ms | 324 KiB |
#include <bits/stdc++.h>
using namespace std;
int main(){
long long int n, l, i, r, new_l=0;
cin>>n>>l;
for(i=0; i<n; i++){
cin>>r;
}
long long int a=l-(r-1)*(n-1), b=n;
long long int ans;
long long int final_a=1, final_dif_ab=1;
long long int m=1e9+7;
for(i=1; i<=a; i++){
final_a=((final_a%m)*(i%m))%m;
}
for(i=1; i<=a-b; i++){
final_dif_ab=((final_dif_ab%m)*(i%m))%m;
}
ans=final_a/final_dif_ab;
cout<<ans%m<<endl;
return 0;
}
| # | 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... | ||||
