AtCoder Grand Contest 019

Submission #1540305

Source codeソースコード

#include<iostream>
#include<math.h>
#include<cctype>
#include<cerrno>
#include<cfloat>
#include<ciso646>
#include<climits>
#include<clocale>
#include<cmath>
#include<csetjmp>
#include<csignal>
#include<cstdarg>
#include<cstddef>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<string>
#include<string.h>
#include<map>
#include<vector>
#include<set>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main()
{
	int q,h,s,d;
	double n;
	vector<int>v;
	cin>>q>>h>>s>>d>>n;
	for(double i1=0;i1<=(int)n*4;i1+=1)
	for(double i2=0;i2<=(int)(n-i1/4)*2;i2+=1)
	for(double i3=0;i3<=(int)(n-i1/4-i2/2)*1;i3+=1)
	for(double i4=0;i4<=(int)(n-i1/4-i2/2-i3)/2;i4+=1)
	if(i1/4+i2/2+i3+i4*2==n)
	v.push_back(i1*q+i2*h+i3*s+i4*d);
	sort(v.begin(),v.end());
	cout<<v[0];
	return 0;
}

Submission

Task問題 A - Ice Tea Store
User nameユーザ名 yishuhan
Created time投稿日時
Language言語 C++14 (GCC 5.4.1)
Status状態 RE
Score得点 0
Source lengthソースコード長 846 Byte
File nameファイル名
Exec time実行時間 ms
Memory usageメモリ使用量 -

Test case

Set

Set name Score得点 / Max score Cases
Sample - sample_01.txt,sample_02.txt,sample_03.txt,sample_04.txt
All 0 / 300 sample_01.txt,sample_02.txt,sample_03.txt,sample_04.txt,sample_01.txt,sample_02.txt,sample_03.txt,sample_04.txt,subtask_1_01.txt,subtask_1_02.txt,subtask_1_03.txt,subtask_1_04.txt,subtask_1_05.txt,subtask_1_06.txt,subtask_1_07.txt,subtask_1_08.txt,subtask_1_09.txt,subtask_1_10.txt,subtask_1_11.txt,subtask_1_12.txt,subtask_1_13.txt,subtask_1_14.txt,subtask_1_15.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
sample_01.txt AC 1 ms 256 KB
sample_02.txt AC 1 ms 256 KB
sample_03.txt AC 1 ms 256 KB
sample_04.txt TLE
subtask_1_01.txt AC 1 ms 256 KB
subtask_1_02.txt RE
subtask_1_03.txt RE
subtask_1_04.txt TLE
subtask_1_05.txt RE
subtask_1_06.txt TLE
subtask_1_07.txt TLE
subtask_1_08.txt RE
subtask_1_09.txt RE
subtask_1_10.txt TLE
subtask_1_11.txt RE
subtask_1_12.txt RE
subtask_1_13.txt RE
subtask_1_14.txt RE
subtask_1_15.txt RE