結果
| 問題 |
No.5009 Draw A Convex Polygon
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-03-22 15:33:06 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,027 bytes |
| コンパイル時間 | 625 ms |
| 実行使用メモリ | 23,076 KB |
| スコア | 0 |
| 平均クエリ数 | 952886.00 |
| 最終ジャッジ日時 | 2023-03-22 15:33:09 |
| 合計ジャッジ時間 | 2,338 ms |
|
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 |
ソースコード
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include <map>
#include <vector>
#include <queue>
#include <deque>
#include <set>
#include <stack>
#include <algorithm>
#include <array>
#include <unordered_set>
#include <unordered_map>
#include <string>
using namespace std;
bool rcmp(int a, int b) { return a>b; }
typedef long long LL;
class mypcmp {
public:
bool operator()(const int& a, const int& b) {
return a<b;
}
};
#define HH 1000
int xs[1000004];
int ys[1000004];
int main() {
int n, i, x, y, k, d;
x=-1000000000; y=0; k=0; d=1;
while(1) {
if (k>250000) break;
if (x>=0&&y>1000000000) break;
xs[k]=x; ys[k]=y; k++;
x+=d; y+=HH; d++;
}
// printf("k is %d\n", k);
printf("1000000\n");
for (i=1; i<k; i++) printf("%d %d\n", -xs[i], ys[i]);
for (i=k-1; i>0; i--) printf("%d %d\n", xs[i], ys[i]);
for (i=1; i<k; i++) printf("%d %d\n", xs[i], -ys[i]);
for (i=k-1; i>0; i--) printf("%d %d\n", -xs[i], -ys[i]);
return 0;
}