結果
| 問題 | 
                            No.5009 Draw A Convex Polygon
                             | 
                    
| コンテスト | |
| ユーザー | 
                             tails
                         | 
                    
| 提出日時 | 2022-12-02 01:25:47 | 
| 言語 | cLay  (20241019-1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 841 ms / 2,600 ms | 
| コード長 | 860 bytes | 
| コンパイル時間 | 3,467 ms | 
| 実行使用メモリ | 21,892 KB | 
| スコア | 1,000,000 | 
| 平均クエリ数 | 1000001.00 | 
| 最終ジャッジ日時 | 2022-12-02 01:25:53 | 
| 合計ジャッジ時間 | 5,969 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge14 / judge13 | 
| 純コード判定しない問題か言語 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 1 | 
ソースコード
struct Rat{int n,d;};
bool operator<(Rat a,Rat b){
	return a.n*b.d<b.n*a.d;
}
{
	vector<Rat>v;
	rep(a,1,1000){
		rep(b,1,a){
			if(gcd(a,b)==1){
				Rat r;
				r.n=b;
				r.d=a;
				v.push_back(r);
				if(v.size()==125000){
					break_break;
				}
			}
		}
	}
	sort(v.begin(),v.end());
	wt((ll)v.size()*8);
	int x=80119821,y=0;
	for(auto t=v.begin();t!=v.end();++t){
		wt(x-=t->n,y+=t->d);
	}
	for(auto t=v.rbegin();t!=v.rend();++t){
		wt(x-=t->d,y+=t->n);
	}
	for(auto t=v.begin();t!=v.end();++t){
		wt(x-=t->d,y-=t->n);
	}
	for(auto t=v.rbegin();t!=v.rend();++t){
		wt(x-=t->n,y-=t->d);
	}
	for(auto t=v.begin();t!=v.end();++t){
		wt(x+=t->n,y-=t->d);
	}
	for(auto t=v.rbegin();t!=v.rend();++t){
		wt(x+=t->d,y-=t->n);
	}
	for(auto t=v.begin();t!=v.end();++t){
		wt(x+=t->d,y+=t->n);
	}
	for(auto t=v.rbegin();t!=v.rend();++t){
		wt(x+=t->n,y+=t->d);
	}
}
            
            
            
        
            
tails