結果
| 問題 |
No.5009 Draw A Convex Polygon
|
| コンテスト | |
| ユーザー |
bluemegane
|
| 提出日時 | 2022-12-03 09:40:22 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 991 bytes |
| コンパイル時間 | 981 ms |
| 実行使用メモリ | 134,872 KB |
| スコア | 0 |
| 平均クエリ数 | 1000001.00 |
| 最終ジャッジ日時 | 2022-12-03 09:40:29 |
| 合計ジャッジ時間 | 6,300 ms |
|
ジャッジサーバーID (参考情報) |
judge13 / judge16 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 |
ソースコード
using System.Text;
using static System.Math;
using System.Collections.Generic;
using System.Linq;
using System;
public class P
{
public int x { get; set; }
public int y { get; set; }
}
public class Hello
{
static void Main()
{
var n = 1000000 / 4;
getAns(n);
}
static void getAns(int n)
{
Console.WriteLine(n*4);
var p1 = new List<P >();
for (int i = n ; i >= 1; i--)
{
p1.Add(new P { x = i, y = n - i });
p1.Add(new P { x = i - n, y = i });
}
p1 = p1.OrderByDescending(z => z.x).ToList();
var p2 = new List<P>();
for (int i = 0; i < 2 * n; i++)
{
p2.Add(new P { x = -p1[i].x, y = -p1[i].y });
}
var sb = new StringBuilder();
foreach (var x in p1) sb.Append(string.Format("{0} {1}\n", x.x, x.y));
foreach (var x in p1) sb.Append(string.Format("{0} {1}\n", x.x, x.y));
Console.Write(sb);
}
}
bluemegane