Submission #00033


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,n) for(int i=0;i<n;i++)
#define why(n,x) int n;while(cin >>n,n!=x)
#define iFOR(i,x,n)for(int i=x;i<n;i++)
//#define cin cin<<
//#define cout cout<<
//#define fin <<'\n'
int dx[]={1,0,-1,0};
int dy[]={0,-1,0,1};
int dxx[]={1,1,0,-1,-1,-1,0,1};
int dyy[]={0,-1,-1,-1,0,1,1,1};
bool inside(int x,int y,int w,int h){
return (x>=0 && y>=0 && x<w && y<h);}
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vit;
typedef map<string,int> mstit;
//typedef priority-queue<int> pqit;
int main(){
// cin.tie(0), ios::sync_with_stdio(false);
int h,w,yh,yw;
int sya=0,con,over=0;
char happa[1005][1005];
cin >>h>>w>>yh>>yw;
FOR(i,yh){
cin >>happa[i];
FOR(j,yw){
if(happa[i][j]=='#') sya++;
}
}
FOR(i,w){
con=0;
FOR(j,h){
if(happa[i][j]=='#') con++;
}
if(con>h) over+=con-h;
}
cout <<sya-over<<endl;
return 0;
}

ステータス

項目 データ
問題 0003 - 雛ちゃんとふろー
ユーザー名 ei1821
投稿日時 2018-08-22 10:42:43
言語 C++11
状態 Wrong Answer
得点 0
ソースコード長 996 Byte
最大実行時間 42 ms
最大メモリ使用量 3436 KB

セット

セット 得点 Cases
1 ALL 0 / 10 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
Input01 WA 42 ms 1376 KB
1
Input02 WA 38 ms 1716 KB
1
Input03 AC 29 ms 904 KB
1
Input04 WA 21 ms 1212 KB
1
Input05 AC 35 ms 1524 KB
1
Input06 AC 24 ms 1844 KB
1
Input07 AC 28 ms 1904 KB
1
Input08 AC 31 ms 2100 KB
1
Input09 AC 26 ms 2552 KB
1
Input10 AC 29 ms 1868 KB
1
Input11 AC 23 ms 1916 KB
1
Input12 AC 27 ms 2092 KB
1
Input13 AC 34 ms 2404 KB
1
Input14 WA 26 ms 2592 KB
1
Input15 WA 25 ms 3040 KB
1
Input16 WA 22 ms 3232 KB
1
Input17 WA 27 ms 3436 KB
1
Input18 AC 21 ms 2612 KB
1
Input19 WA 19 ms 2784 KB
1
Input20 WA 21 ms 3212 KB
1