AT_agc036_a [AGC036A] Triangle 题解
Snowflake_Fairy · · 题解
解题思路
这就是一道数学题好吧,本蒟蒻刚好学到。
一个顶点在
我们的坐标要尽可能小,所以我们可以把
CODE:
#include <stdio.h>
#include <math.h>
typedef long long ll;
int main() {
ll s;
scanf("%lld", &s);
ll x1, y2;
x1 = y2 = ceil(sqrt(s));
ll x2 = x1 * y2 - s;
printf("0 0 %lld %lld 1 %lld", x1, x2, y2);
return 0;
}