結果

問題 No.1108 移調
ユーザー okazakisteveokazakisteve
提出日時 2020-07-10 23:31:12
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 3,710 bytes
コンパイル時間 1,441 ms
コンパイル使用メモリ 168,468 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-01 23:27:29
合計ジャッジ時間 2,640 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>
#include <algorithm>
#include <bits/stdc++.h>
#include <vector>
#include <iomanip>
#include <cmath>
#include <stdio.h>
#include <queue>
#include <cctype>
#include <deque>
#include <map>
#define rep(i,N) for (ll i = 0; i < (N); i++)
#define repone(i,N) for(ll i = 1; i < (N); i++)
#define REP(i,N) for (ll i = (N)-1; i >= 0; i--)
#define FOR(j,i,N) for (ll j = (N)-1; j > (i); j--)
#define repsqrt(i,N) for(ll i = 1; i*i <= (N); i++)
#define updown(i,a,b) for(ll i = (a)-1; i < (b); i++)
#define ST string
#define vec vector<ll>
#define vecs vector<string>
#define outb(s) cout << fixed << setprecision(15) << s << endl;
#define out(s) cout << s << endl;
#define SZ(x) ((ll)(x).size())
#define Graph vector<vector<ll>>
#define vecb vector<lb>
#define P pair<ll, ll>
#define F first
#define S second
#define vecbool vector<bool>
using ll = long long;
using lb = long double;
using l = int;
using ll = long long;
using lb = long double;
using namespace std;
const ll mod = 1000000007;
const ll ze = 0;
const lb zeb = 0.0;
const ll on = 1;
const ll INF = 1e8;
const lb pi = 3.14159265358979;
 
ll nCk(ll N, ll K){
  if(N>1){
    ll kid = 1;
  for(ll i = N; i > N - K; i--){
      kid = kid * i;
    }
    for(ll i = 1; i < K + 1; i++){
        kid = kid / i;
    }
  return kid;
  }
  else{
    return 0;
  }
}
 
ll stair_pow(ll N){// 階乗
  ll sum = 1;
  for(ll i = 1; i <= N; i++){
    sum = sum * i % mod;
  }
  return sum % mod;
}
 
ll gcd(ll p, ll q){
  return q ? gcd(q ,p % q):p;
}
 
ll lcm(ll p, ll q){
  return p / gcd(p, q) * q;
}
 
bool is_prime(ll x){
  if(x <= 1){
    return false;
  }
  for(ll i=2; i * i <= x; i++){
    if(x%i==0){ 
      return false;
    }
  }
  return true;
}
 
ll sum_of_num(ll num){// 各位の和
  ll dig;
  ll sum = 0;
  while(num){
    dig = num % 10;
    sum = sum + dig;
    num = num / 10;
  }
  return sum;
}
 
ll how_many_break(ll n, ll m){// 何回割れるか
  ll counter = 0;
  while (n % m == 0){
    n = n / m;
    counter++;
  }
  return counter;
}
 
ll many_pow(ll N, ll M){ // NのM乗
  if(M == 0)return 1;
  else{
    ll sum = 1;
    for(ll i = 0; i < M; i++){
      sum *= N;
    }
    return sum;
  }
}
 
ll one_to_i(ll i){ // 1からiまでの和
  if(i < 0){
    return 0;
  }
  else{
    return i*(i+1)/2;
  }
}
 
ll how_many_yaku(ll num){
  ll ans = 0;
   repsqrt(i,num){
    if(num % i == 0){
      ans++;
      if(i != num/i){
        ans++;
      }
    }
  }
  return ans;
}
 
ll Digit(ll num){
    ll digit=0;
    while(num!=0){
        num /= 10;
        digit++;
    }
    return digit;
}
 
struct UnionFind {
  vec d;
  UnionFind(ll n = 0): d(n,-1) {}
  ll find(ll x) {
    if (d[x] < 0) return x;
    return d[x] = find(d[x]);
  }
  bool unite(ll x, ll y) {
    x = find(x); y = find(y);
    if (x == y) return false;
    if (d[x] > d[y]) swap(x,y);
    d[x] += d[y];
    d[y] = x;
    return true;
  }
  bool same(ll x, ll y) { return find(x) == find(y);}
  int size(ll x) { return -d[find(x)];}
};

vecbool seen;
void dfs(const Graph &G, ll v) {
    seen[v] = true;
    for (auto next_v : G[v]) { 
        if (seen[next_v]) continue;
        dfs(G, next_v); 
    }
}

/*-----------------------------------------------------------------------------------*/
 
// cout << fixed << setprecision(15)
 
// continue
 
// count(S.begin(),S.end(),'');
 
// reverse(S.begin(), S.end());
 
// S.substr(8, 8)

// sort(p.begin(), p.end());
 
// sort(p.rbegin(), p.rend()); ← 降順sort.

/*-----------------------------------------------------------------------------------*/

int main() {
  ll n,k;
  cin >> n >> k;
  rep(i,n){
    ll a;
    cin >> a;
    cout << a+k << " ";
  }
  cout << endl;
  return 0;
}
0