Submission #104718


Source Code Expand

Copy
#include<iostream>

using namespace std;

enum{
	MOUSHOBI,
	MANATSUBI,
	NATSUBI,
	NETTAIYA,
	HUYUBI,
	MAHUYUBI
};

int regist_temp(double max,double min,int* temps)
{
	if(max >= 35)
	{
		temps[MOUSHOBI]++;
	}else if(max >= 30)
	{
		temps[MANATSUBI]++;
	}else if(max >= 25)
	{
		temps[NATSUBI]++;
	}
	if(min >= 25)
	{
		temps[NETTAIYA]++;
	}
	if(max < 0)
	{
		temps[MAHUYUBI]++;
	}else if(min < 0)
	{
		temps[HUYUBI]++;
	}
}
int main(void)
{
	int n;
	double t1,t2;
	int temps[6] = {0};
	cin >> n;
	for(int i=0;i<n;i++)
	{
		cin >> t1 >> t2;
		regist_temp(t1,t2,temps);
	}
	for(int i=0;i<6;i++)
	{
		cout << temps[i];
		if(i==6)
		{
			cout << endl;
		}else{
			cout << ' ';
		}
	}
}

Submission Info

Submission Time
Task B - 真冬日?真夏日?
User brown2nvb
Language C++ (G++ 4.6.4)
Score 0
Code Size 741 Byte
Status
Exec Time 29 ms
Memory 936 KB

Test Cases

Set Name Score / Max Score Test Cases
All 0 / 100 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, test_00.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt
Case Name Status Exec Time Memory
00_sample_01.txt 21 ms 936 KB
00_sample_02.txt 21 ms 932 KB
00_sample_03.txt 21 ms 808 KB
test_00.txt 21 ms 804 KB
test_01.txt 21 ms 680 KB
test_02.txt 21 ms 804 KB
test_03.txt 21 ms 932 KB
test_04.txt 21 ms 932 KB
test_05.txt 21 ms 928 KB
test_06.txt 21 ms 924 KB
test_07.txt 23 ms 796 KB
test_08.txt 28 ms 808 KB
test_09.txt 26 ms 808 KB
test_10.txt 27 ms 808 KB
test_11.txt 29 ms 756 KB
test_12.txt 27 ms 816 KB
test_13.txt 26 ms 924 KB