Submission #20201

# Submission time Handle Problem Language Result Execution time Memory
20201 2016-03-14T01:50:45 Z exqt 창문 (kriii4_C) C++
100 / 100
2 ms 0 KB
#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
1 Correct 1 ms 0 KB Output is correct
2 Correct 1 ms 0 KB Output is correct
3 Correct 1 ms 0 KB Output is correct
4 Correct 1 ms 0 KB Output is correct
5 Correct 1 ms 0 KB Output is correct
6 Correct 1 ms 0 KB Output is correct
7 Correct 1 ms 0 KB Output is correct
8 Correct 1 ms 0 KB Output is correct
9 Correct 1 ms 0 KB Output is correct
10 Correct 1 ms 0 KB Output is correct
11 Correct 1 ms 0 KB Output is correct
12 Correct 1 ms 0 KB Output is correct
13 Correct 1 ms 0 KB Output is correct
14 Correct 1 ms 0 KB Output is correct
15 Correct 1 ms 0 KB Output is correct
16 Correct 1 ms 0 KB Output is correct
17 Correct 1 ms 0 KB Output is correct
18 Correct 1 ms 0 KB Output is correct
19 Correct 1 ms 0 KB Output is correct
20 Correct 1 ms 0 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 0 KB Output is correct
2 Correct 1 ms 0 KB Output is correct
3 Correct 1 ms 0 KB Output is correct
4 Correct 2 ms 0 KB Output is correct
5 Correct 2 ms 0 KB Output is correct
6 Correct 2 ms 0 KB Output is correct
7 Correct 2 ms 0 KB Output is correct
8 Correct 1 ms 0 KB Output is correct
9 Correct 1 ms 0 KB Output is correct
10 Correct 1 ms 0 KB Output is correct
11 Correct 1 ms 0 KB Output is correct
12 Correct 1 ms 0 KB Output is correct
13 Correct 1 ms 0 KB Output is correct
14 Correct 1 ms 0 KB Output is correct
15 Correct 1 ms 0 KB Output is correct
16 Correct 1 ms 0 KB Output is correct
17 Correct 1 ms 0 KB Output is correct
18 Correct 1 ms 0 KB Output is correct
19 Correct 1 ms 0 KB Output is correct
20 Correct 1 ms 0 KB Output is correct