# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
397533 | Iwanttobreakfree | Imena (COCI16_imena) | C++98 | 1 ms | 204 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 <iostream>
#include <vector>
#include <string>
using namespace std;
int main(){
int n,j=0;
bool num;
string str;
cin>>n;
vector<int>v(n,0);
while(cin>>str){
int k=str.length();
if(str[0]>='A'&&str[0]<='Z'){
num=false;
for(int i=1;i<k;i++){
if(str[i]>='0'&&str[i]<='9')num=true;
if(str[i]>='A'&&str[i]<='Z')num=true;
}
if(!num)v[j]++;
}
if(str[k-1]=='.'||str[k-1]=='?'||str[k-1]=='!')j++;
if(j==n)break;
}
for(int i=0;i<n;i++)cout<<v[i]<<'\n';
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |