이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <algorithm>
#include <vector>
#include <sstream>
#include <fstream>
#include <iterator>
using namespace std;
#define in cin
#define out cout
#define ll unsigned long long
ll DV = 1000000007LL;
ll pow(ll a, ll b)
{
ll t = a;
ll res = 1LL;
while(b)
{
if(b%2) res = (res * t) % DV;
t = t % DV;
t = (t*t) % DV;
b = b >> 1;
}
return res%DV;
}
ll inv(ll a)
{
return (pow(a, DV-2))%DV;
}
ll mul(ll a, ll b)
{
return ((a%DV)*(b%DV))%DV;
}
ll sub(ll a, ll b)
{
a += 10LL*DV;
b += 10LL*DV;
return ((a%DV)-(b%DV)+10LL*DV)%DV;
}
ll add(ll a, ll b)
{
a += 10LL*DV;
b += 10LL*DV;
return ((a%DV)+(b%DV)+10LL*DV)%DV;
}
int main()
{
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
ll w, h; in >> w >> h;
w %= DV; h %= DV;
ll res = mul(w+2, h+2);
out << res;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |