結果
| 問題 |
No.5016 Worst Mayor
|
| コンテスト | |
| ユーザー |
Fu_L
|
| 提出日時 | 2023-04-29 14:15:17 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,730 bytes |
| コンパイル時間 | 4,650 ms |
| コンパイル使用メモリ | 262,040 KB |
| 実行使用メモリ | 24,492 KB |
| スコア | 0 |
| 平均クエリ数 | 400.00 |
| 最終ジャッジ日時 | 2023-04-29 14:15:30 |
| 合計ジャッジ時間 | 10,635 ms |
|
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 50 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using P = pair<ll, ll>;
using mint = modint998244353;
#define rep(i, a, b) for(ll i = a; i < b; i++)
#define rrep(i, a, b) for(ll i = a; i >= b; i--)
constexpr ll inf = 4e18;
struct RandomNumberGenerator {
mt19937_64 mt;
RandomNumberGenerator()
: mt(chrono::steady_clock::now().time_since_epoch().count()) {}
ll operator()(ll l, ll r) {
uniform_int_distribution<ll> dist(l, r);
return dist(mt);
}
} rng;
int main(void) {
cin.tie(0);
ios::sync_with_stdio(0);
const vector<int> dx = {1, 0, -1, 0};
const vector<int> dy = {0, 1, 0, -1};
int n, t;
cin >> n >> t;
vector<int> a(n), b(n), c(n), d(n);
rep(i, 0, n) {
cin >> a[i] >> b[i] >> c[i] >> d[i];
a[i]--;
b[i]--;
c[i]--;
d[i]--;
}
ll u = 1e6;
int v = 1;
rep(day, 0, t) {
int ty = 0, x = -1, y = -1, z = -1, w = -1;
if(day < 24) {
ty = 2;
} else {
if(u >= 2000000 and day < t - 10) {
ty = 1;
x = rng(0, 13);
y = rng(0, 13);
while(!(0 <= z and z < 14 and 0 <= w and w < 14)) {
int dir = rng(0, 3);
z = x + dx[dir];
w = y + dy[dir];
}
} else {
ty = 3;
}
}
if(ty == 1) {
cout << ty << ' ' << x + 1 << ' ' << y + 1 << ' ' << z + 1 << ' ' << w + 1 << endl;
} else {
cout << ty << endl;
}
if(day < t - 1) {
cin >> u >> v;
}
}
}
Fu_L