#pragma GCC optimize("Ofast")
#include <iostream>
int main()
{
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
int n; std::cin >> n;
n /= 10;
int t = n;
//std::cout << t << '\n';
char in[20];
int points = 0;
std::cin.ignore();
for(int i = 0; i < 10; i++)
{
std::cin.get(in, t + 1);
// std::cout << in[0] << ' ' << in[1] << '\n';
for(int j = 0; j < t; j++)
{
if('N' == in[j])
goto fail;
}
points++;
fail:
continue;
}
std::cout << points << '\n';
}
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 | #pragma GCC optimize("Ofast") #include <iostream> int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); std::cout.tie(nullptr); int n; std::cin >> n; n /= 10; int t = n; //std::cout << t << '\n'; char in[20]; int points = 0; std::cin.ignore(); for(int i = 0; i < 10; i++) { std::cin.get(in, t + 1); // std::cout << in[0] << ' ' << in[1] << '\n'; for(int j = 0; j < t; j++) { if('N' == in[j]) goto fail; } points++; fail: continue; } std::cout << points << '\n'; } |
English