#include<bits/stdc++.h>
#include "grader.h"
#include "cluedo.h"
using namespace std;
typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ld, ld> pd;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<vl> vll;
typedef vector<pi> vpi;
typedef vector<vpi> vpii;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
typedef vector<pd> vpd;
typedef vector<bool> vb;
typedef vector<vb> vbb;
typedef std::string str;
typedef std::vector<str> vs;
#define x first
#define y second
#define debug(...) cout<<"["<<#__VA_ARGS__<<": "<<__VA_ARGS__<<"]\n"
const int MOD = 1000000007;
const ll INF = std::numeric_limits<ll>::max();
const int MX = 100101;
const ld PI = 3.14159265358979323846264338327950288419716939937510582097494L;
template<typename T>
pair<T, T> operator+(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x + b.x, a.y + b.y); }
template<typename T>
pair<T, T> operator-(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x - b.x, a.y - b.y); }
template<typename T>
T operator*(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.x + a.y * b.y); }
template<typename T>
T operator^(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.y - a.y * b.x); }
template<typename T>
void print(vector<T> vec, string name = "") {
cout << name;
for (auto u : vec)
cout << u << ' ';
cout << '\n';
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void Solve() {
vi sk[4];
for (int i = 1; i <= 6; ++i)
{
sk[1].emplace_back(i);
sk[3].emplace_back(i);
}
for (int i = 1; i <= 10; ++i)
sk[2].emplace_back(i);
for (int i = 1; i <= 3; ++i)
shuffle(sk[i].begin(), sk[i].end(), rng);
int ans;
do {
ans = Theory(sk[1].back(), sk[2].back(), sk[3].back());
if (ans) sk[ans].pop_back();
else return;
} while (ans);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
384 KB |
Output is correct |
2 |
Correct |
11 ms |
256 KB |
Output is correct |
3 |
Correct |
10 ms |
256 KB |
Output is correct |
4 |
Correct |
12 ms |
256 KB |
Output is correct |
5 |
Correct |
16 ms |
256 KB |
Output is correct |
6 |
Correct |
16 ms |
256 KB |
Output is correct |
7 |
Correct |
15 ms |
256 KB |
Output is correct |
8 |
Correct |
14 ms |
256 KB |
Output is correct |
9 |
Correct |
14 ms |
256 KB |
Output is correct |
10 |
Correct |
14 ms |
384 KB |
Output is correct |
11 |
Correct |
17 ms |
256 KB |
Output is correct |
12 |
Correct |
14 ms |
384 KB |
Output is correct |
13 |
Correct |
15 ms |
256 KB |
Output is correct |
14 |
Correct |
15 ms |
256 KB |
Output is correct |
15 |
Correct |
14 ms |
256 KB |
Output is correct |
16 |
Correct |
13 ms |
384 KB |
Output is correct |
17 |
Correct |
14 ms |
256 KB |
Output is correct |
18 |
Correct |
13 ms |
256 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
15 ms |
384 KB |
Output is correct |
2 |
Correct |
11 ms |
256 KB |
Output is correct |
3 |
Correct |
15 ms |
256 KB |
Output is correct |
4 |
Correct |
12 ms |
256 KB |
Output is correct |
5 |
Correct |
13 ms |
256 KB |
Output is correct |
6 |
Correct |
18 ms |
384 KB |
Output is correct |
7 |
Correct |
15 ms |
384 KB |
Output is correct |
8 |
Correct |
14 ms |
256 KB |
Output is correct |
9 |
Correct |
14 ms |
256 KB |
Output is correct |
10 |
Correct |
14 ms |
384 KB |
Output is correct |
11 |
Correct |
11 ms |
384 KB |
Output is correct |
12 |
Correct |
13 ms |
256 KB |
Output is correct |
13 |
Correct |
14 ms |
384 KB |
Output is correct |
14 |
Correct |
12 ms |
256 KB |
Output is correct |
15 |
Correct |
14 ms |
384 KB |
Output is correct |
16 |
Correct |
14 ms |
256 KB |
Output is correct |
17 |
Correct |
14 ms |
256 KB |
Output is correct |
18 |
Correct |
15 ms |
384 KB |
Output is correct |