結果
| 問題 | No.796 well known |
| コンテスト | |
| ユーザー |
ugis_prog
|
| 提出日時 | 2019-03-15 21:42:33 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 433 bytes |
| 記録 | |
| コンパイル時間 | 790 ms |
| コンパイル使用メモリ | 80,496 KB |
| 実行使用メモリ | 11,936 KB |
| 最終ジャッジ日時 | 2026-03-22 22:40:25 |
| 合計ジャッジ時間 | 9,822 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 2 WA * 11 TLE * 2 |
ソースコード
#include<iostream>
#include<vector>
#include<queue>
#include<string>
using namespace std;
int main(){
int N;
cin >> N;
vector<int> ans(1,3);
int sum = 3;
int i=1;
while(ans.size() < N-1) {
if(i == 3) i++;
ans.push_back(i);
sum += i;
i++;
}
while((sum+i)%3 != 1 || i == 3) i++;
ans.push_back(i);
for(int i=0;i<N;i++) cout << ans[i] << " ";
cout << endl;
}
ugis_prog