結果

問題 No.5016 Worst Mayor
ユーザー Shawn stayC
提出日時 2023-04-29 15:31:53
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 883 bytes
コンパイル時間 3,970 ms
コンパイル使用メモリ 204,784 KB
実行使用メモリ 37,504 KB
スコア 0
平均クエリ数 56.16
最終ジャッジ日時 2023-04-29 15:32:09
合計ジャッジ時間 9,827 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 24 TLE * 1 -- * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,l,r) for(int i=(l);i<(r);++i)

vector<int> dx={-1,0,1,0};
vector<int> dy={0,1,0,-1};

bool range(int x, int y){
	if(x<0 || y<0 || x>=14 || y>=14) return true;
	return false;
}

int main(){
	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];
	
	random_device rd;
	mt19937 eng(rd());
	uniform_int_distribution<int> sd1(2,13);
	uniform_int_distribution<int> sd2(0,3);
	
	rep(i,0,200){
		int u,v; cin>>u>>v;
		cout<<3<<endl; //money
	}
	rep(i,0,150){
		int u,v; cin>>u>>v;
		cout<<2<<endl; //supporter
	}
	rep(i,0,50){
		int u,v; cin>>u>>v;
		if(u==-1) return 0;
		if(u<1e7/sqrt(v)) cout<<3<<endl; //money
		else{
			int x=sd1(eng), y=sd1(eng), d=sd2(eng);
			if(range(x+dx[d],y+dy[d])) d=sd2(eng);
			else cout<<1<<x<<y<<x+dx[d]<<y+dy[d]<<endl; //road
		}
	}
}
0