| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 398902 | Alexandra | Imena (COCI16_imena) | C++14 | 1 ms | 204 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	int n;
	cin >> n;
	int resp=0;
	string s;
	int i=0;
	while (cin >> s) {
		bool name = false;
		if (i==n) {
			break;
		}
		if (s[0] >='A' && s[0]<='Z') {
			name = true;
			for (int j=1; j<s.length(); j++) {
				if (s[s.length()-1]>='0' && s[s.length()-1]<='9') {
					name = false;
					break;
				}
				else if ((s[j]>='a' && s[j]<='z') || (s[s.length()-1]=='.' || s[s.length()-1]=='?' || s[s.length()-1]=='!')) {
					continue;
				}
				else {
					name = false;
					break;
				}
			}
			if (name==true) {
				resp++;
			}
		}
		if (s[s.length()-1]=='.' || s[s.length()-1]=='?' || s[s.length()-1]=='!') {
			cout << resp << endl;
			resp = 0;
			i++;
		}
	}
	return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
