結果
| 問題 |
No.2559 眩しい数直線
|
| コンテスト | |
| ユーザー |
Ponzu
|
| 提出日時 | 2023-12-03 23:55:17 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 631 bytes |
| コンパイル時間 | 2,825 ms |
| コンパイル使用メモリ | 244,840 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-26 22:24:21 |
| 合計ジャッジ時間 | 3,707 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 20 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,a) for(int i = 0; i < (a); ++i)
template<typename T> bool chmax(T &a,T b){if(a<b){a=b; return true;} return false;}
template<typename T> bool chmin(T &a,T b){if(a>b){a=b; return true;} return false;}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n,x;
cin >> n >> x;
vector<int> a(n),b(n);
for(int i=0;i<n;++i) cin >> a[i] >> b[i];
for(int i=1;i<=x;++i){
int res=0;
for(int j=0;j<n;++j){
res = max(res,max(0,b[j]-abs(i-a[j])));
}
cout << res << endl;
}
}
Ponzu