結果
| 問題 |
No.909 たぴの配置
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-05 17:39:37 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 343 bytes |
| コンパイル時間 | 6,377 ms |
| コンパイル使用メモリ | 192,680 KB |
| 最終ジャッジ日時 | 2025-01-10 06:53:41 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 2 WA * 11 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:10:21: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | int n; scanf("%d",&n);
| ~~~~~^~~~~~~~~
main.cpp:12:23: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
12 | rep(i,n) scanf("%d%d",&x[i],&y[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
const int INF=1<<29;
int main(){
int n; scanf("%d",&n);
vector<int> x(n),y(n);
rep(i,n) scanf("%d%d",&x[i],&y[i]);
int mn=INF;
rep(i,n) mn=min(mn,x[i]+y[i]);
printf("%d\n0\n",mn);
rep(i,n) printf("%d\n",x[i]);
printf("%d\n",mn);
return 0;
}