結果
| 問題 |
No.1658 Product / Sum
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-03 00:36:06 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 2,000 ms |
| コード長 | 999 bytes |
| コンパイル時間 | 1,498 ms |
| コンパイル使用メモリ | 169,012 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-30 16:56:56 |
| 合計ジャッジ時間 | 3,104 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(),(x).end()
#define print(x) cout << (x) << '\n'
typedef long long ll;
using P = pair<int,int>;
using pll = pair<ll,ll>;
using Graph = vector<vector<int>>;
const ll MOD = 1000000007;
//const ll MOD = 998244353;
template <typename T> inline bool chmax(T &a, T b) {return a < b ? a = b, true : false;}
template <typename T> inline bool chmin(T &a, T b) {return a > b ? a = b, true : false;}
const double pi = atan(double(1)) * double(4);
void solve(){
ll n, k; cin >> n >> k;
vector<ll> ans(n, 1LL);
if(n == 2){
cout << k + 1 << " " << k * (k + 1) << endl;
return;
}
for(int i = 0; i < n - 3; i++) cout << 1 << " ";
cout << 2 << " " << k << " " << (k + (n - 3 + 2)) << endl;
return;
}
int main() {
cin.tie(0); cout.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(18);
int t;
//cin >> t;
t = 1;
while(t--) solve();
return 0;
}