Submission #782950

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7829502023-07-14 12:21:04devariaotaThe Xana coup (BOI21_xanadu)C++17
0 / 100
1 ms468 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,m;
ll a[2005],b[2005];
ll pref[2005],suff[2005];
ll mod=1e9+7;
ll jawab;
vector <ll> ans;
ll fact (ll n){
if (n==0) return 1;
return n%mod*fact(n-1)%mod;
}
ll kali (ll a, ll b){
return (a*b)%mod;
}
ll simpan=1;
void fexpo(ll a, ll b){
// cout<<a<<" "<<b<<endl;
if (b==1) {
simpan=kali(simpan,a);
return;
}
if (b%2==0){
fexpo(kali(a,a),b/2);
}
else{
simpan=kali(simpan,a);
fexpo(kali(a,a),(b-1)/2);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...