結果
| 問題 | No.471 直列回転機 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-11-22 12:42:51 |
| 言語 | C++17(gcc12) (gcc 12.4.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 251 ms / 3,141 ms |
| コード長 | 841 bytes |
| 記録 | |
| コンパイル時間 | 888 ms |
| コンパイル使用メモリ | 112,812 KB |
| 実行使用メモリ | 28,964 KB |
| 平均クエリ数 | 19589.39 |
| 最終ジャッジ日時 | 2026-03-08 21:17:22 |
| 合計ジャッジ時間 | 9,361 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 58 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:23:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
23 | scanf("%d %d", &xs[i], &ys[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>
static const int MOD = 1000000007;
using ll = long long;
using namespace std;
template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;
int main() {
int n;
cin >> n;
vector<int> xs(n), ys(n);
for (int i = 0; i < n; ++i) {
scanf("%d %d", &xs[i], &ys[i]);
}
ll a, b, c, d, e, f;
cout << "? 0 0" << endl;
cin >> c >> f;
cout << "? 1 0" << endl;
cin >> a >> d;
a -= c; d -= f;
cout << "? 0 1" << endl;
cin >> b >> e;
b -= c; e -= f;
cout << "!" << endl;
for (int i = 0; i < n; ++i) {
cout << a*xs[i]+b*ys[i]+c << " " << d*xs[i]+e*ys[i]+f << endl;
}
return 0;
}