#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int,int> pi;
typedef pair<double,double> pd;
typedef pair<ll,ll> pl;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
int poj = n/10;
int ans = 0;
for(int i = 0; i < 10; i++){
bool sprawdzone = true;
for(int j = poj*i; j < poj*(i+1); j++){
char c;
cin >> c;
if(c == 'N') sprawdzone = false;
}
if(sprawdzone) ans++;
}
cout << ans;
return 0;
}
//g++ -O3 -static -Wall .cpp -std=c++17
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 | #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef pair<int,int> pi; typedef pair<double,double> pd; typedef pair<ll,ll> pl; int main(){ ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; int poj = n/10; int ans = 0; for(int i = 0; i < 10; i++){ bool sprawdzone = true; for(int j = poj*i; j < poj*(i+1); j++){ char c; cin >> c; if(c == 'N') sprawdzone = false; } if(sprawdzone) ans++; } cout << ans; return 0; } //g++ -O3 -static -Wall .cpp -std=c++17 |
English