Submission #108583


Source Code Expand

#include <iostream>
#include <string>
#include <math.h>
#include <algorithm>
using namespace std;

double round(double piyo)
{
	double dst;
	dst = piyo * pow(10, -2 - 1);
	dst = (double)(int)(dst + 0.5);
	return dst * pow(10, 2 + 1);
}

int main()
{
	int deg,dis;
	cin>>deg>>dis;

	double fuga = deg / 10.0;
	double foo = dis / 60.0;

	double hoge = round(foo);

	double a = 33.75;
	double b = 22.50;

	if(hoge <= 0.2){
		cout<<"C"<<" "<<"0"<<endl;
		return 0;
	}
	
	if(fuga >= 11.25 && fuga < a)
		cout<<"NNE"<<" ";
	else if(fuga > a && fuga < a+b)
		cout<<"NE"<<" ";
	else if(fuga > a+b && fuga < a+b*2)
		cout<<"ENE"<<" ";
	else if(fuga > a+b*2 && fuga < a+b*3)
		cout<<"E"<<" ";
	else if(fuga > a+b*3 && fuga < a+b*4)
		cout<<"ESE"<<" ";
	else if(fuga > a+b*4 && fuga < a+b*5)
		cout<<"SE"<<" ";
	else if(fuga > a+b*5 && fuga < a+b*6)
		cout<<"SSE"<<" ";
	else if(fuga > a+b*6 && fuga < a+b*7)
		cout<<"S"<<" ";
	else if(fuga > a+b*7 && fuga < a+b*8)
		cout<<"SSW"<<" ";
	else if(fuga > a+b*8 && fuga < a+b*9)
		cout<<"SW"<<" ";
	else if(fuga > a+b*9 && fuga < a+b*10)
		cout<<"WSW"<<" ";
	else if(fuga > a+b*10 && fuga < a+b*11)
		cout<<"W"<<" ";
	else if(fuga > a+b*11 && fuga < a+b*12)
		cout<<"WNW"<<" ";
	else if(fuga > a+b*12 && fuga < a+b*13)
		cout<<"NW"<<" ";
	else if(fuga > a+b*13 && fuga < a+b*14)
		cout<<"NNW"<<" ";
	else
		cout<<"N"<<" ";

	if(hoge >= 0.3 && hoge <= 1.5)
		cout<<"1"<<endl;
	else if(hoge >= 1.6 && hoge <= 3.3)
		cout<<"2"<<endl;
	else if(hoge >= 3.4 && hoge <= 5.4)
		cout<<"3"<<endl;
	else if(hoge >= 5.5 && hoge <= 7.9)
		cout<<"4"<<endl;
	else if(hoge >= 8.0 && hoge <= 10.7)
		cout<<"5"<<endl;
	else if(hoge >= 10.8 && hoge <= 13.8)
		cout<<"6"<<endl;
	else if(hoge >= 13.9 && hoge <= 17.1)
		cout<<"7"<<endl;
	else if(hoge >= 17.2 && hoge <= 20.7)
		cout<<"8"<<endl;
	else if(hoge >= 20.8 && hoge <= 24.4)
		cout<<"9"<<endl;
	else if(hoge >= 24.5 && hoge <= 28.4)
		cout<<"10"<<endl;
	else if(hoge >= 28.5 && hoge <= 32.6)
		cout<<"11"<<endl;
	else if(hoge >= 32.7)
		cout<<"12"<<endl;

	return 0;
}

Submission Info

Submission Time
Task A - 積雪深差
User spade630
Language C++ (G++ 4.6.4)
Score 0
Code Size 2132 Byte
Status WA
Exec Time 23 ms
Memory 920 KB

Judge Result

Set Name all
Score / Max Score 0 / 100
Status
WA × 20
Set Name Test Cases
all 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.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, test_14.txt, test_15.txt, test_16.txt, test_17.txt
Case Name Status Exec Time Memory
00_sample_01.txt WA 21 ms 792 KB
00_sample_02.txt WA 21 ms 920 KB
00_sample_03.txt WA 23 ms 792 KB
test_01.txt WA 22 ms 800 KB
test_02.txt WA 23 ms 796 KB
test_03.txt WA 21 ms 788 KB
test_04.txt WA 19 ms 788 KB
test_05.txt WA 22 ms 796 KB
test_06.txt WA 22 ms 800 KB
test_07.txt WA 21 ms 796 KB
test_08.txt WA 21 ms 716 KB
test_09.txt WA 21 ms 800 KB
test_10.txt WA 21 ms 796 KB
test_11.txt WA 22 ms 800 KB
test_12.txt WA 21 ms 796 KB
test_13.txt WA 23 ms 796 KB
test_14.txt WA 21 ms 796 KB
test_15.txt WA 21 ms 700 KB
test_16.txt WA 19 ms 796 KB
test_17.txt WA 19 ms 920 KB