-
Notifications
You must be signed in to change notification settings - Fork 0
/
epic_dance_off.cpp
57 lines (42 loc) · 901 Bytes
/
epic_dance_off.cpp
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
48
49
50
51
52
53
54
55
56
57
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<cmath>
#include<climits>
#include<queue>
#define FOR(i,a,b) for(int i = a; i < b; i++)
#define FORD(i,a,b) for(int i = b; i >= a; i--)
#define FORE(i,a,b) for(int i = a; i <=b; i++)
#define SIZE(x) x.size()
using namespace std;
typedef vector<int> vi;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int R, C;
cin >> R >> C;
char img[R][C];
FOR(i,0,R){
FOR(j,0,C){
char input;
cin >> input;
img[i][j] = input;
}
}
int frames = 1;
FOR(i,0,C){
bool flag = false;
FOR(j,0,R){
if(img[j][i] == '$'){
flag = true;
}
}
if(!flag){
frames += 1;
flag = false;
}
}
cout << frames << endl;
return 0;
}