QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#869816#8619. Interactive Casinoucup-team5234#WA 1ms3456kbC++232.8kb2025-01-25 13:32:582025-01-25 13:33:01

Judging History

你现在查看的是最新测评结果

  • [2025-01-25 13:33:01]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3456kb
  • [2025-01-25 13:32:58]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;
#define SZ(x) (int) (x).size()
#define REP(i, n) for(int i = 0; i < (n); i++)
#define FOR(i, a, b) for(auto i = (a); i < (b); i++)
#define For(i, a, b, c) \
	for(auto i = (a); i != (b); i += (c))
#define REPR(i, n) for(auto i = (n) - 1; i >= 0; i--)
#define ALL(s) (s).begin(), (s).end()
#define so(V) sort(ALL(V))
#define rev(V) reverse(ALL(V))
#define uni(v) v.erase(unique(ALL(v)), (v).end())
#define eb emplace_back

typedef unsigned long long ull;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> PI;
typedef pair<ll, ll> PL;
const double EPS = 1e-6;
const int MOD = 1e9 + 7;
const int INF = (1 << 30);
const ll LINF = 1e18;
const double math_PI = acos(-1);

template<typename T>
vector<T> make_v(size_t a) {
	return vector<T>(a);
}

template<typename T, typename... Ts>
auto make_v(size_t a, Ts... ts) {
	return vector<decltype(make_v<T>(ts...))>(
		a, make_v<T>(ts...));
}

template<typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type fill_v(
	T &t, const V &v) {
	t = v;
}

template<typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type fill_v(
	T &t, const V &v) {
	for(auto &e: t) fill_v(e, v);
}

template<class T>
bool chmax(T &a, const T &b) {
	if(a < b) {
		a = b;
		return true;
	}
	return false;
}

template<class T>
bool chmin(T &a, const T &b) {
	if(a > b) {
		a = b;
		return true;
	}
	return false;
}

template<typename S, typename T>
istream &operator>>(istream &is, pair<S, T> &p) {
	cin >> p.first >> p.second;
	return is;
}

template<typename T>
istream &operator>>(istream &is, vector<T> &vec) {
	for(T &x: vec) is >> x;
	return is;
}

template<typename T>
string join(vector<T> &vec, string splitter) {
	stringstream ss;
	REP(i, SZ(vec)) {
		if(i != 0) ss << splitter;
		ss << vec[i];
	}
	return ss.str();
}

template<typename T>
ostream &operator<<(ostream &os, vector<T> &vec) {
	os << join(vec, " ");
	return os;
}

#ifdef LOCAL
#include "./cpp-dump/dump.hpp"
#include "./cpp-dump/mytypes.hpp"
#define dump(...) cpp_dump(__VA_ARGS__)
namespace cp = cpp_dump;
#else
#define dump(...)
#define preprocess(...)
#define CPP_DUMP_SET_OPTION(...)
#define CPP_DUMP_DEFINE_EXPORT_OBJECT(...)
#define CPP_DUMP_DEFINE_EXPORT_ENUM(...)
#define CPP_DUMP_DEFINE_DANGEROUS_EXPORT_OBJECT(...)
#endif

void solve() {
	int T;
	cin >> T;
	REP(i, T + 1) {
		string s;
		int m, b;
		cin >> s;
		if(s == "WIN" || s == "LOSE") {
			return;
		}
		cin >> m >> b;
		if(m / 10 >= b) {
			cout << "PLAY" << endl;
		} else {
			cout << "SKIP" << endl;
		}
	}
}

int main() {
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	solve();
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3456kb

input:

5
ROUND 1000 43
ROUND 957 433
ROUND 957 525
ROUND 957 125
ROUND 957 199
WIN

output:

PLAY
SKIP
SKIP
SKIP
SKIP

result:

ok OK

Test #2:

score: 0
Accepted
time: 1ms
memory: 3456kb

input:

1000
ROUND 1000 741
ROUND 1000 70
ROUND 1140 976
ROUND 1140 955
ROUND 1140 667
ROUND 1140 372
ROUND 1140 898
ROUND 1140 1078
ROUND 1140 813
ROUND 1140 785
ROUND 1140 820
ROUND 1140 929
ROUND 1140 562
ROUND 1140 399
ROUND 1140 313
ROUND 1140 804
ROUND 1140 611
ROUND 1140 237
ROUND 1140 252
ROUND 1140...

output:

SKIP
PLAY
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
PLAY
SKIP
SKIP
SKIP
PLAY
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
PLAY
SKIP
SKIP
SKIP
PLAY
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
PLAY
...

result:

ok OK

Test #3:

score: -100
Wrong Answer
time: 1ms
memory: 3456kb

input:

1000
ROUND 1000 13
ROUND 1026 402
ROUND 1026 653
ROUND 1026 538
ROUND 1026 333
ROUND 1026 2
ROUND 1024 413
ROUND 1024 864
ROUND 1024 396
ROUND 1024 287
ROUND 1024 700
ROUND 1024 374
ROUND 1024 68
ROUND 956 256
ROUND 956 778
ROUND 956 412
ROUND 956 670
ROUND 956 498
ROUND 956 903
ROUND 956 793
ROUND ...

output:

PLAY
SKIP
SKIP
SKIP
SKIP
PLAY
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
PLAY
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
PLAY
SKIP
PLAY
SKIP
PLAY
SKIP
PLAY
SKIP
SKIP
PLAY
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
PLAY
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
SKIP
PLAY
SKIP
SKIP
SKIP
SKIP
...

result:

wrong answer WA