# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19005 | kriii | 로봇 (kriii4_F) | C++14 | 257 ms | 524288 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 <stdio.h>
const long long mod = 1000000007;
long long pow(long long a, long long p)
{
a %= mod;
p = (p % (mod - 1) + mod - 1) % (mod - 1);
long long r = 1;
while (p){
if (p & 1) r = r * a % mod;
a = a * a % mod;
p /= 2;
}
return r;
}
int dx[4] = {1,0,-1,0};
int dy[4] = {0,1,0,-1};
int n,l,m,r;
long long sum;
void go(int a, int x, int y, int d, long long pr)
{
if (pr == 0) return;
if (a == n){
sum = (sum + (x * x + y * y) * pr % mod + mod) % mod;
}
else{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |