結果

問題 No.1108 移調
ユーザー uxux
提出日時 2023-12-28 23:53:13
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 2,990 bytes
コンパイル時間 3,840 ms
コンパイル使用メモリ 226,224 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-27 15:55:52
合計ジャッジ時間 4,712 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 2 ms
6,816 KB
testcase_02 AC 2 ms
6,944 KB
testcase_03 AC 2 ms
6,940 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 2 ms
6,940 KB
testcase_07 AC 2 ms
6,944 KB
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 1 ms
6,940 KB
testcase_10 AC 2 ms
6,940 KB
testcase_11 AC 2 ms
6,940 KB
testcase_12 AC 2 ms
6,944 KB
testcase_13 AC 2 ms
6,940 KB
testcase_14 AC 2 ms
6,944 KB
testcase_15 AC 2 ms
6,944 KB
testcase_16 AC 2 ms
6,940 KB
testcase_17 AC 1 ms
6,944 KB
testcase_18 AC 2 ms
6,940 KB
testcase_19 AC 2 ms
6,940 KB
testcase_20 AC 2 ms
6,940 KB
testcase_21 AC 2 ms
6,944 KB
testcase_22 AC 2 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>    // tree
#include <ext/pb_ds/tree_policy.hpp>        // tree
using namespace std;
using namespace __gnu_pbds;                 // tree
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vl = vector<long long>;
using vc = vector<char>;
using vs = vector<string>;
using vb = vector<bool>;
using vd = vector<double>;
using vld = vector<long double>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<long long>>;
using vvc = vector<vector<char>>;
using vvs = vector<vector<string>>;
using vvb = vector<vector<bool>>;
using vvd = vector<vector<double>>;
using vvld = vector<vector<long double>>;
using vpii = vector<pair<int, int>>;
using vpll = vector<pair<ll, ll>>;
using vpcc = vector<pair<char, char>>;
using vpss = vector<pair<string, string>>;
using primax_int = priority_queue<int>;
using primin_int = priority_queue<int, vector<int>, greater<int>>;
using primax_ll = priority_queue<ll>;
using primin_ll = priority_queue<ll, vector<ll>, greater<ll>>;
using primax_char = priority_queue<char>;
using primin_char = priority_queue<char, vector<char>, greater<char>>;
using primax_string = priority_queue<string>;
using primin_string = priority_queue<string, vector<string>, greater<string>>;
using tree_int = tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>;
using tree_ll = tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update>;
using tree_char = tree<char, null_type, less<char>, rb_tree_tag, tree_order_statistics_node_update>;
using tree_string = tree<string, null_type, less<string>, rb_tree_tag, tree_order_statistics_node_update>;

#define endl "\n"
#define YES printf("YES\n");
#define Yes printf("Yes\n");
#define NO printf("NO\n");
#define No printf("No\n");
#define rep0(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
#define ALL(f,x,...) ([&](decltype((x)) whole) { return (f)(begin(whole), end(whole), ## __VA_ARGS__); })(x)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
const int INF = 1e9;
const int MININF = -1e9;
const ll LINF = 1e18;
const ll MINLINF = -1e18;
const int MOD = 1e9 + 7;
const int MODD = 998244353;
const char MARU = 'o';
const char BATU = 'x';

// 8方向(4方向ならN=4で止め。)
vi vx = {0, 1, 0, -1, 1, -1, 1, -1};
vi vy = {1, 0, -1, 0, 1, -1, -1, 1};

template <class T>
bool chmax(T &a, const T& b){
    if(a < b){a = b;return true;}
    return false;
}

template <typename T>
bool chmin(T &a, const T& b){
    if(a > b){a = b;return true;}
    return false;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int N,H; cin>>N>>H;
    rep0(i,N){
        int A; cin>>A;
        if(i>0)cout<<" ";
        cout<<A+H;
    }
    cout<<endl;
}
0