#include <bits/stdc++.h> using namespace std; #define turbo cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false) #define inf 1999999999 #define biginf 199999999999999999 #define pb push_back #define mp make_pair #define pii pair<int,int> #define ll long long #define f first #define s second #define int long long signed main() { turbo; int n, res = 0; char c; cin >> n; for(int i = 0; i < 10; i++) { int possible = true; for (int j = 0; j < n / 10; j++) { cin >> c; if (c == 'N') possible = false; } if (possible) res++; } cout << res << "\n"; return 0; }
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 | #include <bits/stdc++.h> using namespace std; #define turbo cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false) #define inf 1999999999 #define biginf 199999999999999999 #define pb push_back #define mp make_pair #define pii pair<int,int> #define ll long long #define f first #define s second #define int long long signed main() { turbo; int n, res = 0; char c; cin >> n; for(int i = 0; i < 10; i++) { int possible = true; for (int j = 0; j < n / 10; j++) { cin >> c; if (c == 'N') possible = false; } if (possible) res++; } cout << res << "\n"; return 0; } |