結果
問題 | No.1108 移調 |
ユーザー |
![]() |
提出日時 | 2020-07-24 12:18:18 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,218 bytes |
コンパイル時間 | 1,534 ms |
コンパイル使用メモリ | 169,828 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-24 23:17:49 |
合計ジャッジ時間 | 2,479 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <iostream>#include <random>#include <bits/stdc++.h>using namespace std;using ll = __int128;using ull = long long;std::ostream &operator<<(std::ostream &dest, __int128_t value) {std::ostream::sentry s(dest);if (s) {__uint128_t tmp = value < 0 ? -value : value;char buffer[128];char *d = std::end(buffer);do {--d;*d = "0123456789"[tmp % 10];tmp /= 10;} while (tmp != 0);if (value < 0) {--d;*d = '-';}int len = std::end(buffer) - d;if (dest.rdbuf()->sputn(d, len) != len) {dest.setstate(std::ios_base::badbit);}}return dest;}__int128 p(string &s) {__int128 ret = 0;for (int i = 0; i < s.length(); i++)if ('0' <= s[i] && s[i] <= '9')ret = 10 * ret + s[i] - '0';return ret;}ll gcds(ll a,ll b){if (a%b == 0){return(b);}else{return(gcds(b, a%b));}}ll si(ll a,ll b){ll r=gcds(a,b);return a/r;}ll bo(ll a,ll b){ll r=gcds(a,b);return b/r;}int main(){ull a,b;cin>>a>>b;vector<ull> n(a);for(int i=0;i<a;i++){cin>>n.at(i);}for(int i=0;i<a-1;i++){cout<<n.at(i)+b<<" ";}cout<<n.at(a-1)+b<<endl;}