# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
883654 | vjudge1 | Imena (COCI16_imena) | C++17 | 1 ms | 604 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |