結果
問題 |
No.3048 Swing
|
ユーザー |
|
提出日時 | 2025-03-15 00:20:16 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 330 bytes |
コンパイル時間 | 3,021 ms |
コンパイル使用メモリ | 274,952 KB |
実行使用メモリ | 7,328 KB |
最終ジャッジ日時 | 2025-03-15 00:20:31 |
合計ジャッジ時間 | 12,342 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 59 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int x,n; cin >> x >> n; vector<int>a; a[0] = x; cout << x << " "; for(int i = 1; i<=n; i++){ if(a[i-1]<=0) a.push_back(a[i-1]+i); else a.push_back(a[i-1]-i); cout << a[i] << " "; } // your code goes here return 0; }