結果
問題 |
No.471 直列回転機
|
ユーザー |
👑 |
提出日時 | 2019-05-05 17:47:00 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 305 ms / 3,141 ms |
コード長 | 635 bytes |
コンパイル時間 | 860 ms |
コンパイル使用メモリ | 71,364 KB |
実行使用メモリ | 25,592 KB |
平均クエリ数 | 19588.39 |
最終ジャッジ日時 | 2024-06-11 10:41:34 |
合計ジャッジ時間 | 11,893 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 58 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:18:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 18 | scanf("%d", &m); | ~~~~~^~~~~~~~~~ main.cpp:20:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 20 | scanf("%d %d", &x[i], &y[i]); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~ main.cpp:24:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 24 | scanf("%d %d", &a, &b); | ~~~~~^~~~~~~~~~~~~~~~~ main.cpp:26:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 26 | scanf("%d %d", &c, &s); | ~~~~~^~~~~~~~~~~~~~~~~
ソースコード
#include <cstdio> #include <cstdlib> #include <cstddef> #include <vector> #include <algorithm> #include <cmath> #include <string> #include <iostream> #include <iomanip> #include <numeric> static int x[50000]; static int y[50000]; int main(void) { int m; scanf("%d", &m); for(int i = 0; i < m; i++){ scanf("%d %d", &x[i], &y[i]); } int a, b, c, s; printf("? 0 0\n"); fflush(stdout); scanf("%d %d", &a, &b); printf("? 1 0\n"); fflush(stdout); scanf("%d %d", &c, &s); c -= a; s -= b; printf("!\n"); for(int i = 0; i < m; i++){ printf("%d %d\n", c * x[i] - s * y[i] + a, s * x[i] + c * y[i] + b); } }