結果
| 問題 |
No.796 well known
|
| コンテスト | |
| ユーザー |
Tqk
|
| 提出日時 | 2019-03-15 21:34:03 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 132 ms / 2,000 ms |
| コード長 | 414 bytes |
| コンパイル時間 | 1,632 ms |
| コンパイル使用メモリ | 166,160 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-01 20:30:12 |
| 合計ジャッジ時間 | 3,700 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 |
ソースコード
#include "bits/stdc++.h"
using namespace std;typedef long long lint;typedef vector<lint> liv;
#define rep(i,n) for(int i=0;i<n;++i)
#define all(v) v.begin(),v.end()
#define linf 1152921504606846976
#define MAXN 100010
int main(){
lint n,s=3;cin>>n;cout<<3<<endl;
if(n==2){ cout<<1<<endl;return 0; }
rep(i,n-3)++s,cout<<1<<endl;
if(s%3==0)cout<<"2\n2\n";
else if(s%3==1)cout<<"1\n2\n";
else cout<<"1\n1\n";
}
Tqk