# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
19764 |
2016-02-25T05:23:07 Z |
camille |
창문 (kriii4_C) |
C++ |
|
1000 ms |
1720 KB |
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
typedef long long lld;
lld a,b,mod=1e9+7,ret,s,c;
lld foo(lld idx){
if(idx==1) return s;
lld k = foo(idx/2)%mod;
if(idx%2) return (((k*k)%mod)*s)%mod;
return (k*k)%mod;
}
int main(){
cin>>a>>b;
s = ((a*(a+1))/2) * ((b*(b+1))/2);
s%=mod;
c=foo(1e9+5)%mod;
for(lld dy=0; dy<a; dy++){
for(lld dx=0; dx<b; dx++){
for(lld ky=1; ky<=a; ky++){
for(lld kx=1; kx<=b; kx++){
if(dy+ky>a || dx+kx>b) break;
ret+=(ky)*(kx)*9;
ret%=mod;
}
}
}
}
cout<<(ret*c)%mod<<endl;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1720 KB |
Output is correct |
2 |
Correct |
0 ms |
1720 KB |
Output is correct |
3 |
Correct |
0 ms |
1720 KB |
Output is correct |
4 |
Correct |
0 ms |
1720 KB |
Output is correct |
5 |
Correct |
14 ms |
1720 KB |
Output is correct |
6 |
Correct |
0 ms |
1720 KB |
Output is correct |
7 |
Correct |
9 ms |
1720 KB |
Output is correct |
8 |
Correct |
0 ms |
1720 KB |
Output is correct |
9 |
Correct |
2 ms |
1720 KB |
Output is correct |
10 |
Correct |
0 ms |
1720 KB |
Output is correct |
11 |
Correct |
0 ms |
1720 KB |
Output is correct |
12 |
Correct |
0 ms |
1720 KB |
Output is correct |
13 |
Correct |
11 ms |
1720 KB |
Output is correct |
14 |
Correct |
2 ms |
1720 KB |
Output is correct |
15 |
Correct |
11 ms |
1720 KB |
Output is correct |
16 |
Correct |
12 ms |
1720 KB |
Output is correct |
17 |
Correct |
29 ms |
1720 KB |
Output is correct |
18 |
Correct |
30 ms |
1720 KB |
Output is correct |
19 |
Correct |
30 ms |
1720 KB |
Output is correct |
20 |
Correct |
31 ms |
1720 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1000 ms |
1716 KB |
Program timed out |
2 |
Halted |
0 ms |
0 KB |
- |