結果
問題 |
No.471 直列回転機
|
ユーザー |
|
提出日時 | 2020-10-19 14:25:55 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 353 ms / 3,141 ms |
コード長 | 593 bytes |
コンパイル時間 | 2,141 ms |
コンパイル使用メモリ | 193,460 KB |
最終ジャッジ日時 | 2025-01-15 11:45:25 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 58 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:9:21: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | int n; scanf("%d",&n); | ~~~~~^~~~~~~~~ main.cpp:11:23: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | rep(i,n) scanf("%d%d",&x[i],&y[i]); | ~~~~~^~~~~~~~~~~~~~~~~~~~ main.cpp:21:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 21 | scanf("%lld%lld",&c,&f); | ~~~~~^~~~~~~~~~~~~~~~~~ main.cpp:24:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 24 | scanf("%lld%lld",&a,&d); | ~~~~~^~~~~~~~~~~~~~~~~~ main.cpp:28:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 28 | scanf("%lld%lld",&b,&e); | ~~~~~^~~~~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; using lint=long long; int main(){ int n; scanf("%d",&n); vector<int> x(n),y(n); rep(i,n) scanf("%d%d",&x[i],&y[i]); /* / a b c \ A = | d e f | \ 0 0 1 / */ lint a,b,c,d,e,f; puts("? 0 0"); fflush(stdout); scanf("%lld%lld",&c,&f); puts("? 1 0"); fflush(stdout); scanf("%lld%lld",&a,&d); a-=c; d-=f; puts("? 0 1"); fflush(stdout); scanf("%lld%lld",&b,&e); b-=c; e-=f; puts("!"); rep(i,n) printf("%lld %lld\n",a*x[i]+b*y[i]+c,d*x[i]+e*y[i]+f); fflush(stdout); return 0; }