Submission #883654

#TimeUsernameProblemLanguageResultExecution timeMemory
883654vjudge1Imena (COCI16_imena)C++17
50 / 50
1 ms604 KiB
#include <bits/stdc++.h> using namespace std; #define sp << " " << #define int long long #define vi vector<int> #define F(xxx,yyy) for (int xxx=1;xxx<=yyy;xxx++) #define pii pair<int,int> const int N = 1e5+1; void solve() { int c; cin >> c; while (c--) { int ans = 0; while (1) { bool cool = 1; string s; cin >> s; bool num = 0; for (auto it : s) if (it >= '0' && it <= '9') num = 1; if (num) cool = 0; if (s[0]< 'A' || s[0] > 'Z') cool = 0; if (cool) ans++; if (s.back() == '.' || s.back() == '?' || s.back() == '!') break; } cout << ans << endl; } } signed main() { ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #ifdef Local freopen("in","r",stdin); freopen("out","w",stdout); #endif int t = 1; //cin >> t; F(i,t) solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...