結果
| 問題 |
No.1932 動く点 P / Moving Point P
|
| コンテスト | |
| ユーザー |
Rho
|
| 提出日時 | 2020-03-23 13:02:20 |
| 言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 1,038 bytes |
| コンパイル時間 | 2,052 ms |
| コンパイル使用メモリ | 126,208 KB |
| 実行使用メモリ | 10,368 KB |
| 最終ジャッジ日時 | 2024-07-05 21:57:27 |
| 合計ジャッジ時間 | 21,113 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 4 TLE * 1 -- * 6 |
ソースコード
#pragma GCC target ("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target "tune=native"
#include<iostream>
#include<cmath>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define MRE assert(0);
constexpr int inf = 1e9;
constexpr double pi = 3.1415926535897932;
constexpr int mod = 998244353;
double M[100006][2][3];
signed main() {
cin.tie(0); ios::sync_with_stdio(false);
int n; cin >> n;
rep(i, n) {
double p, q, theta; cin >> p >> q >> theta;
theta = theta*pi / 180.0;
M[i][0][0] = cos(theta);
M[i][0][1] = -sin(theta);
M[i][0][2] = q*sin(theta) - p*cos(theta) + p;
M[i][1][0] = sin(theta);
M[i][1][1] = cos(theta);
M[i][1][2] = -p*sin(theta) - q*cos(theta) + q;
}
int q; cin >> q;
rep(j, q) {
int s, t; double x, y; cin >> s >> t >> x >> y;
double nx, ny;
for (int i = s - 1; i < t; i++) {
nx = M[i][0][0] * x + M[i][0][1] * y + M[i][0][2];
ny = M[i][1][0] * x + M[i][1][1] * y + M[i][1][2];
x = nx; y = ny;
}
printf("%.13lf %.13lf\n", x,y);
}
}
Rho