# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
15120 |
2015-07-11T12:02:00 Z |
ggoh |
빨간 직사각형 (kriii3_QQ) |
C++ |
|
0 ms |
87876 KB |
#include<cstdio>
int a,b,i,c,j,k,S,g,h,w[3333][3333],z[3333][3333];
char s[3333];
int sum(int x1,int y1,int x2,int y2)
{
return z[x2][y2]-z[x2][y1-1]-z[x1-1][y2]+z[x1-1][y1-1];
}
main()
{
scanf("%d%d",&a,&b);
for(i=1;i<=a;i++)
{
scanf("%s",s);
for(j=0;j<b;j++)
{
if(s[j]=='R')w[i][j+1]=1;
}
}
for(i=1;i<=a;i++)
{
for(j=1;j<=b;j++)
{
if(w[i][j]==0)
{
S+=i*j;
}
}
}
printf("%d",a*(a+1)/2*b*(b+1)/2-S);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
87876 KB |
Output is correct |
2 |
Incorrect |
0 ms |
87876 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |