結果

問題 No.2559 眩しい数直線
ユーザー Arcana
提出日時 2023-12-02 15:30:16
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 1,491 bytes
コンパイル時間 1,879 ms
コンパイル使用メモリ 195,560 KB
最終ジャッジ日時 2025-02-18 04:39:57
ジャッジサーバーID
(参考情報)
judge3 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
プレゼンテーションモードにする

#include <iostream>
#include <iostream>
#include <vector>
#include <bits/stdc++.h>
#include <algorithm>
#include <bitset>
#include <string>
using namespace std;
//https://shibh308.hatenablog.com/entry/2018/02/19/205716
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;
using namespace std;
#define dump(x) cout << #x << " = " << (x) << endl;
#define YES(n) cout << ((n) ? "YES" : "NO" ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No" ) << endl
#define POSSIBLE(n) cout << ((n) ? "POSSIBLE" : "IMPOSSIBLE" ) << endl
#define Possible(n) cout << ((n) ? "Possible" : "Impossible" ) << endl
#define SANKOU(n,a,b) cout << ((n) ? (#a) : (#b) ) << endl
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) for(int i=0;i<(n);++i)
#define REPR(i,n) for(int i=n;i>=0;i--)
#define FOREACH(x,a) for(auto& (x) : (a) )
#define SCOUT(x) cout<<(x)<<" "
#define ENDL cout<<endl
#define VECCIN(x) for(auto&youso_: (x) )cin>>youso_
#define VECCOUT(x) for(auto&youso_: (x) )cout<<youso_<<" ";cout<<endl
#define ALL(obj) (obj).begin(),(obj).end()
#define COUT(x) cout<<(x)<<endl
#define BOOLANS(x) if(x){cout << "Yes" << "\n";} else {cout << "No" << "\n";}
int main(){
int N,X;
cin >>N >>X ;
vector<int> A(N+1),B(N+1);
FOR(i,1,N+1){
cin >> A[i] >> B[i];
}
int ans;
vector<int> L(X+1,0);
FOR(j,1,X+1){
FOR(i,1,N+1){
L[j] = max({L[j],B[i]-abs(A[i] -j )});
}
}
FOR(i,1,X+1){
cout << L[i] << " ";
}
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0