Submission #1818853


Source Code Expand

#include "bits/stdc++.h"
using namespace std;

typedef long long ll;
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)


int dx4[] = { 1, -1, 0, 0 };
int dy4[] = { 0, 0, 1, -1 };

int dx8[] = { 1, -1, 0, 0, 1, 1, -1, -1 };
int dy8[] = { 0, 0, -1, 1, -1, 1, -1, 1 };

int mDays[] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };

ll A, B, C, D, E, F, G, H, I, J, K, L, M,
   N, O, P, Q, R, S, T, U, V, W, X, Y, Z;

template <typename T>
vector<T> INP(ll n)
{
	vector<T> x;
	REP(i, n) {
		T tmp; cin >> tmp;
		x.push_back(tmp);
	}
	return move(x);
}
//* n文字1行の文字列を入力,一文字ごとの配列を返す
vector<char> SPRIT_STRING(ll n)
{
	string str; cin >> str;
	vector<char> cs(n);
	REP(i, n) cs[i] = str[i];
	return move(cs);
}
//* 文字列中から文字列を検索して別の文字列に置換する
void strReplace(std::string& str, const std::string& from, const std::string& to) {
	std::string::size_type pos = 0;
	while (pos = str.find(from, pos), pos != std::string::npos) {
		str.replace(pos, from.length(), to);
		pos += to.length();
	}
}
//* 素数判定 is_prime<unsigned>(N)
template<typename T, std::enable_if_t<std::is_unsigned<T>::value, std::nullptr_t> = nullptr>
bool is_prime(const T n) {
	if (n < 4) return n == 2 || n == 3;
	if (n % 2 == 0 || n % 3 == 0 || (n % 6 != 1 && n % 6 != 5)) return false;
	for (T i = 5; i * i <= n; i += 6) if (n % i == 0 || n % (i + 2) == 0) return false;
	return true;
}
//* 座標nx, nyがWidth,Heightの領域内にあるかどうかのチェック
inline bool rangeCheck2D(int nx, int ny, int Width, int Height)
{
	return nx >= 0 and nx < Width and ny >= 0 and ny < Height;
}

namespace arc030a {
	void arc030a()
	{

	}
}

namespace arc029a {
	void arc029a()
	{

	}
}

namespace arc028a {
	void arc028a()
	{

	}
}

namespace arc027a {
	void arc027a()
	{
		cin >> H >> M;
		cout << 60 * 18 - 60 * H - M << endl;
	}
}

namespace arc026a {
	void arc026a()
	{
		cin >> N >> A >> B;
		cout << ((N >= 5) ? (B * 5 + (N - 5) * A) : (B * N)) << endl;;
	}
}

namespace arc013b {
	void arc013b()
	{

	}
}

int main()
{
	arc027a::arc027a();
	//arc013b::arc013b();
	return 0;
}

Submission Info

Submission Time
Task A - 門限
User xoke
Language C++14 (GCC 5.4.1)
Score 100
Code Size 2337 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 4
AC × 20
Set Name Test Cases
Sample subtask0-sample01.txt, subtask0-sample02.txt, subtask0-sample03.txt, subtask0-sample04.txt
All subtask0-sample01.txt, subtask0-sample02.txt, subtask0-sample03.txt, subtask0-sample04.txt, subtask1-01.txt, subtask1-02.txt, subtask1-03.txt, subtask1-04.txt, subtask1-05.txt, subtask1-06.txt, subtask1-07.txt, subtask1-08.txt, subtask1-09.txt, subtask1-10.txt, subtask1-11.txt, subtask1-12.txt, subtask1-13.txt, subtask1-14.txt, subtask1-15.txt, subtask1-16.txt
Case Name Status Exec Time Memory
subtask0-sample01.txt AC 1 ms 256 KB
subtask0-sample02.txt AC 1 ms 256 KB
subtask0-sample03.txt AC 1 ms 256 KB
subtask0-sample04.txt AC 1 ms 256 KB
subtask1-01.txt AC 1 ms 256 KB
subtask1-02.txt AC 1 ms 256 KB
subtask1-03.txt AC 1 ms 256 KB
subtask1-04.txt AC 1 ms 256 KB
subtask1-05.txt AC 1 ms 256 KB
subtask1-06.txt AC 1 ms 256 KB
subtask1-07.txt AC 1 ms 256 KB
subtask1-08.txt AC 1 ms 256 KB
subtask1-09.txt AC 1 ms 256 KB
subtask1-10.txt AC 1 ms 256 KB
subtask1-11.txt AC 1 ms 256 KB
subtask1-12.txt AC 1 ms 256 KB
subtask1-13.txt AC 1 ms 256 KB
subtask1-14.txt AC 1 ms 256 KB
subtask1-15.txt AC 1 ms 256 KB
subtask1-16.txt AC 1 ms 256 KB