# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
397529 | Iwanttobreakfree | Imena (COCI16_imena) | C++98 | 1 ms | 204 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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=0;i<k;i++){
if(str[i]>='1'&&str[i]<='9')num=true;
if(str[0]>='A'&&str[0]<='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... |