# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
782950 | devariaota | The Xana coup (BOI21_xanadu) | C++17 | 1 ms | 468 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 <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);
}
# | 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... |