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 <stdio.h>
#include <string.h>
#include <vector>
#include <queue>
#include <stdlib.h>
#include <algorithm>
#include <cmath>
#define INFL 90000000000000000
#define PI 3.141592653589793238462643383279502884
#define SQ(a) ((a)*(a))
#define pb push_back
#define mod 1000000007
typedef long long ll;
typedef long double ld;
typedef double dd;
typedef std::pair<int,int> pii;
using namespace std;
ll in(ll a){
a%=mod;
ll ret=1;
ll x=mod-2;
while(x){
if(x%2){
ret=ret*a%mod;
}
a=a*a%mod;
x/=2;
}
return ret;
}
ll aofb(ll a,ll b){
return a*in(b)%mod;
}
ll h,w,a,b;
int main(){
scanf("%lld%lld",&h,&w);
a=(h+2)%mod*((w+2)%mod)%mod;
printf("%lld",a);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |