結果

問題 No.2714 Amaou
コンテスト
ユーザー Maeda
提出日時 2025-03-19 09:54:23
言語 C
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 766 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 159 ms
コンパイル使用メモリ 38,340 KB
最終ジャッジ日時 2026-02-22 13:19:41
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 2
other RE * 26
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>
#include <string.h>

void main(void){
	const char goodComment[4][100] = {"akai","marui","okii","umai"};
	int n = 0;
	scanf("%d",&n);
	char comment[100] = "a";
	int amaouCount = 0;
	for(int i = 0 ; i < n ; i++){
		int commentCount[4] = {0,0,0,0}; 
		for(int j = 0 ; j < 4 ; j++){
			scanf("%s",comment);
			if(strcmp(comment,goodComment[0]) == 0){
				commentCount[0]++;
			}else if(strcmp(comment,goodComment[1]) == 0){
				commentCount[1]++;
			}else if(strcmp(comment,goodComment[2]) == 0){
				commentCount[2]++;
			}else if(strcmp(comment,goodComment[3]) == 0){
				commentCount[3]++;
			}
		}
		for(int i = 0 ; i < 4;i++){
			if(commentCount[i] != 1){
				break;
			}
			if(i == 3){
				amaouCount++;
			}
		}
	}
	
	printf("%d",amaouCount);
}
0